Skip to content

Instantly share code, notes, and snippets.

@hadisfr
Last active October 5, 2017 21:05
Show Gist options
  • Save hadisfr/5289cebc90d8153f9593234b43f6d34a to your computer and use it in GitHub Desktop.
Save hadisfr/5289cebc90d8153f9593234b43f6d34a to your computer and use it in GitHub Desktop.
part of ~/.bash_profile
# ~/.bash_profile
alias ls='ls --color=auto'
alias grep="grep --color=auto"
alias diffstat="diffstat -C"
alias hiddneFilesShow='defaults write com.apple.finder AppleShowAllFiles YES && rm ~/.DS_Store; killall Finder /System/Library/CoreServices/Finder.app'
alias hiddneFilesHide='defaults write com.apple.finder AppleShowAllFiles NO && rm ~/.DS_Store; killall Finder /System/Library/CoreServices/Finder.app'
function aria2webui(){
aria2c_session=${HOME}/.aria2c_session
webui_url="http://localhost/~${USER}/webui-aria2/"
touch $aria2c_session
aria2c --enable-rpc --rpc-listen-all --pause-metadata --dir=${HOME}/Downloads --save-session=$aria2c_session --input-file=$aria2c_session -x16 -s16 -k1M &
open -W -n -a safari $webui_url
pkill -15 aria2c
unset aria2c_session
unset webui_url
}
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
complete -cf sudo
export PS1="\[\e[90m\]\h\[\e[97m\]:\[\e[37m\]\W \u\[\e[0m\]\$ "
export EDITOR=nano
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment