Last active
November 10, 2018 19:00
-
-
Save kagemusha/b7f57be9becb4a054d780d8c95af22bc to your computer and use it in GitHub Desktop.
sample osx/linux aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "redoing aliases" | |
# alias to reload aliases in your current window | |
alias real=". ~/kagemusha/aliases/aliases" | |
# specific things i'm currently working on | |
alias rspet="rspec spec/controllers/api/canvas/email_templates_controller_spec.rb" | |
alias rspes="rspec spec/controllers/api/canvas/email_sections_controller_spec.rb" | |
alias dlvw="dlv debug github.com/kagemusha/vowpal_websrv -- --workers 1 --models ./sample_models" | |
alias 58="lsof -i tcp:5858" | |
alias dt="docker tag some_image:latest aws-acct.dkr.ecr.us-east-1.amazonaws.com/some-container:latest" | |
alias dp="docker push aws-acct.dkr.ecr.us-east-1.amazonaws.com/some-container:latest" | |
# misc | |
alias pug="ps ux | grep" | |
alias k9="kill -9" | |
alias sk9="sudo kill -9" | |
alias ak47="killall" | |
alias c-="cd -" | |
alias viz="vi ~/.zshrc" | |
# dirs | |
alias kg="~/kagemusha" | |
alias ali="kg && cd aliases" | |
alias nsqp="kg && cd nsq_practice" | |
alias kgo="cd ~/go/src/github.com/kagemusha" | |
alias clo="mgo && cd clover" | |
alias gol="cd ~/go/src" | |
alias vww="mgo && cd vowpal_websrv" | |
alias res="cd ~/research" | |
alias pvw="res && cd vowpal_wabbit/python" | |
alias mir="res && cd ember-cli-mirage" | |
alias cellar="/usr/local/Cellar" | |
alias gopr="gol && cd go_practice" | |
alias dl="res && deep-learning" | |
alias slc="~/kagemusha/spylang-client" | |
alias tmp="~/tmp" | |
alias rlc="reload && cv" | |
alias cel="cd /usr/local/Cellar" | |
alias lbin="cd /usr/local/bin" | |
alias launch="/Users/user/Library/LaunchAgents" | |
# git commands | |
alias gc="git checkout" | |
alias gcm="gc master" | |
alias gcb="gc -b" | |
alias gpr="git pull --rebase" | |
alias g-="gc -" | |
alias gs='git status' | |
alias gb="git branch" | |
alias gs="git status" | |
alias gl='git log --pretty=format:"%h %s"' | |
alias gri="git rebase -i" | |
alias gsu="git stash -u" | |
alias gspop="git stash pop" | |
alias gba="git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(authorname) %(refname:short)'" | |
alias gitren="git branch -m " | |
alias gpu="git push -u" | |
alias gpuo="gpu origin" | |
alias gu='gitup' | |
alias gsui="git submodule update --init" | |
alias vigi="vi ~/.gitignore_global" | |
# python commands | |
alias python="python3" | |
alias py="python3" | |
alias pip="pip3" | |
alias pi="pip3 install" | |
alias piu="pi --user" | |
alias jn="jupyter notebook" | |
alias pys="python3 -m http.server" # e.g. pys 7777 (port 7777) | |
# go | |
alias gi="go install" | |
alias gr="go run" | |
alias gg="go get" | |
alias godir="cd ~/go" | |
alias gob="go build" | |
alias xm="./murat -c ../../config/development/murat.yml" | |
alias gom="gob && xm" | |
alias dlm="dlv debug . -- -c=../../config/development/murat.yml" | |
# aws | |
alias ecrl="$(aws ecr get-login --no-include-email --region us-east-1)" | |
alias s3="aws s3" | |
alias s3ls="s3 ls" | |
alias s3cp="s3 cp" | |
# serverless | |
alias sd="serverless deploy" | |
alias si="serverless invoke" | |
alias sc="serverless create" | |
alias scp3="serverless create --template aws-python3" | |
#docker | |
alias dbt="docker build -t" # docker build -t kangzeroo . | |
alias dr="docker run" | |
alias dia="docker images --a" | |
# pg | |
alias pgstart="brew services start postgresql" | |
alias pgstop="pg_ctl -D /usr/local/var/postgres stop" | |
alias pgrestart="brew services restart postgresql" | |
# rails | |
alias gemi="gem install" | |
alias gemll="gem list --local" | |
alias buni="bundle install" | |
alias be="bundle exec" | |
alias ber="bundle exec rake" | |
alias bx="bundle exec" | |
alias bxr="bundle exec rake" | |
alias bxrc="bx rails console" | |
alias bxcr="bxrc" | |
alias spqr="bxrc" | |
alias bxrm="bxr db:migrate" | |
alias dbrollback="rake db:rollback STEP=1" | |
alias dbredo="bxrollback && bxrm" | |
alias bxrs="bxr db:seed" | |
alias taild="tail -f log/development.log" | |
alias testprep="rake db:test:prepare" | |
alias dbreset="bxr db:drop db:create db:migrate db:seed db:test:prepare" | |
alias dbmig="bxr db:migrate" | |
alias rg="rails generate" | |
alias rgc="rg controller" | |
alias rgm="rg model" | |
alias rgr="rg resource" | |
alias rgs="rg serializer" | |
alias rgmig="rg migration" | |
alias rd="rails destroy" | |
alias rdc="rd controller" | |
alias rdm="rd model" | |
alias rs="bx rails s" | |
alias prr="pry-remote" | |
alias raketasks="rake -T -A" | |
alias cop="./bin/rubocop -a" | |
alias rsq="QUEUES=high rake resque:work" | |
# yarn | |
alias yag="yarn global upgrade" | |
alias ya="yarn add" | |
alias yi="yarn install" | |
# npm | |
alias ni="npm install" | |
alias nig="ni -g" | |
alias nu="npm update" | |
alias nug="nu -g" | |
alias ncc="npm cache clean" | |
alias nis="ni --save-dev" | |
alias nstart="npm start" | |
alias ntest="npm test" | |
alias nst="npm start" | |
alias nt="npm test" | |
alias nglist="npm -g ls --depth=0" | |
alias ns="npm start" | |
alias ys="yarn && npm start" | |
alias lss="lerna bootstrap && lerna run ci:install && ns" | |
alias dbn="./node_modules/mocha/bin/mocha debug && ./node_modules/karma/bin/karma start" | |
# ember-cli | |
alias em="ember" | |
alias es="ember server" | |
alias rcli="rm -rf node_modules tmp dist && ni && bi" | |
alias esp="es --port" | |
alias esp5="esp 5000" | |
alias ei="ember install" | |
alias en="ember new" | |
alias et="ember test" | |
alias ets="ember test --serve" | |
alias etf="ember test -f" | |
alias etsu="ember test --serve --filter=unit" | |
alias eb="ember build" | |
alias ebp="ember build --environment=production" | |
alias ebw="ember build --watch" | |
# brew | |
alias brin="brew install node" | |
#for a version do brew search, then choose a version e.g brew install homebrew/versions/node5 | |
alias brinf="brew info" #e.g. brew info node | |
alias brsw="brew switch" #e.g. brew switch postgresql 9.1.5 | |
alias brsr="brew search" #e.g. brew search node | |
alias startpg="brew services start postgresql" | |
# elixir, phoenix | |
alias exx="elixir" | |
alias exs="elixir" | |
alias m="mix" | |
alias mn="mix new" | |
alias mt="mix test" | |
alias mtx="mix test --exclude skip" | |
alias mdg="mix deps.get" | |
alias mdc="mix deps.compile" | |
alias mps="mix phoenix.server" | |
alias meb="mix escript.build" | |
alias mereset="mix ecto.reset" | |
alias merl="mix ecto.rollback" | |
alias ism="iex -S mix" | |
alias imps="iex -S mix phoenix.server" | |
alias ismt="iex -S mix test" | |
alias ismtx="iex -S mix test --exclude skip" | |
alias hseed="heroku run mix run priv/repo/seeds.exs" | |
alias phn="mix phoenix.new" | |
alias mpn="mix phoenix.new" | |
alias mpr="mix phoenix.routes" | |
alias routes="mix phoenix.routes" | |
alias mec="mix ecto.create" | |
#alias med="mix ecto.drop" | |
alias mem="mix ecto.migrate" | |
alias mgmig="mix ecto.gen.migration" | |
alias meroll="mix ecto.rollback" #mix ecto.rollback --step 3 | |
alias mgh="mix phoenix.gen.html" | |
alias mgj="mix phoenix.gen.json" #e.g. mix phoenix.gen.json User users name:string age:integer | |
alias mgm="mix phoenix.gen.model" | |
alias mrs="mix run priv/repo/seeds.exs" | |
alias aw="kg && cd aws-proj" | |
alias awi="aw && ingest-data" | |
alias imd="awi && source setenv && py ingest_mogreps_data.py" | |
## kyoko :-) | |
alias ky='say -v "Kyoko"' | |
alias nh='say -v "Kyoko" "のみほうだいがすきですか?"' | |
alias rr='say -v "Kyoko" "reelly? rillee?"' | |
alias genki='say -v "kyoko" "元気?"' | |
# minecraft | |
alias mc="cd ~/minecraft/spigotmc && java -jar spigot-1.12.2.jar" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment