Skip to content

Instantly share code, notes, and snippets.

@KristofferHebert
Last active August 29, 2015 14:02
Show Gist options
  • Save KristofferHebert/ea9eace33c8b3d0abb2f to your computer and use it in GitHub Desktop.
Save KristofferHebert/ea9eace33c8b3d0abb2f to your computer and use it in GitHub Desktop.

Revisions

  1. Kristoffer Hebert revised this gist Aug 17, 2014. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    # load z script
    . /usr/local/bin/z.sh

    # load sexy prompt
    . /usr/local/bin/prompt.sh

    # shorthand for change to parent folder
    .. (){
    cd ..
    @@ -70,6 +74,7 @@ server(){
    http-server
    }


    # open bash_profile file

    bash-profile() {
  2. Kristoffer Hebert revised this gist Aug 17, 2014. 1 changed file with 21 additions and 4 deletions.
    25 changes: 21 additions & 4 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    . /usr/local/bin/z.sh

    # shorthand for change to parent folder
    .. (){
    cd ..
    @@ -35,7 +37,7 @@ firefox(){

    # open in Chrome
    chrome(){
    open $1 -a Google Chrome
    open $1 -a 'Google Chrome'
    }

    # open in Safari
    @@ -53,14 +55,29 @@ testall() {
    firefox $1; chrome $1; safari $1;
    }

    # shorthand for git status
    gs() {
    git status
    }

    # shorthand for git status
    gd() {
    git diff
    }

    # shortcut for http-server
    server(){
    http-server
    }

    # open bash_profile file

    bash_profile() {
    bash-profile() {
    open /Users/$USER/.bash_profile
    }

    # reload bash_profile file
    # reload bash-profile file

    r_bash_profile() {
    r-bash-profile() {
    . /Users/$USER/.bash_profile
    }
  3. Kristoffer Hebert revised this gist Jun 5, 2014. 1 changed file with 22 additions and 10 deletions.
    32 changes: 22 additions & 10 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -2,53 +2,65 @@
    .. (){
    cd ..
    }

    # change directory to Sites folder
    sites (){
    cd /Users/$USER/Sites
    }

    # change directory to Desktop folder
    desktop (){
    cd /Users/$USER/Desktop
    }

    # change directory to htdocs for XAMPP
    htdocs(){
    cd /Applications/XAMPP/xamppfiles/htdocs
    }

    # create file and open file
    tap(){
    touch $1 && open $1
    }

    # create folder and change directory into folder
    mk(){
    mkdir $1 && cd $1
    }

    # open in Firefox
    firefox(){
    open $1 -a Firefox
    }

    # open in Chrome
    chrome(){
    open $1 -a Google Chrome
    }

    # open in Safari
    safari(){
    open $1 -a Safari
    }

    # open in Sublime
    sublime(){
    open $1 -a "Sublime Text"
    }

    # open file in all browsers
    testall() {
    firefox $1; chrome $1; safari $1;
    }

    # open bash_profile file

    bash_profile() {
    open /Users/$USER/.bash_profile
    }

    # reload bash_profile file

    r_bash_profile() {
    . /Users/$USER/.bash_profile
    }
  4. Kristoffer Hebert revised this gist Jun 5, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -47,6 +47,8 @@ safari(){
    sublime(){
    open $1 -a "Sublime Text"
    }

    # open file in all browsers
    testall() {
    firefox $1; chrome $1; safari $1;
    }
  5. Kristoffer Hebert revised this gist Jun 5, 2014. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,3 @@
    export PATH=$PATH:/usr/local/git/bin/

    # shorthand for change to parent folder
    .. (){
    cd ..
  6. Kristoffer Hebert created this gist Jun 5, 2014.
    54 changes: 54 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    export PATH=$PATH:/usr/local/git/bin/

    # shorthand for change to parent folder
    .. (){
    cd ..
    }

    # change directory to Sites folder
    sites (){
    cd /Users/$USER/Sites
    }

    # change directory to Desktop folder
    desktop (){
    cd /Users/$USER/Desktop
    }

    # change directory to htdocs for XAMPP
    htdocs(){
    cd /Applications/XAMPP/xamppfiles/htdocs
    }

    # create file and open file
    tap(){
    touch $1 && open $1
    }

    # create folder and change directory into folder
    mk(){
    mkdir $1 && cd $1
    }

    # open in Firefox
    firefox(){
    open $1 -a Firefox
    }

    # open in Chrome
    chrome(){
    open $1 -a Google Chrome
    }

    # open in Safari
    safari(){
    open $1 -a Safari
    }

    # open in Sublime
    sublime(){
    open $1 -a "Sublime Text"
    }
    testall() {
    firefox $1; chrome $1; safari $1;
    }