-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
62 lines (46 loc) · 1.76 KB
/
aliases
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
# Shortcuts
alias pyc="/Applications/PyCharm.app/Contents/MacOS/pycharm"
# aws-vault
alias awsv="aws-vault exec tyler -- aws"
# git
alias gs="git stash"
alias gsp="git stash pop"
alias gbd="git recent"
alias gbc="git recent-checkout"
alias grm="git checkout master && git pull && git checkout - && git rebase master"
alias gpcp="git log --oneline -1 | cut -d ' ' -f 2- | tr -d '\n' | pbcopy"
alias gsub="git submodule update --recursive --init"
alias gpu="git gpu"
alias gpuf="git gpuf"
alias gpo="git push origin"
alias glo="git log --oneline --pretty='%h %s'"
# Memfault
alias mem="cd $HOME/dev/memfault/memfault && conda activate memfault"
# invoke
alias i="invoke"
# Always show line numbers
alias 'grep'='grep -n'
# Pebble
alias p='pebble'
alias pb='pebble build'
alias pi='pebble install'
alias ko="ps -ef | grep openocd | grep -v grep | awk '{print $2}' | xargs kill -KILL"
# Enable aliases to be sudo’ed
alias sudo='sudo '
# Stopwatch
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; sudo gem update --system; sudo gem update'
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
# Trim new lines and copy to clipboard
alias c="tr -d '\n' | pbcopy"
# URL-encode strings
alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"'
# Intuitive map function
# For example, to list all directories that contain a certain file:
# find . -name .gitattributes | map dirname
alias map="xargs -n1"
# Reload the shell (i.e. invoke as a login shell)
alias reload="exec $SHELL -l"
# source $HOME/.aliases_local