-
-
Save benlk/ea37e9ba2dc1000f23b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://twitter.com/addyosmani/status/633405466094120960 | |
!! # run the last command executed | |
sudo !! # run the last command, but as root | |
!<word> # run the last command that started with the word | |
!<word>:p # List, but don't run that last command. :p is like "print" | |
<space>command # execute a command without saving it in history | |
echo "ls -l" | at midnight # execute command at a given time. `man at` has come really nice examples. | |
ls -lhS # sort files by sizes in directory | |
top -o vsize # why is your computer slow | |
# OSX-specific | |
qlmanage -p <file> # OSX QuickLook preview from the command line | |
caffeinate -u -t 3600 # stop your mac for sleeping for 1h | |
echo "foo" | pbcopy # add "foo" to the command-v clipboard for pasting | |
pbpaste > file.txt # dump the command-c/x clipboard to a file | |
open file.whatever # Open the file using OSX's normal program for that file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment