Mercurial > index.cgi > dotfiles
annotate .bash_aliases @ 61:d59d16a55494
* Added test to dotfile check which aborts if no keys loaded
* Added .screenrc.pbstops for pbstop screen session
* Aliases for cses13, 't cses13' and 'tops'
author | huston@80426f53-59d1-405d-934b-f07cd76f4a1a |
---|---|
date | Mon, 09 Jul 2012 16:57:42 +0000 |
parents | c27db9abf42c |
children | 51ba91e3b3e2 |
rev | line source |
---|---|
19
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
15
diff
changeset
|
1 # $Id$ |
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
15
diff
changeset
|
2 |
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
15
diff
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:
15
diff
changeset
|
4 # for readability. |
f65964738bab
Added Id tag to files, and svn propset svn:keywords as appropriate
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
15
diff
changeset
|
5 |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
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:
13
diff
changeset
|
7 case `uname` in |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
26
diff
changeset
|
8 Darwin) |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
26
diff
changeset
|
9 # DARWIN is used for the SSHFS mounts below |
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
26
diff
changeset
|
10 DARWIN="yes" |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
11 |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
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:
30
diff
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:
30
diff
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:
30
diff
changeset
|
15 # bother checking for zero-length variables on the test - it just won't |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
16 # run the svn status, so you won't be prompted if there's newer files |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
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:
30
diff
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:
30
diff
changeset
|
19 # the answer, not the answer itself. |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
20 |
41
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
40
diff
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:
40
diff
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:
40
diff
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:
40
diff
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:
40
diff
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:
30
diff
changeset
|
26 |
41
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
40
diff
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:
40
diff
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:
40
diff
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:
40
diff
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:
40
diff
changeset
|
31 |
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
40
diff
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:
40
diff
changeset
|
33 |
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
40
diff
changeset
|
34 VNCVIEWER="open vnc://" |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
26
diff
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:
3
diff
changeset
|
36 |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
26
diff
changeset
|
37 Linux) |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
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:
40
diff
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:
40
diff
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:
40
diff
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:
40
diff
changeset
|
42 HDATE="/bin/date -d \"1 hour ago\" +%s" |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
43 |
41
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
40
diff
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:
40
diff
changeset
|
45 |
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
40
diff
changeset
|
46 VNCVIEWER="vncviewer Shared=1 Fullcolor=1 " |
30
ca6c77fe843b
* Whitespace (ugh)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
26
diff
changeset
|
47 ;; |
15
fe83d9892ee3
Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
13
diff
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:
3
diff
changeset
|
49 |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
50 # Export some of those above for the benefit of future shells |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
51 export DFSTAT MDATE TDSTAT HDATE |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
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:
0
diff
changeset
|
53 # SSH aliases |
2
2b4dcc885071
Alphabetized aliases for easier sorting
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
54 alias dh='ssh srhuston.net' |
0 | 55 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:
25
diff
changeset
|
56 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:
0
diff
changeset
|
57 alias r='ssh -l root' |
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
0
diff
changeset
|
58 alias roc='ssh zenoss@rocinante' |
2
2b4dcc885071
Alphabetized aliases for easier sorting
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
59 alias s=ssh |
2b4dcc885071
Alphabetized aliases for easier sorting
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
60 alias x='ssh xanadu.astro.princeton.edu' |
60
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
56
diff
changeset
|
61 t() { |
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
56
diff
changeset
|
62 T_HOST=xanadu.astro.princeton.edu |
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
56
diff
changeset
|
63 if [ -n "$2" ] ; then |
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
56
diff
changeset
|
64 T_HOST=$2 |
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
56
diff
changeset
|
65 fi |
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
56
diff
changeset
|
66 ssh -t $T_HOST "ssh $1" |
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
56
diff
changeset
|
67 } |
61
d59d16a55494
* Added test to dotfile check which aborts if no keys loaded
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
60
diff
changeset
|
68 alias 13='ssh cses13' |
d59d16a55494
* Added test to dotfile check which aborts if no keys loaded
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
60
diff
changeset
|
69 alias t13='t cses13' |
1
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
0
diff
changeset
|
70 |
12
08bf77c6174f
Added bynarr alias (rdesktop)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
10
diff
changeset
|
71 # Remote desktop/VNC |
54
214cd70bd3f2
* Added 'xvnc' to VNC to Xastir instance
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
53
diff
changeset
|
72 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:
45
diff
changeset
|
73 eval "alias xanadu='ssh -L9920:localhost:5900 -f xanadu.astro.princeton.edu \"sleep 300\"; ${VNCVIEWER}localhost:9920 &'" |
42
998337c2b6f2
* eval aliases instead of parsing live
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
41
diff
changeset
|
74 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 &'" |
49
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
45
diff
changeset
|
75 eval "alias gala='ssh -L9940:gala:5900 -f joshua.srhuston.net \"/sbin/ether-wake 00:14:51:0d:94:e4 ; sleep 30\"; sleep 10; ${VNCVIEWER}localhost:9940 &'" |
56
326071a2c195
* Added alias for starting vnc server (mostly for Xastir on Joshua)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
54
diff
changeset
|
76 alias start-vnc='vncserver -geometry 1600x1178 -depth 24 -nohttpd' |
12
08bf77c6174f
Added bynarr alias (rdesktop)
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
10
diff
changeset
|
77 |
1
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
0
diff
changeset
|
78 # Programs |
3
072b183989e0
Merged in changes for the Mac, including the beginnings of platform
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
2
diff
changeset
|
79 alias atari='atari800 -height 800 -width 600' |
2
2b4dcc885071
Alphabetized aliases for easier sorting
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
80 alias base64='openssl enc -a' |
0 | 81 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:
25
diff
changeset
|
82 alias irssi-test='irssi --home=$HOME/irssi-test/' |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
83 alias pine='alpine' |
2
2b4dcc885071
Alphabetized aliases for easier sorting
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
84 alias ret='screen -raAx' |
2b4dcc885071
Alphabetized aliases for easier sorting
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
85 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:
25
diff
changeset
|
86 alias stendhal="java -jar $HOME/Installs/stendhal/stendhal-*.jar" |
2
2b4dcc885071
Alphabetized aliases for easier sorting
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
1
diff
changeset
|
87 alias vi='vim' |
61
d59d16a55494
* Added test to dotfile check which aborts if no keys loaded
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
60
diff
changeset
|
88 alias tops='unset STY; screen -c .screenrc.pbstops -S pbstop' |
0 | 89 |
1
7e33b3191cf7
Merged in settings from home, and at the same time edited some of the
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
0
diff
changeset
|
90 # 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:
3
diff
changeset
|
91 # 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:
25
diff
changeset
|
92 alias junkpile="sshfs -oreconnect${DARWIN:+,volname=Junkpile} srhuston.net:junkpile $HOME/junkpile" |
e14a0b4fab30
* Rename private keys in ~/.ssh/ to <name>.pvt so the keys alias can just add
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
25
diff
changeset
|
93 alias sj="sshfs -oreconnect${DARWIN:+,volname=Joshua} joshua.srhuston.net: $HOME/joshua" |
e14a0b4fab30
* Rename private keys in ~/.ssh/ to <name>.pvt so the keys alias can just add
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
25
diff
changeset
|
94 alias sdh="sshfs -oreconnect${DARWIN:+,volname=srhuston.net} srhuston.net: $HOME/srhuston.net" |
41
2bea356b1032
* Added default screenrc from Linux (and the Screen installation) to .screenrc
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
40
diff
changeset
|
95 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:
25
diff
changeset
|
96 alias sx="sshfs -oreconnect${DARWIN:+,volname=Xanadu} xanadu.astro.princeton.edu: $HOME/xanadu" |
13
dacbbae5965c
Added Ruby setup variables
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
12
diff
changeset
|
97 |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
98 # LDAP/host tools |
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
99 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:
50
diff
changeset
|
100 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:
50
diff
changeset
|
101 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:
50
diff
changeset
|
102 |
13
dacbbae5965c
Added Ruby setup variables
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
12
diff
changeset
|
103 # Other |
60
c27db9abf42c
* Removed 'sy' alias - syrinx is no more
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
56
diff
changeset
|
104 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:
49
diff
changeset
|
105 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:
13
diff
changeset
|
106 |
51
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
107 # Other Functions |
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
108 |
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
109 lds() { |
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
110 QUERY="$1" |
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
111 shift |
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
112 ldapsearch -LLL -x "($QUERY)" $@ |
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
113 } |
44c36681ca0f
* Removed many double quotes from tests; they caused the tests to pass on
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
50
diff
changeset
|
114 |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
115 update_toodledo() { |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
116 case `hostname -s` in |
43
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
42
diff
changeset
|
117 xanadu|syrinx) |
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
42
diff
changeset
|
118 TOODLEDO_CMDS="toodledo tasks @Work; toodledo tasks @Anywhere" |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
119 ;; |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
120 |
49
8d204a89b981
* Local Perl install paths weren't quite right - they assumed a link existed
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
45
diff
changeset
|
121 milton|joshua) |
43
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
42
diff
changeset
|
122 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:
42
diff
changeset
|
123 ;; |
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
42
diff
changeset
|
124 |
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
42
diff
changeset
|
125 rapture) |
0a7d093f4c04
* Changed Toodledo sorts/greps based on context, not folder
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
42
diff
changeset
|
126 TOODLEDO_CMDS="toodledo tasks @Anywhere" |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
127 ;; |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
128 esac |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
129 |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
130 [[ -e $HOME/.todo.$$ ]] && return |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
131 |
44
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
132 eval $TOODLEDO_CMDS | egrep '^<[0-9]+>' | ( |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
133 set -f |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
134 while read TASK ; do |
45
183d95ce098c
* More portable, should work on Linux (previous one needed another escape
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
44
diff
changeset
|
135 |
183d95ce098c
* More portable, should work on Linux (previous one needed another escape
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
44
diff
changeset
|
136 if echo $TASK | grep -v 'startdate\[' ; then |
44
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
137 continue |
45
183d95ce098c
* More portable, should work on Linux (previous one needed another escape
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
44
diff
changeset
|
138 fi |
44
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
139 |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
140 TODAY=`date "+%Y/%m/%d"` |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
141 STARTDATE=`echo $TASK | sed 's/.*startdate\[\([^ [.].]]*\)\].*/\1/'` |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
142 [[ "$TODAY" > "$STARTDATE" || "$TODAY" == "$STARTDATE" ]] && echo $TASK |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
143 |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
144 done |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
145 ) >> $HOME/.todo.$$ |
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
146 |
34
82fde4c9245c
* Date option on Macs is -H, not -h
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
147 [[ $? -eq 255 ]] && { |
82fde4c9245c
* Date option on Macs is -H, not -h
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
148 # 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:
33
diff
changeset
|
149 rm $HOME/.todo.$$ |
82fde4c9245c
* Date option on Macs is -H, not -h
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
150 touch $HOME/.todo |
82fde4c9245c
* Date option on Macs is -H, not -h
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
151 return |
82fde4c9245c
* Date option on Macs is -H, not -h
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
33
diff
changeset
|
152 } |
33
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
153 echo "To-do list as of `date`" > $HOME/.todo |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
154 echo "---------------------------------------------" >> $HOME/.todo |
44
0fc97adb3d7a
* Hide future tasks
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
43
diff
changeset
|
155 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:
43
diff
changeset
|
156 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:
30
diff
changeset
|
157 rm $HOME/.todo.$$ |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
158 } |
f59f847377d7
* Added toodledo interfacing
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
30
diff
changeset
|
159 |
15
fe83d9892ee3
Replaced tests with a 'case' in .bash_aliases
huston@80426f53-59d1-405d-934b-f07cd76f4a1a
parents:
13
diff
changeset
|
160 # vim: set filetype=sh : |