Last active
November 16, 2022 21:05
-
-
Save jabaltorres/2a66ecc9c447c7a67daf to your computer and use it in GitHub Desktop.
My Bash Profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source ~/.profile | |
| export PATH=/usr/local/bin:$PATH | |
| # This is the bash profile for the machine at work. | |
| # Custom BASH profile | |
| # Add MAMP path to our path | |
| PATH=/Applications/MAMP/bin/php/php5.6.7/bin:/Applications/MAMP/Library/bin:$PATH | |
| export PATH | |
| # Add Sublime Text to Pathx | |
| # export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH | |
| # export EDITOR='subl -w' | |
| # Add Composer's directory to your path | |
| export PATH="$HOME/.composer/vendor/bin:$PATH" | |
| # My aliases. | |
| alias ll="ls -al" | |
| alias clr="clear" | |
| alias up="cd .." | |
| alias fw="foundation watch" | |
| alias htdocs="cd /Applications/MAMP/htdocs" | |
| alias startphp="php -S localhost:8000" | |
| alias dropbox="cd ~/Dropbox" | |
| alias screenshots="cd ~/Dropbox/Screenshots/" | |
| alias startmysql="mysql --host=localhost -uroot -proot" | |
| alias splash="cd ~/Sites/devdesktop/adaptive-dev/docroot/sites/all/themes/splash/" | |
| 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 f='open -a Finder ./' | |
| # qfind: Quickly search for file | |
| alias qfind="find . -name " | |
| # Always list directory contents upon 'cd' | |
| cd() { builtin cd "$@"; ll; } | |
| # cdf: 'Cd's to frontmost window of MacOS Finder | |
| # ------------------------------------------------------ | |
| cdf () { | |
| currFolderPath=$( /usr/bin/osascript <<EOT | |
| tell application "Finder" | |
| try | |
| set currFolder to (folder of the front window as alias) | |
| on error | |
| set currFolder to (path to desktop folder as alias) | |
| end try | |
| POSIX path of currFolder | |
| end tell | |
| EOT | |
| ) | |
| echo "cd to \"$currFolderPath\"" | |
| cd "$currFolderPath" | |
| } | |
| # spotlight: Search for a file using MacOS Spotlight's metadata | |
| # ----------------------------------------------------------- | |
| spotlight () { mdfind "kMDItemDisplayName == '$@'wc"; } | |
| chrome () { | |
| open -a "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" "$1" | |
| } | |
| # some git shortcuts | |
| alias graff="git log --decorate --graph" | |
| alias graf="git log --oneline --decorate --graph --all" | |
| alias lg1="git log --graph --abbrev-commit --decorate" | |
| alias branch="git branch" | |
| alias status="git status" | |
| alias ammend="git commit --amend" | |
| alias pushmaster="git push origin -u master" | |
| alias pushdev="git push origin -u dev" | |
| test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export PATH=/usr/local/bin:$PATH | |
| # This is the bash profile for the machine at work. | |
| # Custom BASH profile | |
| # Add MAMP path to our path | |
| PATH=/Applications/MAMP/bin/php/php5.6.7/bin:/Applications/MAMP/Library/bin:$PATH | |
| export PATH | |
| # Add Sublime Text to Pathx | |
| # export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH | |
| # export EDITOR='subl -w' | |
| # Add Composer's directory to your path | |
| export PATH="$HOME/.composer/vendor/bin:$PATH" | |
| # My aliases. | |
| alias ll="ls -al" | |
| alias clr="clear" | |
| alias up="cd .." | |
| alias fw="foundation watch" | |
| alias htdocs="cd /Applications/MAMP/htdocs" | |
| alias startphp="php -S localhost:8000" | |
| alias dropbox="cd ~/Dropbox" | |
| alias screenshots="cd ~/Dropbox/Screenshots/" | |
| alias startmysql="mysql --host=localhost -uroot -proot" | |
| alias splash="cd ~/Sites/devdesktop/adaptive-dev/docroot/sites/all/themes/splash/" | |
| 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 f='open -a Finder ./' | |
| # qfind: Quickly search for file | |
| alias qfind="find . -name " | |
| # Always list directory contents upon 'cd' | |
| cd() { builtin cd "$@"; ll; } | |
| # cdf: 'Cd's to frontmost window of MacOS Finder | |
| # ------------------------------------------------------ | |
| cdf () { | |
| currFolderPath=$( /usr/bin/osascript <<EOT | |
| tell application "Finder" | |
| try | |
| set currFolder to (folder of the front window as alias) | |
| on error | |
| set currFolder to (path to desktop folder as alias) | |
| end try | |
| POSIX path of currFolder | |
| end tell | |
| EOT | |
| ) | |
| echo "cd to \"$currFolderPath\"" | |
| cd "$currFolderPath" | |
| } | |
| # spotlight: Search for a file using MacOS Spotlight's metadata | |
| # ----------------------------------------------------------- | |
| spotlight () { mdfind "kMDItemDisplayName == '$@'wc"; } | |
| chrome () { | |
| open -a "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" "$1" | |
| } | |
| # some git shortcuts | |
| alias graff="git log --decorate --graph" | |
| alias graf="git log --oneline --decorate --graph --all" | |
| alias lg1="git log --graph --abbrev-commit --decorate" | |
| alias branch="git branch" | |
| alias status="git status" | |
| alias ammend="git commit --amend" | |
| alias pushmaster="git push origin -u master" | |
| alias pushdev="git push origin -u dev" | |
| test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment