fix a bin bug, python fixes
This commit is contained in:
parent
07fa522024
commit
01cb6eeac4
@ -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.
@ -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,10 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
set -v
|
|
||||||
|
|
||||||
if [ $OSTYPE = "darwin16.0" ];then
|
|
||||||
umount /Volumes/ramdisk
|
|
||||||
mysql.server stop
|
mysql.server stop
|
||||||
killall mysqld
|
killall mysqld
|
||||||
killall mysqld
|
killall mysqld
|
||||||
@ -15,19 +9,3 @@ if [ $OSTYPE = "darwin16.0" ];then
|
|||||||
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://2048000`
|
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://2048000`
|
||||||
cp -r /usr/local/var/mysql /Volumes/ramdisk
|
cp -r /usr/local/var/mysql /Volumes/ramdisk
|
||||||
mysql.server start
|
mysql.server start
|
||||||
else
|
|
||||||
sudo service mysql stop
|
|
||||||
|
|
||||||
# This works on Ubuntu 14.04, but not 16.04:
|
|
||||||
# sudo mkdir -p /mnt/mysql-data-orig
|
|
||||||
# sudo mount --bind /var/lib/mysql /mnt/mysql-data-orig
|
|
||||||
# sudo mount -t tmpfs -o size=32G,uid=mysql,gid=mysql,mode=700 tmpfs /var/lib/mysql
|
|
||||||
# sudo sh -c 'cp -avi /mnt/mysql-data-orig/* /var/lib/mysql/'
|
|
||||||
|
|
||||||
# This works on 16.04 and maybe elsewhere too
|
|
||||||
sudo mkdir -p /mnt/mysql-ram
|
|
||||||
sudo mount -t tmpfs -o size=8G,uid=mysql,gid=mysql,mode=700 tmpfs /mnt/mysql-ram
|
|
||||||
sudo mount -t aufs -o br:/mnt/mysql-ram:/var/lib/mysql=ro aufs /var/lib/mysql
|
|
||||||
|
|
||||||
sudo service mysql start
|
|
||||||
fi
|
|
||||||
|
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\"
|
@ -1,43 +1,34 @@
|
|||||||
#!/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"
|
||||||
|
|
||||||
|
# Go Stuff
|
||||||
|
export GOPATH=$HOME/go
|
||||||
|
|
||||||
|
# GPG stuff
|
||||||
if [[ $OSTYPE == "*darwin*" ]];then
|
if [[ $OSTYPE == "*darwin*" ]];then
|
||||||
export PATH="/usr/local/opt/gnupg/libexec/gpgbin:$PATH"
|
export PATH="/usr/local/opt/gnupg/libexec/gpgbin:$PATH"
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
if [ -z "$SSH_AUTH_SOCK" ] ; then
|
|
||||||
eval `ssh-agent -s`
|
|
||||||
ssh-add ~/.ssh/id_rsa
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
if [ -e ~/.ssh/id_addgene ];then
|
|
||||||
ssh-add ~/.ssh/id_addgene
|
|
||||||
fi
|
|
||||||
export MP_FULLNAME="Tyrel Souza"
|
|
||||||
|
|
||||||
source ~/.bash_aliases
|
source ~/.bash_aliases
|
||||||
if [ -e $HOME/.credentials ];then
|
|
||||||
source $HOME/.credentials
|
|
||||||
fi
|
|
||||||
export PYTHONSTARTUP=$HOME/.pythonstartup.py
|
|
||||||
eval "$(pyenv init -)"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user