-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile
More file actions
68 lines (56 loc) · 1.79 KB
/
profile
File metadata and controls
68 lines (56 loc) · 1.79 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
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PATH="$PATH:$HOME/Projects/scripts"
export PATH=$PATH:/usr/local/sbin
source $HOME/.golangrc
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
source ~/.prompt
alias gst="git status"
alias gc="git commit -m"
alias gs="git stash"
alias gsp="git stash pop"
alias gco="git checkout"
alias gb="git branch"
alias ga="git add"
alias gpl="git pull --rebase"
alias gd="git diff"
alias grh="git reset HEAD"
alias gl="git log --oneline --decorate"
alias cdp="cd ~/Projects/"
alias md="cd ~/Projects/mdlive"
alias st="cd ~/Projects/stern"
alias fr="cd ~/Projects/Fore"
alias pp="cd ~/Projects/patient-portal"
alias ls="ls -G -al"
alias t="tmux"
alias log="tail -f log/development.log"
alias notes="cd ~/notes"
alias nx="sudo nginx"
alias nxs="sudo nginx -s stop"
alias b="bundle"
alias vi="vim"
alias mysql="mysql -uroot"
alias rc="rails c"
alias dm="eval "'"$(docker-machine env mdlive)"'""
update-docker-host(){
sudo sed -i '' '/[[:space:]]docker\.local$/d' /etc/hosts
export DOCKER_IP="$(echo ${DOCKER_HOST} | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')"
[[ -n $DOCKER_IP ]] && sudo /bin/bash -c "echo \"${DOCKER_IP} docker.local\" >> /etc/hosts"
}
function rmi-docker() {
docker images |grep none | awk '{print $3}' | xargs docker rmi -f
}
function drop-containers() {
docker ps -aq | xargs docker rm -fv
}
function stopdrop-containers() {
docker ps -a | grep Exited | awk '{print $1}' | xargs docker rm -fv
}
function drop-volumes() {
docker volume ls -qf dangling=true | xargs docker volume rm
}
function drop-all-images() {
docker images | awk '{print $3}' | xargs docker rmi -f
}
function linux-game() {
ssh bandit"$1"@bandit.labs.overthewire.org
}