Skip to content

Instantly share code, notes, and snippets.

@linkarys
Created April 20, 2014 01:08
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 linkarys/11102231 to your computer and use it in GitHub Desktop.
Save linkarys/11102231 to your computer and use it in GitHub Desktop.
command line profile
# See http://www.shellperson.net/using-sudo-with-an-alias/
alias sudo='sudo '
# This helps me edit files that my user isn't the owner of
alias edit='SUDO_EDITOR="open -FWne" sudo -e'
# The alias that takes me here - to editing these very aliases
alias edit_profile='open -e ~/.profile'
# I do a lot of web development, so I need to edit these non-owned files fairly often
alias edit_hosts='edit /etc/hosts'
alias edit_httpd='edit /etc/apache2/httpd.conf'
alias edit_php='edit /etc/php.ini'
alias edit_vhosts='edit /etc/apache2/extra/httpd-vhosts.conf'
# Some of my goto commands, including one to open the php extension folder for when I need to install custom extensions
alias goto_mw='goto_web; cd mindworks'
alias goto_web='cd ~/Sites'
alias goto_phpext='sudo open /usr/lib/php/extensions/no-debug-non-zts-20100525'
# This alias recursively destroys all .DS_Store files in the folder I am currently in
alias killDS='find . -name *.DS_Store -type f -delete'
# An alias to start my custom MySQL installation instead of the default one
alias mysql='/usr/local/mysql-5.5.25-osx10.6-x86_64/bin/mysql -u root'
# This alias reloads this file
alias reload_profile='. ~/.profile'
# Mac get stuck very often and are extremely slow and unstable on shutdowns. This forces a shutdown.
alias poweroff='sudo /sbin/shutdown -h now'
# Setting for the new UTF-8 terminal support in Lion / Mountain Lion
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Adds all these paths to the PATH variable. The colon (:) is the path separator.
# When you need to "add something to path" you're supposed to add the path to its executable file to this list of paths, separated by a colon.
export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment