Mercurial > index.cgi > dotfiles
annotate .bash_aliases @ 146:472a38df3aed
Add 'jobs' to ignore list
| author | Steve Huston <huston@astro.princeton.edu> | 
|---|---|
| date | Wed, 07 Sep 2016 11:54:18 -0400 | 
| parents | 4cd1f5ebaaa9 | 
| children | cfbaaeb8b71d | 
| rev | line source | 
|---|---|
| 19 
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
15diff
changeset | 1 # $Id$ | 
| 
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
15diff
changeset | 2 | 
| 
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
15diff
changeset | 3 # Aliases are read from this file; no real reason to separate them out except | 
| 
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
15diff
changeset | 4 # for readability. | 
| 
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
15diff
changeset | 5 | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 6 # Some settings which are architecture dependent | 
| 15 
fe83d9892ee3
Replaced tests with a 'case' in .bash_aliases
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
13diff
changeset | 7 case `uname` in | 
| 30 
ca6c77fe843b
* Whitespace (ugh)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
26diff
changeset | 8 Darwin) | 
| 
ca6c77fe843b
* Whitespace (ugh)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
26diff
changeset | 9 # DARWIN is used for the SSHFS mounts below | 
| 
ca6c77fe843b
* Whitespace (ugh)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
26diff
changeset | 10 DARWIN="yes" | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 11 | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 12 # The 'stat' and 'date' commands are here since the syntax of the commands | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 13 # is different between Linux and Mac OS X. If this is run elsewhere, the | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 14 # eval will be false and the test not done below, so it's safe to not | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 15 # bother checking for zero-length variables on the test - it just won't | 
| 82 
0b67280c980c
Reword comment (no more svn)
 Steve Huston <huston@srhuston.net> parents: 
75diff
changeset | 16 # run the hg incoming, so you won't be prompted if there's newer files | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 17 # available in your repository. These are safe to export since they're | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 18 # the commands to be evaulated, not the output - you're storing how to get | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 19 # the answer, not the answer itself. | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 20 | 
| 41 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 21 # Also note, the full paths are stored since GNU coreutils might be | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 22 # installed; while that would tend to make things "easier" since the GNU | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 23 # one is the same as the Linux ones below, it can't be guaranteed. | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 24 # Instead of checking for the presence of /opt/local/bin/ls (or gls) it's | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 25 # easier to point directly to the one you know *is* installed. | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 26 | 
| 41 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 27 DFSTAT="/usr/bin/stat -f %m -t %s $HOME/.dotfilets" | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 28 MDATE="/bin/date -v -1m +%s" | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 29 TDSTAT="/usr/bin/stat -f %m -t %s $HOME/.todo" | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 30 HDATE="/bin/date -v -1H +%s" | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 31 | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 32 alias ls='/bin/ls -FG' | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 33 | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 34 VNCVIEWER="open vnc://" | 
| 30 
ca6c77fe843b
* Whitespace (ugh)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
26diff
changeset | 35 ;; | 
| 8 
aa5e55aa62ef
Moved specific section to top of .bash_aliases, so other bits can be set based
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
3diff
changeset | 36 | 
| 30 
ca6c77fe843b
* Whitespace (ugh)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
26diff
changeset | 37 Linux) | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 38 # See above for a description of these four | 
| 41 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 39 DFSTAT="/usr/bin/stat -c %Y $HOME/.dotfilets" | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 40 MDATE="/bin/date -d \"1 month ago\" +%s" | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 41 TDSTAT="/usr/bin/stat -c %Y $HOME/.todo" | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 42 HDATE="/bin/date -d \"1 hour ago\" +%s" | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 43 | 
| 41 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 44 alias ls='/bin/ls --color=auto -F' | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 45 | 
| 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 46 VNCVIEWER="vncviewer Shared=1 Fullcolor=1 " | 
| 30 
ca6c77fe843b
* Whitespace (ugh)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
26diff
changeset | 47 ;; | 
| 15 
fe83d9892ee3
Replaced tests with a 'case' in .bash_aliases
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
13diff
changeset | 48 esac | 
| 8 
aa5e55aa62ef
Moved specific section to top of .bash_aliases, so other bits can be set based
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
3diff
changeset | 49 | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 50 # Export some of those above for the benefit of future shells | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 51 export DFSTAT MDATE TDSTAT HDATE | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 52 | 
| 1 
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
0diff
changeset | 53 # SSH aliases | 
| 138 
4cd1f5ebaaa9
Even more explicit with csesbh
 Steve Huston <huston@srhuston.net> parents: 
137diff
changeset | 54 alias bh='ssh csesbh.princeton.edu' | 
| 2 
2b4dcc885071
Alphabetized aliases for easier sorting
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
1diff
changeset | 55 alias dh='ssh srhuston.net' | 
| 135 
dead87cd99ae
13->bh, and a hostkeys alias so I don't have to keep remembering it
 Steve Huston <huston@astro.princeton.edu> parents: 
128diff
changeset | 56 alias hostkeys='scp root@xanadu-vm:/etc/ssh/ssh_known_hosts . && vim -d /etc/ssh_known_hosts ssh_known_hosts && sudo mv ssh_known_hosts /etc/ssh_known_hosts' | 
| 0 | 57 alias j='ssh joshua.srhuston.net' | 
| 26 
e14a0b4fab30
* Rename private keys in ~/.ssh/ to <name>.pvt so the keys alias can just add
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
25diff
changeset | 58 alias keys='ssh-add $HOME/.ssh/*.pvt' | 
| 1 
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
0diff
changeset | 59 alias r='ssh -l root' | 
| 138 
4cd1f5ebaaa9
Even more explicit with csesbh
 Steve Huston <huston@srhuston.net> parents: 
137diff
changeset | 60 alias rbh='ssh -t csesbh.princeton.edu screen -raAx csesbh' | 
| 65 | 61 alias rj='ssh -t joshua.srhuston.net screen -raAx' | 
| 62 alias rx='ssh -t xanadu.astro.princeton.edu screen -raAx' | |
| 1 
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
0diff
changeset | 63 alias roc='ssh zenoss@rocinante' | 
| 2 
2b4dcc885071
Alphabetized aliases for easier sorting
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
1diff
changeset | 64 alias s=ssh | 
| 60 
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
56diff
changeset | 65 t() { | 
| 
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
56diff
changeset | 66 T_HOST=xanadu.astro.princeton.edu | 
| 
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
56diff
changeset | 67 if [ -n "$2" ] ; then | 
| 
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
56diff
changeset | 68 T_HOST=$2 | 
| 
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
56diff
changeset | 69 fi | 
| 
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
56diff
changeset | 70 ssh -t $T_HOST "ssh $1" | 
| 
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
56diff
changeset | 71 } | 
| 65 | 72 alias x='ssh xanadu.astro.princeton.edu' | 
| 73 | |
| 102 
ecb2cac8df97
Added tukey to clusterlist
 Steve Huston <huston@astro.princeton.edu> parents: 
100diff
changeset | 74 export CLUSTERLIST="adroit della hecate mcmillan orbital tiger tigressdata tukey" | 
| 65 | 75 cdsh() { | 
| 76 for H in $CLUSTERLIST ; do | |
| 77 echo $H": " | |
| 78 ssh $H $@ | |
| 79 done | |
| 80 } | |
| 1 
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
0diff
changeset | 81 | 
| 12 
08bf77c6174f
Added bynarr alias (rdesktop)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
10diff
changeset | 82 # Remote desktop/VNC | 
| 91 
9d5fcbb36232
Reordering some alises for completeness
 Steve Huston <huston@astro.princeton.edu> parents: 
90diff
changeset | 83 eval "alias milton='ssh -L9930:milton:5900 -f joshua.srhuston.net \"/sbin/ether-wake 00:17:f2:01:d2:3c ; sleep 30\"; sleep 10; ${VNCVIEWER}localhost:9930 &'" | 
| 54 
214cd70bd3f2
* Added 'xvnc' to VNC to Xastir instance
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
53diff
changeset | 84 eval "alias xvnc='ssh -L9910:localhost:5901 -f joshua.srhuston.net \"sleep 5\"; ${VNCVIEWER}localhost:9910 &'" | 
| 49 
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
45diff
changeset | 85 eval "alias xanadu='ssh -L9920:localhost:5900 -f xanadu.astro.princeton.edu \"sleep 300\"; ${VNCVIEWER}localhost:9920 &'" | 
| 121 | 86 eval "alias xvm='ssh -L9909:localhost:5909 -f xanadu.astro.princeton.edu \"sleep 300\"; ${VNCVIEWER}localhost:9909 &'" | 
| 56 
326071a2c195
* Added alias for starting vnc server (mostly for Xastir on Joshua)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
54diff
changeset | 87 alias start-vnc='vncserver -geometry 1600x1178 -depth 24 -nohttpd' | 
| 12 
08bf77c6174f
Added bynarr alias (rdesktop)
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
10diff
changeset | 88 | 
| 1 
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
0diff
changeset | 89 # Programs | 
| 3 
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
2diff
changeset | 90 alias atari='atari800 -height 800 -width 600' | 
| 2 
2b4dcc885071
Alphabetized aliases for easier sorting
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
1diff
changeset | 91 alias base64='openssl enc -a' | 
| 0 | 92 alias bsr='bigscreen -raAx' | 
| 26 
e14a0b4fab30
* Rename private keys in ~/.ssh/ to <name>.pvt so the keys alias can just add
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
25diff
changeset | 93 alias irssi-test='irssi --home=$HOME/irssi-test/' | 
| 73 
09b915fb36b8
* JT-65 alias for Wine on the home (ham shack) computer
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
72diff
changeset | 94 alias jt65='wine /Users/huston/.wine/drive_c/Program\ Files/jt65hf109/jt65-hf.exe' | 
| 51 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 95 alias pine='alpine' | 
| 2 
2b4dcc885071
Alphabetized aliases for easier sorting
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
1diff
changeset | 96 alias ret='screen -raAx' | 
| 
2b4dcc885071
Alphabetized aliases for easier sorting
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
1diff
changeset | 97 alias rot13="tr 'a-zA-Z' 'n-za-mN-ZA-M'" | 
| 26 
e14a0b4fab30
* Rename private keys in ~/.ssh/ to <name>.pvt so the keys alias can just add
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
25diff
changeset | 98 alias stendhal="java -jar $HOME/Installs/stendhal/stendhal-*.jar" | 
| 91 
9d5fcbb36232
Reordering some alises for completeness
 Steve Huston <huston@astro.princeton.edu> parents: 
90diff
changeset | 99 alias tops='unset STY; screen -c .screenrc.pbstops -S pbstop' | 
| 2 
2b4dcc885071
Alphabetized aliases for easier sorting
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
1diff
changeset | 100 alias vi='vim' | 
| 0 | 101 | 
| 1 
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
0diff
changeset | 102 # SSHFS mounts | 
| 8 
aa5e55aa62ef
Moved specific section to top of .bash_aliases, so other bits can be set based
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
3diff
changeset | 103 # The $DARWIN check fills in a nice volname if this is a Mac | 
| 26 
e14a0b4fab30
* Rename private keys in ~/.ssh/ to <name>.pvt so the keys alias can just add
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
25diff
changeset | 104 alias junkpile="sshfs -oreconnect${DARWIN:+,volname=Junkpile} srhuston.net:junkpile $HOME/junkpile" | 
| 91 
9d5fcbb36232
Reordering some alises for completeness
 Steve Huston <huston@astro.princeton.edu> parents: 
90diff
changeset | 105 alias sdh="sshfs -oreconnect${DARWIN:+,volname=srhuston.net} srhuston.net: $HOME/srhuston.net" | 
| 26 
e14a0b4fab30
* Rename private keys in ~/.ssh/ to <name>.pvt so the keys alias can just add
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
25diff
changeset | 106 alias sj="sshfs -oreconnect${DARWIN:+,volname=Joshua} joshua.srhuston.net: $HOME/joshua" | 
| 41 
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
40diff
changeset | 107 alias ssy="sshfs -oreconnect${DARWIN:+,volname=Syrinx} syrinx.astro.princeton.edu: $HOME/syrinx" | 
| 26 
e14a0b4fab30
* Rename private keys in ~/.ssh/ to <name>.pvt so the keys alias can just add
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
25diff
changeset | 108 alias sx="sshfs -oreconnect${DARWIN:+,volname=Xanadu} xanadu.astro.princeton.edu: $HOME/xanadu" | 
| 107 
b955aa106b9a
Added 'vw' alias for sshfs
 Steve Huston <huston@astro.princeton.edu> parents: 
102diff
changeset | 109 alias vw="sshfs -oreconnect${DARWIN:+,volname=VW} vw.math.princeton.edu: $HOME/vw" | 
| 13 
dacbbae5965c
Added Ruby setup variables
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
12diff
changeset | 110 | 
| 51 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 111 # LDAP/host tools | 
| 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 112 alias ldm="ldapmodify -Z -x -W -c -D 'cn=DrAdmin,dc=astro,dc=princeton,dc=edu'" | 
| 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 113 alias ldsloop='while true; do read; clear; lds "$REPLY"; done' | 
| 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 114 alias hostmaster='ssh -x -a huston@arizona.princeton.edu /usr/oit/bin/hostinfo' | 
| 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 115 | 
| 90 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 116 lds () { | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 117 QUERY="$1" | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 118 shift | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 119 OPTS="" | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 120 [[ "$1" =~ ^- ]] && { | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 121 OPTS="$1" | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 122 shift | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 123 } | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 124 ldapsearch -LLL $OPTS -x "($QUERY)" $@ | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 125 } | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 126 | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 127 ldsauth () { | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 128 QUERY="$1" | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 129 shift | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 130 OPTS="" | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 131 [[ "$1" =~ ^- ]] && { | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 132 OPTS="$1" | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 133 shift | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 134 } | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 135 ldapsearch -LLL -Z -W -D cn=DrAdmin,dc=astro,dc=princeton,dc=edu $OPTS -x "($QUERY)" $@ | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 136 } | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 137 | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 138 ldapsync() { | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 139 for H in ldap ldap2 ldap3 ; do | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 140 echo -ne $H":\t" | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 141 ldapsearch -LLL -h $H.astro.princeton.edu -x -s base '(objectclass=*)' contextCSN | egrep -v '^($|dn)' | sed 's/contextCSN: //' | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 142 done | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 143 echo -ne "now:\t" | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 144 date -u +%Y%m%d%H%M%S | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 145 } | 
| 
cdfa42697eec
Updated lds, added ldsauth and ldapsync
 Steve Huston <huston@astro.princeton.edu> parents: 
82diff
changeset | 146 | 
| 108 
7da995f48c91
Hibernation aliases (mostly for the Mac laptop)
 Steve Huston <huston@astro.princeton.edu> parents: 
107diff
changeset | 147 # Some hibernation tricks on the Mac | 
| 
7da995f48c91
Hibernation aliases (mostly for the Mac laptop)
 Steve Huston <huston@astro.princeton.edu> parents: 
107diff
changeset | 148 alias hibernate="sudo pmset -a hibernatemode 25 ; pmset -g live | grep hibernatemode" | 
| 
7da995f48c91
Hibernation aliases (mostly for the Mac laptop)
 Steve Huston <huston@astro.princeton.edu> parents: 
107diff
changeset | 149 alias onlysleep="sudo pmset -a hibernatemode 0 ; pmset -g live | grep hibernatemode" | 
| 
7da995f48c91
Hibernation aliases (mostly for the Mac laptop)
 Steve Huston <huston@astro.princeton.edu> parents: 
107diff
changeset | 150 alias safesleep="sudo pmset -a hibernatemode 3 ; pmset -g live | grep hibernatemode" | 
| 
7da995f48c91
Hibernation aliases (mostly for the Mac laptop)
 Steve Huston <huston@astro.princeton.edu> parents: 
107diff
changeset | 151 alias sleepmode="pmset -g live | grep hibernatemode" | 
| 
7da995f48c91
Hibernation aliases (mostly for the Mac laptop)
 Steve Huston <huston@astro.princeton.edu> parents: 
107diff
changeset | 152 | 
| 13 
dacbbae5965c
Added Ruby setup variables
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
12diff
changeset | 153 # Other | 
| 60 
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
56diff
changeset | 154 alias condor_check="ls -lat /u/condor/hosts/*/log/MasterLog" | 
| 50 
407b3bac9cb0
Added 'slurp' alias for pulling content from a web directory
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
49diff
changeset | 155 alias slurp="wget -r -l1 -np -nd -A.mp3" | 
| 15 
fe83d9892ee3
Replaced tests with a 'case' in .bash_aliases
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
13diff
changeset | 156 | 
| 51 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 157 # Other Functions | 
| 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 158 | 
| 113 | 159 mc-backup() { | 
| 160 pushd ~/Dropbox/Saves/minecraft/saves; | |
| 161 if [ -d $1 ]; then | |
| 162 tar cvf - $1 | bzip2 > ../$1_`date +%Y%m%d%H%M%S`.tar.bz2; | |
| 163 fi; | |
| 164 popd | |
| 165 } | |
| 166 | |
| 100 | 167 tock() { | 
| 168 while true ; do | |
| 169 if [ `date +%S` -gt 42 ] ; then | |
| 170 if [ `date +%S` -lt 47 ] ; then | |
| 171 afplay /System/Library/Sounds/Pop.aiff & | |
| 172 fi | |
| 173 fi | |
| 174 sleep 1 | |
| 175 done > /dev/null 2>&1 | |
| 176 } | |
| 51 
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
50diff
changeset | 177 | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 178 update_toodledo() { | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 179 case `hostname -s` in | 
| 43 
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
42diff
changeset | 180 xanadu|syrinx) | 
| 
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
42diff
changeset | 181 TOODLEDO_CMDS="toodledo tasks @Work; toodledo tasks @Anywhere" | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 182 ;; | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 183 | 
| 49 
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
45diff
changeset | 184 milton|joshua) | 
| 43 
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
42diff
changeset | 185 TOODLEDO_CMDS="toodledo tasks @Home; toodledo tasks @Anywhere" | 
| 
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
42diff
changeset | 186 ;; | 
| 
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
42diff
changeset | 187 | 
| 
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
42diff
changeset | 188 rapture) | 
| 
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
42diff
changeset | 189 TOODLEDO_CMDS="toodledo tasks @Anywhere" | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 190 ;; | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 191 esac | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 192 | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 193 [[ -e $HOME/.todo.$$ ]] && return | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 194 | 
| 44 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 195 eval $TOODLEDO_CMDS | egrep '^<[0-9]+>' | ( | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 196 set -f | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 197 while read TASK ; do | 
| 45 
183d95ce098c
* More portable, should work on Linux (previous one needed another escape
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
44diff
changeset | 198 | 
| 
183d95ce098c
* More portable, should work on Linux (previous one needed another escape
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
44diff
changeset | 199 if echo $TASK | grep -v 'startdate\[' ; then | 
| 44 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 200 continue | 
| 45 
183d95ce098c
* More portable, should work on Linux (previous one needed another escape
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
44diff
changeset | 201 fi | 
| 44 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 202 | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 203 TODAY=`date "+%Y/%m/%d"` | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 204 STARTDATE=`echo $TASK | sed 's/.*startdate\[\([^ [.].]]*\)\].*/\1/'` | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 205 [[ "$TODAY" > "$STARTDATE" || "$TODAY" == "$STARTDATE" ]] && echo $TASK | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 206 | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 207 done | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 208 ) >> $HOME/.todo.$$ | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 209 | 
| 34 
82fde4c9245c
* Date option on Macs is -H, not -h
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
33diff
changeset | 210 [[ $? -eq 255 ]] && { | 
| 
82fde4c9245c
* Date option on Macs is -H, not -h
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
33diff
changeset | 211 # Update failed; clean up & don't do it again. | 
| 
82fde4c9245c
* Date option on Macs is -H, not -h
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
33diff
changeset | 212 rm $HOME/.todo.$$ | 
| 
82fde4c9245c
* Date option on Macs is -H, not -h
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
33diff
changeset | 213 touch $HOME/.todo | 
| 
82fde4c9245c
* Date option on Macs is -H, not -h
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
33diff
changeset | 214 return | 
| 
82fde4c9245c
* Date option on Macs is -H, not -h
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
33diff
changeset | 215 } | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 216 echo "To-do list as of `date`" > $HOME/.todo | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 217 echo "---------------------------------------------" >> $HOME/.todo | 
| 44 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 218 egrep '#\[[0-9]+/[0-9]+/[0-9]+' $HOME/.todo.$$| sort -k 6.3 >> $HOME/.todo | 
| 
0fc97adb3d7a
* Hide future tasks
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
43diff
changeset | 219 egrep -v '(#\[[0-9]+/[0-9]+/[0-9]+|status\[(Delegated|Waiting|Hold|Postponed|Someday|Canceled|Reference)\])' $HOME/.todo.$$ >> $HOME/.todo | 
| 33 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 220 rm $HOME/.todo.$$ | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 221 } | 
| 
f59f847377d7
* Added toodledo interfacing
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
30diff
changeset | 222 | 
| 63 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 223 TOhtml() { | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 224 OUTDIR=`mktemp -d TOHTML.XXXXXX` | 
| 75 
7d4e0869d09d
Use 'hg locate' instead of 'svn ls -R'
 Steve Huston <huston@srhuston.net> parents: 
73diff
changeset | 225 for F in `hg locate` ; do | 
| 63 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 226 if [ -d $F ] ; then | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 227 continue | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 228 fi | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 229 | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 230 # Files to ignore from the list | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 231 case $F in | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 232 .vim/plugin/gnupg.vim | \ | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 233 .vim/syntax/syslog.vim| \ | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 234 .vim/syntax/yum.vim \ | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 235 ) | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 236 continue | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 237 ;; | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 238 *) | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 239 ;; | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 240 esac | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 241 | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 242 OUT=`echo $F | sed -e 's/^\.//' -e 's,.*/,,'` | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 243 vim -e +TOhtml "+w ${OUTDIR}/${OUT}.html" +qa\! $F | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 244 done | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 245 echo Files stored in $OUTDIR | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 246 } | 
| 
590b4d17d933
* TOhtml function that makes pretty prints of all the dotfiles for display
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
62diff
changeset | 247 | 
| 125 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 248 hgs() { | 
| 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 249 # Currently works on Macs, I should write a version for Linux as well | 
| 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 250 # someday | 
| 128 
4b397e94691a
Why didn't I know 'hg root' existed.. much cleaner.
 Steve Huston <huston@astro.princeton.edu> parents: 
125diff
changeset | 251 ROOT=`hg root` | 
| 
4b397e94691a
Why didn't I know 'hg root' existed.. much cleaner.
 Steve Huston <huston@astro.princeton.edu> parents: 
125diff
changeset | 252 if [ "$1" == "end" -a -e $ROOT/.hg/hgserve-PID ] ; then | 
| 
4b397e94691a
Why didn't I know 'hg root' existed.. much cleaner.
 Steve Huston <huston@astro.princeton.edu> parents: 
125diff
changeset | 253 kill `cat $ROOT/.hg/hgserve-PID` | 
| 
4b397e94691a
Why didn't I know 'hg root' existed.. much cleaner.
 Steve Huston <huston@astro.princeton.edu> parents: 
125diff
changeset | 254 rm $ROOT/.hg/hgserve-PID | 
| 
4b397e94691a
Why didn't I know 'hg root' existed.. much cleaner.
 Steve Huston <huston@astro.princeton.edu> parents: 
125diff
changeset | 255 elif [ -e $ROOT/.hg/hgserve-PID ] ; then | 
| 
4b397e94691a
Why didn't I know 'hg root' existed.. much cleaner.
 Steve Huston <huston@astro.princeton.edu> parents: 
125diff
changeset | 256 P=`cat $ROOT/.hg/hgserve-PID` | 
| 125 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 257 URL=`lsof -p $P | grep LISTEN | awk '{print $9}'` | 
| 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 258 open http://$URL/ | 
| 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 259 else | 
| 128 
4b397e94691a
Why didn't I know 'hg root' existed.. much cleaner.
 Steve Huston <huston@astro.princeton.edu> parents: 
125diff
changeset | 260 hg serve -a localhost -d -p 0 --pid-file $ROOT/.hg/hgserve-PID | sed 's#.*bound to \(.*\))#http://\1/#' | xargs open | 
| 125 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 261 fi | 
| 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 262 } | 
| 
28c2ddd02e8f
Replace hgs alias with function
 Steve Huston <huston@astro.princeton.edu> parents: 
124diff
changeset | 263 | 
| 15 
fe83d9892ee3
Replaced tests with a 'case' in .bash_aliases
 huston@80426f53-59d1-405d-934b-f07cd76f4a1a parents: 
13diff
changeset | 264 # vim: set filetype=sh : | 
