Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables=(
- "HTTP_PROXY"
- "HTTPS_PROXY"
- "ALL_PROXY"
- "all_proxy"
- "https_proxy"
- )
- function reload () {
- source ~/.profile
- }
- function set_registry_npm {
- npm config set registry="https://registry.npmjs.org/"
- }
- function set_registry_alt {
- npm config set registry="link_that_works_but_removed_for_StackOverflow"
- }
- function load_proxy_full {
- echo -n "Enter Username: "
- read username
- echo -n "Enter your Password: "
- read -s password
- url=http://${username}:${password}@proxy-change.xxxx.com:8080
- npm config set https-proxy ${url}
- npm config set proxy ${url}
- export HTTP_PROXY=${url}
- export HTTPS_PROXY=${url}
- export ALL_PROXY=${url}
- export all_proxy=${url}
- export https_proxy=${url}
- npm config delete registry
- }
- function unload_proxy {
- unset ${variables[@]}
- npm config delete https-proxy
- npm config delete proxy
- }
- export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
- [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
- Load RVM into a shell session *as a function*
- function parse_git_branch {
- git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/ (1)/'
- }
- # This allows git autocomplete
- if [ -f ~/.git-completion.bash ]; then
- . ~/.git-completion.bash
- fi
- # Node Path from Homebrew I believe
- export NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
- export VISUAL="subl -w"
- export SVN_EDITOR="subl -w"
- export GIT_EDITOR="subl -w"
- export EDITOR="subl -w"
- function desktop {
- cd /Users/$USER/Desktop/$@
- }
- # Aliases
- alias l='ls -lah'
- # Git
- alias gcl="git clone"
- alias gst="git status"
- alias gpl="git pull"
- alias gp="git push"
- alias gd="git diff | mate"
- alias ga="git add"
- alias gcm="git commit -m"
- alias gb="git branch"
- alias gba="git branch -a"
- alias gcam="git commit -am"
- alias gbb="git branch -b"
- alias glol="git log --oneline --decorate --all --graph"
- # Case-Insensitive Auto Completion
- bind "set completion-ignore-case on"
- # via homebrew
- if [ -f `brew --prefix`/etc/bash_completion ]; then
- . `brew --prefix`/etc/bash_completion
- fi
- export ANDROID_HOME=~/Library/Android/sdk
- export PATH=${PATH}:${ANDROID_HOME}/tools
- export PATH=${PATH}:${ANDROID_HOME}/platform-tools
- export PATH="$PATH:`yarn global bin`"
- [[ -s "/Users/$USER/.rvm/scripts/rvm" ]] && source "/Users/$USER/.rvm/scripts/rvm" # This loads RVM into a shell session.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement