From 461f3170d2c98d88b9fbfe0df4021722dbbc0e7a Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Mon, 4 Jan 2016 14:34:29 +0200 Subject: [PATCH] Refactor bash aliases --- .bash_aliases | 73 +++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 1583e85..13a1327 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -1,40 +1,4 @@ -alias grep="grep --color=auto" -alias c="clear" - -alias be="bundle exec" - -alias share="python -m SimpleHTTPServer" - -# Mac OS Specific -# Need to export these to a different file for mac specific aliases -alias showfiles="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app" -alias hidefiles="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app" -alias startvpn="sudo launchctl load -w /Library/LaunchDaemons/net.juniper.AccessService.plist; open -a '/Applications/Junos Pulse.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray'" -alias quitvpn="osascript -e 'tell application \"PulseTray.app\" to quit';sudo launchctl unload -w /Library/LaunchDaemons/net.juniper.AccessService.plist" - -alias cask="brew cask" - -# Easier APT -alias install="sudo apt-get install" -alias purge="sudo apt-get purge" -alias search="sudo apt-cache search" -alias remove="sudo apt-get remove" -alias autoremove="sudo apt-get autoremove" - -# PC Info -alias mountinfo="mount | column -t" -alias meminfo="free -mlt" -alias driveinfo="df -h" - -# Launchers -alias lstart="sudo /opt/lampp/lampp start" -alias lstop="sudo /opt/lampp/lampp stop" -alias pgstart="sudo service postgresql start" -alias pgstop="sudo service postgresql stop" -alias sass_watch="sass --watch ./:./" -alias s="sublime" -alias minecraft='padsp java -Xmx2048M -Xms1024M -cp ~/Minecraft/minecraft.jar net.minecraft.LauncherFrame' - +##### Platform independent ##### # Git Aliases alias g="git" alias much="git" @@ -62,10 +26,45 @@ alias vimrc="vim ~/.vimrc" # CD-ing to some commonly used folders alias og="cd ~/Git" +alias sass_watch="sass --watch ./:./" +alias s="sublime" +alias grep="grep --color=auto" +alias c="clear" +alias be="bundle exec" +alias share="python -m SimpleHTTPServer" + +##### Mac OS Specific ##### +alias showfiles="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app" +alias hidefiles="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app" +alias startvpn="sudo launchctl load -w /Library/LaunchDaemons/net.juniper.AccessService.plist; open -a '/Applications/Junos Pulse.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray'" +alias quitvpn="osascript -e 'tell application \"PulseTray.app\" to quit';sudo launchctl unload -w /Library/LaunchDaemons/net.juniper.AccessService.plist" + +alias cask="brew cask" + +##### Ubuntu/Linux Specific ##### +# Easier APT +alias install="sudo apt-get install" +alias purge="sudo apt-get purge" +alias search="sudo apt-cache search" +alias remove="sudo apt-get remove" +alias autoremove="sudo apt-get autoremove" + # Secondary Monitor alias monitor_enable="xrandr --output CRT1 --auto --right-of LVDS" alias monitor_disable="xrandr --output CRT1 --off" +# PC Info +alias mountinfo="mount | column -t" +alias meminfo="free -mlt" +alias driveinfo="df -h" + +# Launchers +alias lstart="sudo /opt/lampp/lampp start" +alias lstop="sudo /opt/lampp/lampp stop" +alias pgstart="sudo service postgresql start" +alias pgstop="sudo service postgresql stop" + + if [ -f ~/.bash_local_aliases ]; then . ~/.bash_local_aliases fi \ No newline at end of file