-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaliases
More file actions
executable file
·66 lines (53 loc) · 2.64 KB
/
Copy pathaliases
File metadata and controls
executable file
·66 lines (53 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
#To use these, add this file to one of your ~/.bashrc, ~/.profile, etc.
#eg: source ~/workspace/utils/aliases
#If you'd like, feel free to override any of these (esp for screen resolution/other minor preferences).
#If you wish to retain these settings, create a new alias file and source it after this one to override settings here.
export UTILS_JTEOH=$(cd `dirname $BASH_SOURCE` && pwd -P)
#Optional: use git -C functionality, only available in later version of git (1.8.5+).
#Thanks to this SO post for the commands: http://stackoverflow.com/questions/5083224/git-pull-while-not-in-a-git-directory
alias update-utils-jteoh='(cd $UTILS_JTEOH && git pull) && source $UTILS_JTEOH/aliases && echo "Update complete!"'
#cd into utils directory
alias utils-jteoh='cd $UTILS_JTEOH'
#shorthand for find by filename, case insensitive
alias f='find . -iname '
#shorthand for recursive fgrep
alias fgrepr='fgrep -r '
#literal grep against all files in this directory, recursive
alias findgrep="find . | fgrep "
#grep git's ls-ed files
alias gitgrep="git ls-files | fgrep "
#grep git's modified files
alias gitmodgrep="git ls-files --modified | fgrep "
#shorthand for recursive grep
alias grepr='grep -r '
# shorthand for git status (note: I never use ghostscript)
alias gs='git status'
#BBT Reference, yay rhotacism!
alias kripke="sed -e 's/[lr][lr]*/w/g' -e 's/[LR][LR]*/W/g' -e 's/ww*/w/g'"
#QUACK!
alias quack='echo QUACK QUACK'
alias giphy='$UTILS_JTEOH/giphy.sh $@'
alias giphy-gif='$UTILS_JTEOH/giphy.sh gif $@'
alias giphy-sticker='$UTILS_JTEOH/giphy.sh sticker $@'
alias giphy-translate='$UTILS_JTEOH/giphy.sh translate $@'
alias gg='giphy-gif'
alias asky='$UTILS_JTEOH/asky-io.sh $@'
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias scai='ssh clash@scai01.cs.ucla.edu'
# alias zion='ssh plsys-jia@zion-1.cs.ucla.edu'
# Note: deprecated now that zion-12 is no longer a master
alias zion='ssh plsys-jia@zion-12.cs.ucla.edu'
alias buckeye='ssh plsys-jia@buckeye.cs.ucla.edu'
# for accessing through lion
# deprecated for same reason as zion alias
alias zion-proxy='ssh -J jteoh@lion.cs.ucla.edu plsys-jia@zion-12.cs.ucla.edu'
alias buckeye-proxy='ssh -J jteoh@lion.cs.ucla.edu plsys-jia@buckeye.cs.ucla.edu'
alias scp-proxy='scp -oProxyJump=lion.cs.ucla.edu '
alias ssh-cratis='ssh -i ~/.ssh/jvvm_ec2.pem ec2-user@ec2-3-18-131-23.us-east-2.compute.amazonaws.com'
alias pika='cat $UTILS_JTEOH/pika_ascii.txt'
# archive, recursive, z=compress, e=use ssh protocol,
# v=verbose, h=human-readable, delete files that don't exist remotely,
# show progress
alias myrsync='rsync -arzh -e ssh -h --progress --delete '
alias dry-myrsync='myrsync --dry-run '