CLI config/dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
6.1 KiB

  1. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. # .aliases
  3. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. # Alias definitions for interactive shells. Should be able to be sourced from
  5. # (at least) bash and zsh rc files.
  6. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. # general usage
  8. alias u='cd ..'
  9. alias back='cd "$OLDPWD"'
  10. #alias ls='ls --group-directories-first'
  11. alias ls='ls --literal'
  12. alias ll='ls -lh'
  13. alias la='ls -A'
  14. alias list='ls -lhA'
  15. alias tree='tree -Chug'
  16. alias mv='mv -i'
  17. alias cp='cp -i'
  18. alias ds='du -hsc * | sort -h'
  19. if [[ "${DISPLAY}" == localhost:?*.0 ]]; then
  20. alias vim='/usr/bin/vim -display localhost:0' # keep from launching X11 on OS X over SSH sessions
  21. fi
  22. alias truecrypt='truecrypt -t'
  23. alias kp="kpcli --kdb ~/Local/key/KeePass/master.kdbx --key ~/Local/key/master.key --histfile /dev/null"
  24. alias gamepad="xboxdrv --silent --detach-kernel-driver --mimic-xpad" # run as root
  25. alias todo='vim ~/.todo.tp'
  26. # random fun stuff
  27. alias tclock='tty-clock -sctb -d 0 -a 10000000 -C 6 -f "%Y/%m/%d"'
  28. alias blah='while true; do head -c8 /dev/urandom; sleep 0.02; done | hexdump -C'
  29. #alias engage='play -r 44100 -c2 -n synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +16'
  30. alias engage='play -c2 -n -t alsa synth whitenoise band -n 100 24 band -n 300 100 gain +16'
  31. #alias matrix='cmatrix -ab -u2'
  32. alias matrix='unimatrix -afo -s 95 -l nssssSScCgGkkkkkkkk'
  33. alias pipes='/usr/bin/pipes -t 3 -f 60 -r 8000'
  34. #alias mine='cgminer --scrypt -o stratum+tcp://middlecoin.com:3333 -u 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS -p asdfgqwert'
  35. alias mine-intense='cudaminer --interactive=0 --algo=scrypt -o stratum+tcp://middlecoin.com:3333 -u 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS -p asdfgqwert'
  36. alias mine='cudaminer --interactive=1 --algo=scrypt -o stratum+tcp://middlecoin.com:3333 -u 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS -p asdfgqwert'
  37. alias balance='curl http://www.middlecoin.com/allusers.html | grep -B 3 -A 3 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS'
  38. #alias balance='curl http://middlecoin2.s3-website-us-west-2.amazonaws.com/allusers.html | grep -B 3 -A 3 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS'
  39. alias xtv='xrandr --output HDMI-0 --auto --same-as DVI-I-1'
  40. alias chrome='google-chrome-stable'
  41. alias batch-unzip='for i in *.zip; do newdir="$i:gs/.zip/"; mkdir "$newdir"; unzip -d "$newdir" "$i"; done'
  42. #alias scanimage='scanimage --format=tiff --device pixma:04A91747_80650C --resolution 300'
  43. alias scan-flatbed='scanimage --format=tiff --device "brother4:bus4;dev2" --resolution 600 --source FlatBed'
  44. alias scan-tray='scanimage --format=tiff --device "brother4:bus4;dev1" --resolution 600'
  45. alias merge_pdfs='gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf'
  46. alias netmon="bmon -p eth1,eth0 -b -o curses:'nocolors;bgchar= '"
  47. alias weather="curl http://wttr.in/Nashville"
  48. alias fp='for i in *.flac; do ffprobe $i 2>&1; done'
  49. alias fa='for i in *.flac; do ffprobe $i 2>&1 | grep -i artist; done'
  50. alias fcomp='for i in *.flac; do ffprobe $i 2>&1 | grep -i composer; done'
  51. alias rm-if-no-screen='for i in *; do if [ ! -e screens/"$i".jpg -a $i != "screens" ]; then rm -Iv $i; fi; done'
  52. alias mic="echo \"Starting jack mic input with 'alsa_in -j mic -d hw:USB -r 192000 -c 2 -p 512 -n 3'\" && alsa_in -j mic -d hw:USB -r 192000 -c 2 -p 512 -n 3"
  53. alias pic-dirs-by-date='for i in *.NEF; do dirname=`ll --time-style=full-iso $i | awk '\''{ print $6 }'\''`; mkdir -p $dirname; mv -v $i $dirname; done'
  54. if [[ "$TERM" == rxvt-unicode-256color || "$TERM" == xterm-256color ]]; then
  55. alias catimg='catimg -t'
  56. fi
  57. make_thumbs() { vcsi -g 5x4 -w 1920 -t --grid-spacing 0 "$*"; }
  58. make_thumbs_big() { vcsi -g 5x20 -w 1920 -t --grid-spacing 0 "$*"; }
  59. say() { echo "$@" | festival --tts; }
  60. play_midi() { fluidsynth -a alsa -m alsa_seq -j -g 2 -l -i /usr/share/soundfonts/FluidR3_GM.sf2 "$*"; }
  61. # enable color support
  62. if [ -x /usr/bin/dircolors ]; then
  63. eval "`dircolors -b`"
  64. #alias ls='ls --color=auto --group-directories-first'
  65. alias ls='ls --color=auto --literal'
  66. alias diff='diff --color=auto'
  67. alias grep='grep --color=auto'
  68. alias fgrep='fgrep --color=auto'
  69. alias egrep='egrep --color=auto'
  70. export -UT LS_COLORS=$LS_COLORS'ow=34;7:' ls_colors
  71. fi
  72. # host-specific aliases
  73. case "$host" in
  74. ( cluster )
  75. alias open='gnome-open'
  76. alias freenodes="pbsnodes | grep 'opteron' -A3 -B3 | grep 'state = free' -A2 -B1 | less"
  77. alias qm="qstat -a | grep $USER"
  78. alias get_gpu_node="qsub -I -W group_list=nbody_gpu -l nodes=1:ppn=1:gpus=1 -l pmem=1000mb -l mem=1000mb -l walltime=3:00:00"
  79. alias checkrun="showq | grep $USER | tail -n 1 | awk '{print $1}' | xargs qcat"
  80. alias usage='mmlsquota --block-size auto'
  81. ;;
  82. ( astro )
  83. alias open='kde-open'
  84. export VUSPACEHOST=`echo $USER | cut -b 1`
  85. alias mountvuspace="/sbin/mount.cifs //vuspace-$VUSPACEHOST/user ~/vuspace -o username=$USER"
  86. alias umountvuspace="/sbin/umount.cifs ~/vuspace"
  87. ;;
  88. ( linux )
  89. alias open='kde-open5'
  90. alias ssh='eval $(/usr/bin/keychain --eval --agents ssh --quick --quiet --timeout 480 ~/.ssh/id_rsa) && ssh'
  91. alias scp='eval $(/usr/bin/keychain --eval --agents ssh --quick --quiet --timeout 480 ~/.ssh/id_rsa) && scp'
  92. my_git() {
  93. case $* in
  94. ( push* ) shift; eval $(/usr/bin/keychain --eval --agents ssh --quick --quiet --timeout 480 ~/.ssh/id_rsa) && /usr/bin/git push "$@" ;;
  95. ( pull* ) shift; eval $(/usr/bin/keychain --eval --agents ssh --quick --quiet --timeout 480 ~/.ssh/id_rsa) && /usr/bin/git pull "$@" ;;
  96. ( * ) /usr/bin/git "$@" ;;
  97. esac
  98. }
  99. alias git='my_git'
  100. alias usage='/home/djsissom/Local/src/comcast-bw/comcastBandwidth.py'
  101. ;;
  102. ( osx )
  103. #alias ls='ls -G'
  104. alias ls='ls --color --literal'
  105. alias top='top -o cpu'
  106. alias ssh='if [[ `ssh-add -l` == "The agent has no identities." ]]; then ssh-add -t 28800; fi && ssh'
  107. alias rsync='if [[ `ssh-add -l` == "The agent has no identities." ]]; then ssh-add -t 28800; fi && rsync'
  108. alias man='man -M /usr/local/opt/coreutils/libexec/gnuman:$MANPATH'
  109. ;;
  110. esac
  111. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  112. # End
  113. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  114. # vi:syntax=sh filetype=sh