Merge branch 'master' of gitlab.com:tyrelsouza/dotfiles
This commit is contained in:
commit
abd97697de
@ -1,9 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# get initial directories setup
|
# get initial directories setup
|
||||||
mv ~/bin/* $(pwd)/bin/
|
|
||||||
rm -rf ~/bin/
|
|
||||||
ln -s $(pwd)/bin ~/bin
|
ln -s $(pwd)/bin ~/bin
|
||||||
|
|
||||||
if [[ $OSTYPE == darwin* ]]; then
|
if [[ $OSTYPE == darwin* ]]; then
|
||||||
~/bin/setup-usr-local.sh
|
~/bin/setup-usr-local.sh
|
||||||
fi
|
fi
|
||||||
|
26
bash_aliases
26
bash_aliases
@ -9,8 +9,6 @@ alias ppjson="python -m json.tool"
|
|||||||
|
|
||||||
# Addgene specific
|
# Addgene specific
|
||||||
alias adocs='cd $ADDGENE_CORE_REPO_DIR/docs && make html && open $ADDGENE_CORE_REPO_DIR/docs/build/html/index.html'
|
alias adocs='cd $ADDGENE_CORE_REPO_DIR/docs && make html && open $ADDGENE_CORE_REPO_DIR/docs/build/html/index.html'
|
||||||
alias deploy_all="fab -R silver-web deploy:master && fab -R gold-web deploy:master && fab -R jupyter fab -R jupyter deploy_jupyter && fab --parallel avail_staging_hosts deploy:master"
|
|
||||||
alias deploy_all_migration="fab -R silver-web deploy:master,1 && fab -R gold-web deploy:master,1 && fab -R jupyter deploy_jupyter & fab --parallel avail_staging_hosts deploy:master,1"
|
|
||||||
alias aenv='env | sort | grep ADDGENE'
|
alias aenv='env | sort | grep ADDGENE'
|
||||||
alias sl="source local.env.$(basename $SHELL)"
|
alias sl="source local.env.$(basename $SHELL)"
|
||||||
|
|
||||||
@ -56,28 +54,4 @@ function h () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
|
||||||
export PS1="<ssh>$PS1"
|
|
||||||
fi
|
|
||||||
alias stabbats='sudo killall VDCAssistant && open https://appear.in/stab-bats'
|
alias stabbats='sudo killall VDCAssistant && open https://appear.in/stab-bats'
|
||||||
|
|
||||||
|
|
||||||
function GitHub()
|
|
||||||
{
|
|
||||||
git_url=`git config --get remote.origin.url`
|
|
||||||
if [[ $git_url == https://github* ]];
|
|
||||||
then
|
|
||||||
url=${git_url%.git}
|
|
||||||
else
|
|
||||||
if [[ $git_url == git@github.com* ]]
|
|
||||||
then
|
|
||||||
url="https://github.com/${${git_url:15}%.git}"
|
|
||||||
else
|
|
||||||
echo "ERROR: Remote origin is invalid" && return false;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
open $url
|
|
||||||
}
|
|
||||||
|
|
||||||
alias github=GitHub
|
|
||||||
|
|
||||||
|
BIN
bin/chromedriver
Executable file
BIN
bin/chromedriver
Executable file
Binary file not shown.
5
bin/git-clean.sh
Normal file
5
bin/git-clean.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
git reset --soft origin/master
|
||||||
|
git commit -a
|
||||||
|
git push -f
|
@ -7,6 +7,8 @@ if [[ $3 ]]; then
|
|||||||
else
|
else
|
||||||
END=$(ffprobe -loglevel error -show_streams $NAME | grep duration\= | cut -f2 -d=)
|
END=$(ffprobe -loglevel error -show_streams $NAME | grep duration\= | cut -f2 -d=)
|
||||||
fi
|
fi
|
||||||
|
END=$(echo -n $END | cut -d ' ' -f 1)
|
||||||
|
echo $END
|
||||||
echo "Making a gif of $NAME from $START seconds to $END seconds"
|
echo "Making a gif of $NAME from $START seconds to $END seconds"
|
||||||
|
|
||||||
ffmpeg -y -ss $START -t $END -i $NAME -vf fps=24,scale=640:-1:flags=lanczos,palettegen temp_palette.png
|
ffmpeg -y -ss $START -t $END -i $NAME -vf fps=24,scale=640:-1:flags=lanczos,palettegen temp_palette.png
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -v
|
set -v
|
||||||
|
|
||||||
if [[ $OSTYPE == *"darwin16"* ]];then
|
if [[ $OSTYPE == "darwin*" ]];then
|
||||||
umount /Volumes/ramdisk
|
umount /Volumes/ramdisk
|
||||||
mysql.server stop
|
mysql.server stop
|
||||||
killall mysqld
|
killall mysqld
|
||||||
|
5
bin/oh_fuck.sh
Executable file
5
bin/oh_fuck.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
git tag temp$RANDOM
|
||||||
|
git reset --hard HEAD^
|
||||||
|
git push --force
|
||||||
|
echo "There. I fixed your stupid mistake Tyrel"
|
1
bin/subl
Symbolic link
1
bin/subl
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl
|
76
bin/virtualenv-auto-activate.sh
Executable file
76
bin/virtualenv-auto-activate.sh
Executable file
@ -0,0 +1,76 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# virtualenv-auto-activate.sh
|
||||||
|
#
|
||||||
|
# Installation:
|
||||||
|
# Add this line to your .bashrc or .bash-profile:
|
||||||
|
#
|
||||||
|
# source /path/to/virtualenv-auto-activate.sh
|
||||||
|
#
|
||||||
|
# Go to your project folder, run "virtualenv .venv", so your project folder
|
||||||
|
# has a .venv folder at the top level, next to your version control directory.
|
||||||
|
# For example:
|
||||||
|
# .
|
||||||
|
# ├── .git
|
||||||
|
# │ ├── HEAD
|
||||||
|
# │ ├── config
|
||||||
|
# │ ├── description
|
||||||
|
# │ ├── hooks
|
||||||
|
# │ ├── info
|
||||||
|
# │ ├── objects
|
||||||
|
# │ └── refs
|
||||||
|
# └── .venv
|
||||||
|
# ├── bin
|
||||||
|
# ├── include
|
||||||
|
# └── lib
|
||||||
|
#
|
||||||
|
# The virtualenv will be activated automatically when you enter the directory.
|
||||||
|
|
||||||
|
# Check for virtualenvwrapper
|
||||||
|
if type workon >/dev/null 2>&1; then
|
||||||
|
VENV_WRAPPER=true
|
||||||
|
else
|
||||||
|
VENV_WRAPPER=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
function _virtualenv_auto_activate() {
|
||||||
|
if [ -e ".venv" ]; then
|
||||||
|
# Check for symlink pointing to virtualenv
|
||||||
|
if [ -L ".venv" ]; then
|
||||||
|
_VENV_PATH=$(readlink .venv)
|
||||||
|
_VENV_WRAPPER_ACTIVATE=false
|
||||||
|
# Check for directory containing virtualenv
|
||||||
|
elif [ -d ".venv" ]; then
|
||||||
|
_VENV_PATH=$(pwd -P)/.venv
|
||||||
|
_VENV_WRAPPER_ACTIVATE=false
|
||||||
|
# Check for file containing name of virtualenv
|
||||||
|
elif [ -f ".venv" -a $VENV_WRAPPER = "true" ]; then
|
||||||
|
_VENV_PATH=$WORKON_HOME/$(cat .venv)
|
||||||
|
_VENV_WRAPPER_ACTIVATE=true
|
||||||
|
else
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check to see if already activated to avoid redundant activating
|
||||||
|
if [ "$VIRTUAL_ENV" != $_VENV_PATH ]; then
|
||||||
|
if $_VENV_WRAPPER_ACTIVATE; then
|
||||||
|
_VENV_NAME=$(basename $_VENV_PATH)
|
||||||
|
workon $_VENV_NAME
|
||||||
|
else
|
||||||
|
_VENV_NAME=$(basename `pwd`)
|
||||||
|
VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||||
|
source .venv/bin/activate
|
||||||
|
_OLD_VIRTUAL_PS1="$PS1"
|
||||||
|
PS1="($_VENV_NAME)$PS1"
|
||||||
|
export PS1
|
||||||
|
fi
|
||||||
|
echo Activated virtualenv \"$_VENV_NAME\".
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
export PROMPT_COMMAND=_virtualenv_auto_activate
|
||||||
|
if [ -n "$ZSH_VERSION" ]; then
|
||||||
|
function chpwd() {
|
||||||
|
_virtualenv_auto_activate
|
||||||
|
}
|
||||||
|
fi
|
1
bin/wha.scpt
Executable file
1
bin/wha.scpt
Executable file
@ -0,0 +1 @@
|
|||||||
|
display notification \"Your free upgrade to Windows 10 is ready. Please click here to start the download.\" with title \"Microsoft\"
|
39
zshrc.local
39
zshrc.local
@ -1,42 +1,47 @@
|
|||||||
#!/usr/local/bin/zsh
|
#!/usr/local/bin/zsh
|
||||||
|
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export VISUAL=vim
|
export MP_FULLNAME="Tyrel Souza"
|
||||||
export GOPATH=$HOME/go
|
export VISUAL=$EDITOR
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=$LANG
|
||||||
export LESS=' -R '
|
export LESS=' -R '
|
||||||
export LESSOPEN="| /usr/local/bin/src-hilite-lesspipe.sh %s"
|
export LESSOPEN="| /usr/local/bin/src-hilite-lesspipe.sh %s"
|
||||||
export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
|
|
||||||
export NPM_PACKAGES="${HOME}/.npm-packages"
|
|
||||||
export PHP_AUTOCONF="/usr/local/bin/autoconf"
|
|
||||||
|
|
||||||
# Virtualenv + Wrapper
|
# Python Virtualenv + Wrapper
|
||||||
export PROJECT_HOME=$HOME/AddGeneProjects
|
export PROJECT_HOME=$HOME/AddGeneProjects
|
||||||
export WORKON_HOME=$HOME/.virtualenvs
|
export WORKON_HOME=$HOME/.virtualenvs
|
||||||
if [ -e $HOME/.local/bin/virtualenvwrapper.sh ];then
|
if [ -e $HOME/.local/bin/virtualenvwrapper.sh ];then
|
||||||
source $HOME/.local/bin/virtualenvwrapper.sh
|
source $HOME/.local/bin/virtualenvwrapper.sh
|
||||||
fi
|
elif [ -e /usr/local/bin/virtualenvwrapper.sh ]; then
|
||||||
if [ -e /usr/local/bin/virtualenvwrapper.sh ]; then
|
|
||||||
source /usr/local/bin/virtualenvwrapper.sh
|
source /usr/local/bin/virtualenvwrapper.sh
|
||||||
fi
|
fi
|
||||||
|
export PYTHONSTARTUP=$HOME/.pythonstartup.py
|
||||||
|
|
||||||
|
# Node stuff
|
||||||
|
export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
|
||||||
|
export NPM_PACKAGES="${HOME}/.npm-packages"
|
||||||
export PATH="$NPM_PACKAGES/bin:$GOPATH/bin:$HOME/bin:$PATH"
|
export PATH="$NPM_PACKAGES/bin:$GOPATH/bin:$HOME/bin:$PATH"
|
||||||
if [[ $OSTYPE == "*darwin*" ]];then
|
|
||||||
|
# Go Stuff
|
||||||
|
export GOPATH=$HOME/go
|
||||||
|
|
||||||
|
# GPG stuff
|
||||||
|
if [[ $OSTYPE == "darwin*" ]];then
|
||||||
export PATH="/usr/local/opt/gnupg/libexec/gpgbin:$PATH"
|
export PATH="/usr/local/opt/gnupg/libexec/gpgbin:$PATH"
|
||||||
|
export CFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib"
|
||||||
|
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
|
||||||
|
export CPPFLAGS="-I/usr/local/opt/icu4c/include"
|
||||||
|
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
|
||||||
fi
|
fi
|
||||||
#
|
|
||||||
eval `ssh-agent -s`
|
eval `ssh-agent -s`
|
||||||
if [ -e ~/.ssh/id_addgene ];then
|
if [ -e ~/.ssh/id_addgene ];then
|
||||||
ssh-add ~/.ssh/id_addgene
|
ssh-add ~/.ssh/id_addgene
|
||||||
fi
|
fi
|
||||||
export MP_FULLNAME="Tyrel Souza"
|
|
||||||
|
|
||||||
source ~/.bash_aliases
|
source ~/.bash_aliases
|
||||||
if [ -e $HOME/.credentials ];then
|
if [ -e $HOME/.credentials ];then
|
||||||
source $HOME/.credentials
|
source $HOME/.credentials
|
||||||
fi
|
fi
|
||||||
export PYTHONSTARTUP=$HOME/.pythonstartup.py
|
|
||||||
export CFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib"
|
|
||||||
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
|
|
||||||
export CPPFLAGS="-I/usr/local/opt/icu4c/include"
|
|
||||||
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user