Skip to content

Instantly share code, notes, and snippets.

@DoxasticFox
Created July 10, 2018 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DoxasticFox/8eeeb37b6931b936c7cda1aefffa6fcd to your computer and use it in GitHub Desktop.
Save DoxasticFox/8eeeb37b6931b936c7cda1aefffa6fcd to your computer and use it in GitHub Desktop.
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=10000
setopt AUTO_PUSHD
setopt autocd
bindkey -v
# ctrl + left/right skips words
bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/christian/.zshrc'
autoload -Uz compinit
autoload -U colors && colors
compinit
# End of lines added by compinstall
eval `dircolors ~/.dir_colors`
PS1="%{$fg[yellow]%}%~ %{$reset_color%}%% "
#export TERM="xterm-16color"
please(){
sudo $(fc -ln -1)
}
#Bookmarks
project='/home/christian/Documents/Work/University/400 Level/Semester 2/ENGG411/Project/';
uni='/home/christian/Documents/Work/University/';
nlp='/home/christian/Documents/Work/Computer Science/NLP/';
faces='/home/christian/Documents/Trivialities/4chan/b/reaction faces/';
mkcdir(){
command mkdir $1 && cd $1
}
chpwd() { ls --color }
alias ls="ls --color"
alias grap="grep -nr --color=Always"
alias open="xdg-open"
alias o="xdg-open"
function share() {
SOURCE=${2:-$1}
TMP="/var/www/tmp"
if [[ -d $SOURCE ]]; then
if [ "$1" = "-nc" ]; then
cp -r $SOURCE "$TMP/"
else
DEST="$TMP/`basename $SOURCE`.zip"
zip -r $DEST $SOURCE && chmod -R 777 $DEST
fi
elif [[ -f $SOURCE ]]; then # $SOURCE is a file
DEST="$TMP/`basename $SOURCE`"
cp $SOURCE $DEST && chmod 777 $DEST
fi
}
comt() {
git commit -a -m "$1"
}
phonehome() {
ssh -XC christian@phonehome.xar.gs
}
adbpulllatest () {
adb pull $(adb shell ls -d1t "/sdcard/faims/modules/**/*.sqlite" | head -n1)
}
inter='/home/christian/Documents/Work/Intersect/';
generate() {
$inter/FAIMS-Tools/generators/christian/generate.sh $@
}
validate() {
$inter/FAIMS-Tools/generators/christian/validate.sh
}
upload() {
doCd=$([ -f upload.py ] || printf true)
[ "$doCd" = true ] && cd module
./upload.py $@
[ "$doCd" = true ] && cd -
}
upload-replace() {
doCd=$([ -f upload.py ] || printf true)
[ "$doCd" = true ] && cd module
./upload.py --replace
[ "$doCd" = true ] && cd -
}
modhash () {
# Prints the hash of the autogen which already built the module
local logicFilePath="module/ui_logic.bsh"
if [ -f "$logicFilePath" ]
then
sed \
-e 's/.* //g' \
-e '2q' \
-e 'd' \
"$logicFilePath"
else
echo "None"
fi
}
PATH=/home/christian/android-ndk-r9c:$PATH
export PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment