Skip to content

Instantly share code, notes, and snippets.

@fhamon
Last active January 9, 2019 15:37
Show Gist options
  • Save fhamon/aef1635399bb52c583d3e2d1ec9b1eae to your computer and use it in GitHub Desktop.
Save fhamon/aef1635399bb52c583d3e2d1ec9b1eae to your computer and use it in GitHub Desktop.
# Navigation
alias cd-='cd -'
alias cd.='cd ..'
alias cd..='cd ..'
# Misc
alias c='clear'
alias code='code .'
alias e='explorer .'
alias ll='ls -l'
alias ls='ls -F --color=auto --show-control-chars'
alias sniff='nodemon --exec "node app.js -vt -p 8000" -e js,json,html'
alias bs2fs="sed 's/\\\\/\\//g'"
alias profile='code ~/.bash_profile'
# SVN
alias d='svn diff | colordiff | diff-so-fancy'
alias sc='svn commit -m'
alias scr='svn commit --non-recursive -m'
alias ss="svn status | bs2fs"
alias suo='sup'
alias sup='svn up | bs2fs'
alias sup.='sup'
alias sup^='sup'
alias sup¸='sup'
alias svn-add='svn st | grep '\''^?'\'' | sed '\''s/^[? ]*/"/'\'' | sed '\''s/$/"/'\'' | xargs svn add'
alias svn-clean='svn status | grep '\''^?'\'' | awk '\''{print }'\'' | xargs rm -rf'
alias svn-ignore='svn propedit svn:ignore'
alias svn-rm='svn st | grep '\''^!'\'' | sed '\''s/^[! ]*/"/'\'' | sed '\''s/$/"/'\'' | xargs svn rm'
# GIT
alias g='git'
alias gca='g commit -a -m'
alias gc='g commit -m'
alias gco='g checkout'
alias gp='g push'
alias gl="git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
# Apps
alias mysql='winpty mysql -u root'
alias node='winpty node.exe'
alias php='winpty php.exe'
# PHP
alias pl='ss | grep '\''M'\'' | awk '\''/M (.+)\.php/ { print $2; system("php -l " "$2"); }'\'''
alias composer='php ~/composer.phar'
# Exports
export CLICOLOR=1
export FORCE_COLOR=1
export ANSICON=true
export NODE_REPL_HISTORY_SIZE='32768';
export NODE_REPL_MODE='sloppy';
export PYTHONIOENCODING='UTF-8';
export HISTSIZE='32768';
export HISTFILESIZE="${HISTSIZE}";
export HISTCONTROL='ignoreboth:erasedups';
export LANG='en_US.UTF-8';
export LC_ALL='en_US.UTF-8';
# Imports
. ~/z/z.sh
. ~/.secret
# Node stuff :heart:
_node_complete() {
local cur_word options
cur_word="${COMP_WORDS[COMP_CWORD]}"
if [[ "${cur_word}" == -* ]] ; then
COMPREPLY=( $(compgen -W '--inspect-port --icu-data-dir --title --trace-event-categories --pending-deprecation --version --trace-event-file-pattern --expose-http2 --loader --help --v8-pool-size --trace-sync-
io --zero-fill-buffers --security-reverts --completion-bash --preserve-symlinks --use-bundled-ca --v8-options --perf-prof --preserve-symlinks-main --openssl-config --no-deprecation --tls-cipher-list --expose-int
ernals --use-openssl-ca [ssl_openssl_cert_store] --debug --track-heap-objects --expose_http2 --experimental-repl-await --experimental-modules --experimental-vm-modules --abort-on-uncaught-exception --max-old-spa
ce-size --trace-warnings --perf-basic-prof --inspect --interactive --stack-trace-limit --no-warnings --experimental-worker --no-force-async-hooks-checks --prof-process --redirect-warnings --throw-deprecation --t
race-deprecation --check [has_eval_string] --eval --print --require --napi-modules --inspect-brk --debug-brk --inspect-brk-node -v --debug-port --trace-events-enabled -h --print <arg> --prof-process --debug-brk=
-c -pe -e -p -r -i --inspect-brk= --inspect= --debug= --inspect-brk-node=' -- "${cur_word}") )
return 0
else
COMPREPLY=( $(compgen -f "${cur_word}") )
return 0
fi
}
complete -F _node_complete node node_g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment