Enable Option Key as Meta in iTerm. Set as Esc+ - http://stackoverflow.com/a/438892
Ctrl + aGo to the beginning of the line (Home)Ctrl + eGo to the End of the line (End)Ctrl + pPrevious command (Up arrow)Ctrl + nNext command (Down arrow)
| gen-username() { | |
| vowel() { | |
| head /dev/urandom | tr -dc 'aeiueoy' | cut -c1 | |
| } | |
| consonant() { | |
| head /dev/urandom | tr -dc 'qwrtpsdfghjklzxcvbnm' | cut -c1 | |
| } | |
| digit() { | |
| head /dev/urandom | tr -dc '[:digit:]' | cut -c1 | |
| } |
| # For documentation, see http://www.sumatrapdfreader.org/settings3.2.html | |
| MainWindowBackground = #000000 | |
| EscToExit = true | |
| ReuseInstance = false | |
| UseSysColors = true | |
| RestoreSession = true | |
| FixedPageUI [ | |
| TextColor = #000000 |
| import copy | |
| import networkx | |
| import matplotlib.pyplot as plt | |
| # Generate a graph. | |
| # Here I chose an ER graph. | |
| g = nx.erdos_renyi_graph(20, 0.3) | |
| # Get positions. | |
| # Here I use the spectral layout and add a little bit of noise. |
Enable Option Key as Meta in iTerm. Set as Esc+ - http://stackoverflow.com/a/438892
Ctrl + a Go to the beginning of the line (Home)Ctrl + e Go to the End of the line (End)Ctrl + p Previous command (Up arrow)Ctrl + n Next command (Down arrow)Copied from https://github.com/sindresorhus/guides/blob/master/how-not-to-rm-yourself.md
The rm command is inherently dangerous and should not be used directly. It can at worst let you accidentally remove everything. Here's how you can protect you from yourself.
The trash command-line tool will move stuff to the trash instead of permanently deleting it. You should not alias rm to trash as it will break external scripts relaying on the behavior of rm. Instead use it directly: trash image.jpg.
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrcEach of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs