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
| #!/usr/bin/perl | |
| use strict; | |
| eval "use $ARGV[0]"; | |
| my $path=$ARGV[0]; | |
| $path =~ s/::/\//g; | |
| $path.='.pm'; | |
| my $location=$INC{$path}; |
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
| #!/usr/bin/python | |
| from Quartz import CGSessionCopyCurrentDictionary | |
| from sys import exit | |
| d = CGSessionCopyCurrentDictionary() | |
| exit( | |
| d | |
| and d.get("CGSSessionScreenIsLocked", 0) == 0 | |
| and d.get("kCGSSessionOnConsoleKey", 0) == 1 |
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
| #!/usr/bin/perl | |
| use strict; | |
| use URI::Escape; | |
| print uri_unescape($ARGV[0]) . "\n"; | |
| exit; |
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 engage='play -q -c2 -n synth whitenoise band -n 100 24 band -n 300 100 gain +20 &' |
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
| # mimic osx pbcopy/pbpaste | |
| alias pbcopy="xclip -selection clipboard -i" | |
| alias pbpaste="xclip -selection clipboard -o" |
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
| function finf() { | |
| find `pwd` \( \( -name .git -o -name '*.pyc' \) -prune \) \ | |
| -o \( -type f -print0 \) \ | |
| | xargs -0 grep -in --color "$@" 2>/dev/null; | |
| } |
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
| function hl() { egrep --color -ie $@ -e '$'; } | |
| # example: `cat some_file | hl what_i_want_highlighted` |
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
| NONE="\e[0m" | |
| RED="\e[0;31m" | |
| GREEN="\e[0;32m" | |
| function last_exit_prompt() { | |
| if [[ $? -eq 0 ]]; then | |
| PS1="${PS1}\n\[${GREEN}\]>> \[${NONE}\]" | |
| else | |
| PS1="${PS1}\n\[${RED}\]>> \[${NONE}\]" | |
| fi |
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
| function wipe_ve() { | |
| if [ "$VIRTUAL_ENV" ] && [[ $(pwd) != *`basename $VIRTUAL_ENV`* ]]; then | |
| deactivate | |
| fi | |
| } | |
| PROMPT_COMMAND="wipe_ve;$PROMPT_COMMAND" |
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
| function gs() { | |
| if [ -z $1 ]; then | |
| git status | |
| else | |
| git show $1 | |
| fi | |
| } |
OlderNewer