Skip to content

Instantly share code, notes, and snippets.

@flannerykj
Last active Mar 2, 2020
Embed
What would you like to do?
export ANDROID_HOME=/Users/flanneryjefferson/Library/Android/sdk
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/build-tools/23.0.1:$PATH
export PATH="$HOME:$PATH:${PATH}:/usr/local/mysql/bin:${PATH}:/usr/bin:/Users/flannerykj/Library/Python/3.6/bin"
# deleted from path: $HOME/.node/bin:/Users/flannerykj/Library/Python/2.7/bin:
export PATH="/usr/local/opt/node@8/bin:$PATH"
export PATH="$HOME:$PATH:${PATH}:/usr/local/mysql/bin:${PATH}:/usr/bin:$HOME/.node/bin"
# alias vim=nvim
export EDITOR=vim
#Suggested enable powerline fonts
export TERM=xterm-256color
# extend regexes for bash commands (https://stackoverflow.com/questions/670460/move-all-files-except-one)
shopt -s extglob
function ssh_ua() {
ssh 'root@68.183.201.27'
}
# dothealth
# powerline-shell
function _update_ps1() {
PS1=$(powerline-shell $?)
}
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
function nonzero_return() {
RETVAL=$?
[ $RETVAL -ne 0 ] && echo "$RETVAL"
}
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session as a function
vimrc() {
vim ~/.vimrc
}
bfg() {
java -jar ~/bfg.jar
}
projects() {
cd ~/projects
}
# Urban Applause
# =============
backend() {
cd ~/projects/urbanapplause-backend
}
ios() {
cd ~/projects/UrbanApplause-UIKit
}
web() {
cd ~/projects/urbanapplause-web
}
# Dot Health
# =============
dh() {
cd ~/dothealth
case $1 in
'ios')
cd DotHealth
if [ "$2" = "open"]; then
open DotHealth.xcworkspace
fi
;;
'web')
cd dothealth-web
if [ "$2" = "run" ]; then
npm start
fi
;;
'backend')
cd dothealth-backend
if [ "$2" = "run"]; then
cd docker/dev && docker-compose up
fi
;;
'admin')
cd dothealth-admin/internal
if [ "$2" = "run" ]; then
npm start
fi
;;
esac
}
readme() {
vim ~/dothealth/dothealth-backend/README.md
}
ngrok8() {
~/ngrok authtoken 6DTBUfsuSBXg7X9JvkfbD_4jeM1qKdTMKzaHkYv5Bc2 && ngrok http 8080 --host-header="localhost:8080"
}
ngrok8000() {
~/ngrok authtoken 6DTBUfsuSBXg7X9JvkfbD_4jeM1qKdTMKzaHkYv5Bc2 && ngrok http 8080 --host-header="localhost:8000"
}
ngrok4() {
~/ngrok authtoken 6DTBUfsuSBXg7X9JvkfbD_4jeM1qKdTMKzaHkYv5Bc2 && ngrok http 4000 --host-header="localhost:4000"
}
#Dot Health Mobile App
ngrok33() {
~/ngrok authtoken 67hao89KfQYZijevuFNQf_7bRHuCE4Ez67ma4qgjJY5 && ngrok http 3333 --host-header="localhost:3333"
}
ngrok5() {
~/ngrok authtoken 67hao89KfQYZijevuFNQf_7bRHuCE4Ez67ma4qgjJY5 && ngrok http 5000 --host-header="localhost:5000"
}
ngrok3() {
~/ngrok authtoken 2UFgGnSr6bha5xzHg7Y86_4VcY7A3iZ3arNLV5Rkpni && ngrok http 3000 --host-header="localhost:3000"
}
# ==========
svg() {
vim ~/svgs/$1.svg
}
svgs() {
cd ~/svgs && ls
}
iconize() {
cd ~/svgs && convert -background none -resize 25x25 $1.svg ./pngs/$1.png && \
convert -background none -resize 50x50 $1.svg ./pngs/$1@2x.png && \
convert -background none -resize 75x75 $1.svg ./pngs/$1@3x.png && \
open ./pngs
}
ua() {
cd ~/projects/ua/client
}
branches(){
for k in `git branch | sed s/^..//`; do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k --`\\t"$k";done | sort
}
# workflow
xcode-clean-derived() {
rm -rf /Users/flannerykj/Library/Developer/Xcode/DerivedData/*
}
#NOTES
alias notes='cd ~/documents/notes && ls -la'
alias ll='ls -Glha'
tre() {
tree -I 'node_modules|*.md|*.png|*.jpg'
}
profile() {
vim ~/.bash_profile
}
sshpub() {
cat ~/.ssh/id_rsa.pub
}
mcd() {
mkdir "$1" && cd "$1"
}
htdocs() {
cd ~/../../Applications/MAMP/htdocs
}
note() {
cd ~/documents/notes/"$2"
touch "$1.md"
typora "$1.md"
}
typora() {
open -a "Typora"
}
#OPEN APPS
chrome() {
open -a "Google Chrome"
}
#open firefox nightly
ff() {
open -a "Nightly"
}
desktop() {
open ~/Desktop -a Finder
}
downloads() {
open ~/Downloads -a Finder
}
em(){
echo ''|pbcopy
}
shrug() {
echo '¯\_(ツ)_/¯'|pbcopy
}
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment