-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
92 lines (57 loc) · 2.58 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
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
# Shortcuts
## Reload the shell (i.e. invoke as a login shell)
alias reloadshell="exec ${SHELL} -l"
alias reloaddns="dscacheutil -flushcache && sudo killall -HUP mDNSResponder"
alias shrug="echo '¯\_(ツ)_/¯' | pbcopy"
alias c="clear"
## Directories
alias dotfiles="cd $DOTFILES"
alias library="cd $HOME/Library"
alias sites="cd $HOME/Sites"
## JS
alias nstrap="rm -rf node_modules/ package-lock.json && npm install"
alias watch="npm run watch"
alias ls="la -lah"
alias psaux="ps aux"
alias ws3='python3 -m http.server 1234'
alias ws='python -m SimpleHTTPServer 1234'
## Git
alias gst='git status'
unalias gcm >/dev/null 2>/dev/null
## AWS gimme-creds
export AWS_DEFAULT_REGION=us-east-1
alias pro="export AWS_PROFILE=\"prd-OktaReadOnlyRole\""
alias legd="export AWS_PROFILE=\"legacy-OktaDeveloperAccess\""
alias ppd="export AWS_PROFILE=\"preprod-OktaDeveloperAccess\""
alias sd="export AWS_PROFILE=\"sandbox-OktaDeveloperAccess\""
alias dro="export AWS_PROFILE=\"databricks-OktaReadOnlyRole\""
## Get week number
alias week='date +%V'
## Get macOS 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; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update; sudo gem cleanup'
## IP Addresses
alias localip="ipconfig getifaddr en0"
## Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
## Empty the Trash on all mounted volumes and the main HDD. Also, clear Apple’s System Logs to improve shell startup speed Finally, clear download history from quarantine. https://mths.be/bum
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl; sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'"
## Print each PATH entry on a separate line
alias path='echo -e ${PATH//:/\\n}'
## npmsr
alias npm-sr='npm config set registry https://artifactory.k8s.devops.s-9.us/artifactory/api/npm/npm/'
alias npm-default='npm config set registry https://registry.npmjs.com/'
## docker
alias drm='docker rm -f $(docker ps -a -q)'
## date
alias inr='TZ=Asia/Calcutta date'
alias nyc='TZ=America/New_York date'
alias utc='TZ=Etc/UTC date'
## tailscale
alias ts="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
## kubernates
alias mk='minikube'
alias k='kubectl'
alias kx='kubectx'
alias kns='kubens'
## Azure
alias azal="echo -e \"Name\tTenantID\n\" && az account list --output json | jq -r '.[] | [.name, .id] | @tsv'"