Skip to content

Instantly share code, notes, and snippets.

@paulhayes
Created August 6, 2015 19:15
Show Gist options
  • Save paulhayes/4ef7602fa9436752f1fa to your computer and use it in GitHub Desktop.
Save paulhayes/4ef7602fa9436752f1fa to your computer and use it in GitHub Desktop.
My custom bash profile script
export PATH="$PATH:~/bin:/Users/$USER/adt-bundle-mac-x86_64/sdk/tools:/Users/$USER/adt-bundle-mac-x86_64/sdk/platform-tools:/Applications/TEE-CLC-10.0.0:/usr/textbin"
export PYTHONPATH=/usr/local/lib/python2.7/site-packages
export EDITOR="subl -w"
alias pull="git pull origin"
alias push="git push origin"
function title () { echo -ne "\033]0;$@\007"; }
function rm () {
local path
for path in "$@"; do
# ignore any arguments
if [[ "$path" = -* ]]; then :
else
local dst=${path##*/}
# append the time if necessary
while [ -e ~/.Trash/"$dst" ]; do
dst="`expr "$dst" : '\(.*\)\.[^.]*'` `date +%H-%M-%S`.`expr "$dst" : '.*\.\([^.]*\)'`"
done
mv "$path" ~/.Trash/"$dst"
fi
done
}
function exportframe(){
ffmpeg -i $1 -ss 00:00:00.0 -vframes 1 $2
}
function camerafix(){
sudo killall VDCAssistant
sudo killall AppleCameraAssistant
}
export PATH=/usr/local/sbin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment