Last active
August 29, 2015 14:10
-
-
Save isomorphisms/d41ffb0271aa9eba6809 to your computer and use it in GitHub Desktop.
commands I wanted which didn't (exactly) exist
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
#IMPORTANT | |
alias del='gvfs-trash' | |
alias rm='rm -i' | |
alias mv='mv -i' | |
#CONVENIENCE | |
alias g='surfraw google' | |
alias wk='surfraw wikipedia' | |
alias def='surfraw google define:' | |
alias u='surfraw google unicode' | |
alias n='w3m http://ncatlab.org/nlab/search?query=' | |
alias b='r -l 'beepr' -e "beep(0)"' #beep #https://github.com/rasmusab/beepr | |
alias pdfcat='pdftotext' | |
alias py='python' | |
alias sl='ls' | |
#download to ~/Downloads | |
cget() { | |
pushd ~/Downloads && wget $1 && popd | |
} | |
#download to /opt | |
oget() { | |
pushd /opt && wget $1 && popd | |
} | |
#inspect file #http://cl.ly/image/2832452f0w1k | |
i() { | |
head -1 $1 | |
if [ -z $2 ] ; then | |
shuf $1 | head | |
else | |
shuf $1 | head -$2 | |
fi | |
tail -1 $1 | |
} | |
#no header | |
nh() { | |
tail -n +2 $1 | |
} | |
#make directory and then change to it #http://superuser.com/questions/152794/is-there-a-shortcut-to-mkdir-foo-and-immediately-cd-into-it | |
mkcd() { | |
mkdir $1 && cd $1 | |
} | |
#pushd and popd | |
p() { | |
if [ -z $1 ] ; then | |
popd | |
else | |
pushd $1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment