forked from joshoohaah/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.shellaliases
More file actions
170 lines (145 loc) · 7.17 KB
/
.shellaliases
File metadata and controls
170 lines (145 loc) · 7.17 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/sh
################################################
#http environment variables
###############################################
# export HTTP_PROXY_TEMP=http://http-proxy.ha.health.ge.com:88/
# #export HTTP_PROXY_TEMP=http://pitc-cin.cloud.health.ge.com:80/
# export HTTPS_PROXY_TEMP=$HTTP_PROXY_TEMP
# export NO_PROXY_TEMP=localhost,127.0.0.1,127.0.0.0,10.0.0.0,10.0.2.15,.ge.com
# export HTTPS_PROXY=$HTTPS_PROXY_TEMP
# export HTTP_PROXY=$HTTP_PROXY_TEMP
# export http_proxy=$HTTP_PROXY_TEMP
# export https_proxy=$HTTPS_PROXY_TEMP
# export VAGRANT_HTTP_PROXY=$HTTP_PROXY_TEMP
# export VAGRANT_HTTPS_PROXY=$HTTPS_PROXY_TEMP
# export VAGRANT_FTP_PROXY=$HTTP_PROXY_TEMP
# export VAGRANT_NO_PROXY=$NO_PROXY_TEMP
#
# export VPN_HTTP_PROXY_TEMP=$HTTP_PROXY_TEMP
# export VPN_HTTPS_PROXY_TEMP=$HTTP_PROXY_TEMP
# export VPN_NO_PROXY_TEMP=$NO_PROXY_TEMP
##########################################
# Proxy Fun
#########################################
# Define our default proxy
export proxy_url=http://3.166.220.15:3128
export proxy_url2=http://cinproxy.glb.comfin.ge.com:80
export proxy_url3=http://iss-americas-pitc-cincinnatiz.proxy.corporate.ge.co
export proxy_url4=http://http-proxy.us.money.ge.com
export proxy_url5=http://127.0.0.1:31114
export proxy_url6=http://pitc-cin.cloud.health.ge.com:80/
export proxy_url7=http://http-proxy.ha.health.ge.com:88/
export proxy_url8=http://cis-americas-pitc-cinciz.proxy.corporate.ge.com:80
export proxy_url9=http://proxy-src.research.ge.com:8080
export proxy_url10=http://PITC-Zscaler-Americas-Cincinnati3PR.proxy.corporate.ge.com:80
# These aliases are used to check the proxy and turn it on and off
alias proxy="env |grep _proxy"
alias proxyon_archops="export http_proxy=$proxy_url; export https_proxy=$proxy_url;proxy"
alias proxyon_cin="export http_proxy=$proxy_url2; export https_proxy=$proxy_url2;proxy"
alias proxyon_cin2="export http_proxy=$proxy_url3; export https_proxy=$proxy_url3;proxy"
alias proxyon_money="export http_proxy=$proxy_url4; export https_proxy=$proxy_url4;proxy"
alias proxyon_myapps="export http_proxy=$proxy_url5; export https_proxy=$proxy_url5;proxy"
alias proxyon_pitc="export http_proxy=$proxy_url6; export https_proxy=$proxy_url6;proxy"
alias proxyon_health="export http_proxy=$proxy_url7; export https_proxy=$proxy_url7;proxy"
alias proxyon_cis="export http_proxy=$proxy_url8; export https_proxy=$proxy_url8;proxy"
alias proxyon_research="export http_proxy=$proxy_url9; export https_proxy=$proxy_url9;proxy"
alias proxyon_pitcCIS="export http_proxy=$proxy_url10; export https_proxy=$proxy_url10;proxy"
alias proxyoff="unset http_proxy; unset https_proxy; unset ftp_proxy; unset"
export no_proxy="localhost,127.0.0.1,.ge.com,3.,10,*.ge.com,10.0.2.2"
# default one to start is health proxy
proxyon_health
#########################################
# to find files that are hidden
#########################################
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
######################
# Turn proxies on/off
#####################
alias proxyon="source $AWS_TOOLS_PATH/proxy-switch.sh on"
alias proxyon_myapps="source $AWS_TOOLS_PATH/proxy-switch.sh myapps"
alias proxyon_pitc="source $AWS_TOOLS_PATH/proxy-switch.sh pitc"
alias proxyon_health="source $AWS_TOOLS_PATH/proxy-switch.sh health"
alias proxyoff="source $AWS_TOOLS_PATH/proxy-switch.sh off"
alias vpn_proxyon="source $AWS_TOOLS_PATH/proxy-switch.sh vpn_on"
#########################################
# Connectivity
#alias ssh.host ='ssh user@host.net'
#########################################
# Commands to run apps
#########################################
# Commands to change dirs
alias to.temp='cd ${MYTEMP}'
alias to.downloads='cd ${MYDOWNLOADS}'
alias to.dropbox='cd ~/Dropbox'
alias to.docs='cd ${MYDOCUMENTS}'
alias to.code='cd ${MYCODE}'
alias to.scratch='cd ${MYSCRATCH}'
alias to.devapps='cd ${MYDEVAPPS}'
#################################
# Simple Program Name Shortening
alias g=git
alias gp='git push'
alias gs='git status'
alias gc='git commit'
alias v=vagrant
alias vp='vagrant provision'
alias vd='vagrant destroy -f'
alias k=kitchen
alias kd='kitchen destroy'
alias kc='kitchen converge'
alias kl='kitchen login'
alias klist='chef exec kitchen list'
alias ball='berks install && berks upload'
alias cook='foodcritic -C `pwd` && rubocop -D -S'
alias cook_fix='rubocop --auto-correct'
#####################################
# brew shortcut commands
#####################################
alias brew-cask-refresh='brew cask list | xargs brew cask install --force'
alias brew-refresh='brew update && brew upgrade'
#############################
# Utilities
# recursive dos2unix in current directory
alias dos2lf='dos2unix `find ./ -type f`'
# Flush the DNS on Mac
alias dnsflush='dscacheutil -flushcache'
# Copy and paste and prune the usless newline
alias pbcopynn='tr -d "\n" | pbcopy'
# Set the extended MacOS attributes on a file such that Quicklook will open it as text
alias qltext='xattr -wx com.apple.FinderInfo "54 45 58 54 21 52 63 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00" $1'
#alias qltext2='osascript -e tell application "Finder" to set file type of ((POSIX file "$1") as alias) to "TEXT"'
# Git Scribe Commands
alias gsgp='git scribe gen pdf && open output/book.pdf'
alias gsgh='git scribe gen html && open output/book.html'
# Show network connections
# Often useful to prefix with SUDO to see more system level network usage
alias network.connections='lsof -l -i +L -R -V'
alias network.established='lsof -l -i +L -R -V | grep ESTABLISHED'
alias network.internalip="ifconfig en0 | egrep -o '([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'"
alias network.externalip='curl -s http://checkip.dyndns.org/ | sed "s/[a-zA-Z<>/ :]//g"'
# Files used, anywhere on the filesystem
alias files.usage='sudo fs_usage -e -f filesystem|grep -v CACHE_HIT|grep -v grep'
# Files being opened
alias files.open='sudo fs_usage -e -f filesystem|grep -v CACHE_HIT|grep -v grep|grep open'
# Files in use in the Users directory
alias files.usage.user='sudo fs_usage -e -f filesystem|grep -v CACHE_HIT|grep -v grep|grep Users'
# Directory listings
# LS_COLORS='no=01;37:fi=01;37:di=07;96:ln=01;36:pi=01;32:so=01;35:do=01;35:bd=01;33:cd=01;33:ex=01;31:mi=00;05;37:or=00;05;37:'
# -G Add colors to ls
# -l Long format
# -h Short size suffixes (B, K, M, G, P)
# -p Postpend slash to folders
alias ls='ls -G -h -p '
alias ll='ls -l -G -h -p '
# Restart Apache on Mac
alias apacherestart="sudo /usr/sbin/apachectl restart"
#Personal Commands
alias game.seek='txt="";for i in {1..20};do txt=$txt"$i. ";done;txt=$txt" Ready or not, here I come";say $txt'
#Git Tools
# assumes git-up is installed (gem install git-up)
# switches to 'develop' branch, updates all local branches (nicely using git-up), removes all local branches already merged into 'develop'
alias gitdev='git checkout develop; git-up; git branch --merged develop | grep -v "\* develop" | xargs -n 1 git branch -d; git branch;'
# node.js + io.js
alias usenode='brew unlink iojs && brew link node && echo Using Node.js'
alias useio='brew unlink node && brew link --force iojs && echo Using io.js'