Created
November 7, 2013 14:59
-
-
Save mikedugan/7355998 to your computer and use it in GitHub Desktop.
useful bashrc and zshrc stuffs
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
| alias ls='ls -lah' | |
| alias ld='ls -d .*' | |
| alias ez='exec zsh' | |
| alias tf="sftp mike@tick" | |
| alias .2='cd ../../' | |
| alias .3='cd ../../../' | |
| alias .4='cd ../../../../' | |
| alias .5='cd ../../../../../' | |
| alias h='history' | |
| alias j='jobs -1' | |
| alias memhog='ps auxf | sort -nr -k 4 | head -2' | |
| alias cpuhog='ps auxf | sort -nr -k 3 | head -2' | |
| alias cl='fc -e - | pbcopy' | |
| alias cpwd='pwd | tr -d "\n" | pbcopy' | |
| alias agr='sudo apt-get -purge remove' | |
| alias size='du -sh' | |
| alias ff='find ./ -type f -name' | |
| alias fd='find ./ -type d -name' | |
| alias fa='fa' | |
| alias flarger='flarger' | |
| alias c='clear' | |
| alias reboot='sudo reboot' | |
| alias shutdown='sudo shutdown -h now' | |
| alias agu='sudo apt-get update && sudo apt-get upgrade' | |
| alias agi='agi' | |
| alias eb="exec bash" | |
| alias ..="cd ../" | |
| alias ...="cd ../../" | |
| alias rsa="ssh [email protected]" | |
| alias rtap="ssh [email protected]" | |
| alias ..="cd ../" | |
| alias ...="cd ../../" | |
| alias r='rooter' | |
| alias sf='sftper' | |
| alias mkpw='randpw' | |
| alias eb='exec bash' | |
| alias t='ssh mike@tick' | |
| alias ys='yum search' | |
| alias yi='sudo yum install' | |
| alias fp='findProcess' | |
| alias getsrc='getsrc' | |
| alias mkfake='fakefile' | |
| fa() { | |
| touch faRes | |
| find ./ -type f -name $1 >> faRes | |
| echo '======directories======' >> faRes | |
| find ./ -type d -name $1 >> faRes | |
| cat faRes | |
| rm faRes | |
| } | |
| flarger() { | |
| find . -type f -size +${1}c | |
| } | |
| fakefile() { | |
| perl -e "print '0' x 1024 x 1024 x $1" > $1-MB-fake-file.txt | |
| } | |
| rooter() { | |
| ssh root@$1 | |
| } | |
| function rooter() { | |
| ssh root@$1 | |
| } | |
| function sftper() { | |
| sftp root@$1 | |
| } | |
| randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9-\!-\} | head -c${1:-16};echo;} | |
| findProcess() { | |
| ps aux | grep $1 | awk '{print $2 ": " $11}' | |
| } | |
| rr() { | |
| ssh -t -t [email protected] | |
| exec "ssh root@$1" | |
| } | |
| alias dss="du -sm $1 | awk \'{print \$1}\'" | |
| alias ds="du -sm $1 | awk '{ print \$1/1000 \"GB\"}'" | |
| alias ti='ssh [email protected]' | |
| alias swork='ssh -t -t [email protected] exec "ssh [email protected]"' | |
| alias fwork='ssh -t -t [email protected] exec "sftp [email protected]"' | |
| alias mailsize='du -hs ~/Library/mail' | |
| alias bk='cd $OLDPWD' | |
| alias rm='rm -i' | |
| [[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh | |
| alias conkeror='/Applications/Firefox.app/Contents/MacOS/firefox -app ~/src/conkeror/application.ini' | |
| export PATH=/usr/local/php5/bin:$PATH | |
| alias array='ssh [email protected]' | |
| alias types="ls * | awk -F. '{ print \$3}' | sort -u | sed '/^$/d' | sed '/^[A-Z]/d' | sed '/[a-z]/!d' | sed '/[a-z]$/!d' | awk 'length(\$0)<5' | awk 'length(\$0)>1'" | |
| alias rtypes="ls */* | awk -F. '{ print \$3}' | sort -u | sed '/^$/d' | sed '/^[A-Z]/d' | sed '/[a-z]/!d' | sed '/[a-z]$/!d' | awk 'length(\$0)<5' | awk 'length(\$0)>1'" | |
| alias ftypes="find . -type f | awk -F. '{ print \$3}' | sed '/^$/d' | sed '/^[A-Z]/d' | sed '/[a-z]/!d' | sed '/[a-z]$/!d' | awk 'length(\$0)<5' | awk 'length(\$0)>1'" | |
| alias gA='git add -A' | |
| alias gC='git commit' | |
| alias gHP='git push https://github.com/mjdugan14/$1' | |
| alias gP='git push origin master' | |
| ntypes() { | |
| ls * | grep $1 | wc -w | |
| } | |
| alias ntypes=ntypes | |
| alias r="ssh root@ $1 .internetconnection.net" | |
| alias fc="find ./\$1/ -type f | wc -l" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment