forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.work
103 lines (83 loc) · 4.33 KB
/
.work
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
GIT_AUTHOR_NAME="Joe Laws"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="[email protected]"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
export PATH="$PATH:~/src/xplat1/tools/buck/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
alias t='top -o cpu'
alias rmdd='rm -rf $HOME/Library/Developer/Xcode/DerivedData'
alias rme='rm -rf $(buck root)/.dbx_gyp_wrapper_state $(buck root)/tools/bmbf/venv $(buck root)/tools/dxbuild/venv'
alias rmb='rm -rf $(buck root)/buck-out && killall -9 watchman && buck clean'
alias rma='rmdd && rme && rmb'
alias cdx1='cd ~/src/xplat1'
alias cdx2='cd ~/src/xplat2'
alias cdx3='cd ~/src/xplat3'
alias cdx4='cd ~/src/xplat4'
alias cdx5='cd ~/src/xplat5'
alias cdx6='cd ~/src/xplat6'
alias ga='git commit --amend --no-edit'
alias gs='git checkout master && git pull'
alias gr='git rebase master'
alias gm='git checkout master'
alias gcf='git checkout --'
alias grmb='git branch | grep -v "master" | xargs git branch -D'
alias gitclean='git clean -ffxd && cp ~/.buckconfig.local $(buck root)/'
alias smu='$(buck root)/submodule_update.sh'
alias fr='swift-format -r -i -m format Sources Tests Package.swift && swiftlint autocorrect'
alias fp='swift-format -r -i -m format Sources Tests Package.swift Stats .build && swiftlint autocorrect'
alias od='open -a "Xcode" $(buck root)/buck-out/gen/dbapp-ios/Dropbox/Dropbox.xcodeproj/project.xcworkspace'
alias ode='open -a "Xcode" $(buck root)/buck-out/gen/dbapp-ios/Dropbox/Dropbox.xcodeproj/project.xcworkspace'
alias os='open -a "Xcode" $(buck root)/buck-out/gen/docscanner/DocScanner.xcodeproj'
alias op='open -a "Xcode" $(buck root)/buck-out/gen/paper/paper-cocoa/Paper.xcodeproj'
alias ot='open -a "Xcode" $(buck root)/buck-out/gen/transfers/Transfers.xcodeproj'
alias opw='open -a "Xcode" $(buck root)/buck-out/gen/ios/passwords/app/Passwords.xcodeproj'
alias md='make project_dbapp_noext_notests'
alias mde='make project_dbapp'
alias ms='make project_docscanner'
alias mp='make project_paper'
alias mt='make project_transfers'
alias mpw='make project_passwords'
alias bd='$(buck root)/submodule_update.sh && md'
alias bde='$(buck root)/submodule_update.sh && mde'
alias bs='$(buck root)/submodule_update.sh && ms'
alias bp='$(buck root)/submodule_update.sh && mp'
alias bt='$(buck root)/submodule_update.sh && mt'
alias bpw='$(buck root)/submodule_update.sh && mpw'
alias ud='$(buck root)/tools/setup/repo_setup.py ios && bd'
alias ude='$(buck root)/tools/setup/repo_setup.py ios && bde'
alias us='$(buck root)/tools/setup/repo_setup.py ios && bs'
alias up='$(buck root)/tools/setup/repo_setup.py ios && bp'
alias ut='$(buck root)/tools/setup/repo_setup.py ios && bt'
alias upw='$(buck root)/tools/setup/repo_setup.py ios && bpw'
# Devbox
alias db='ssh jlaws-dbx'
alias dbsync='devbox-sync'
alias point-client='~/src/xplat/tools/ios/setup_for_dev_vm.py --devbox jlaws --project dbapp'
alias debugserver='mbzl itest-run //services/metaserver:metaserver'
function b() {
BUCK_PATH="$(buck root)"
MY_PATH="$(pwd)"
TARGET_PATH="/${MY_PATH#$BUCK_PATH}"
BUILD_PATH=$TARGET_PATH$1
echo "$BUILD_PATH"
buck build "$BUILD_PATH"
}
function ft() {
buck query "attrfilter('module_name', '$1', '//...')" | tail -1
}
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
function agr { ag -0 -l "$1" | AGR_FROM="$1" AGR_TO="$2" xargs -0 perl -pi -e 's/$ENV{AGR_FROM}/$ENV{AGR_TO}/g'; }
# HSTR configuration - add this to ~/.bashrc
alias hh=hstr # hh to be alias for hstr
export HSTR_CONFIG=hicolor # get more colors
shopt -s histappend # append new history items to .bash_history
export HISTCONTROL=ignorespace # leading space hides commands from history
export HISTFILESIZE=10000 # increase history file size (default is 500)
export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
# ensure synchronization between bash memory and history file
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hstr -- \C-j"'; fi
# if this is interactive shell, then bind 'kill last command' to Ctrl-x k
if [[ $- =~ .*i.* ]]; then bind '"\C-xk": "\C-a hstr -k \C-j"'; fi