Skip to content

Instantly share code, notes, and snippets.

@themsaid
Last active December 1, 2020 19:09
Show Gist options
  • Select an option

  • Save themsaid/ac0af4f66d004b5448bff3a8d8aa9168 to your computer and use it in GitHub Desktop.

Select an option

Save themsaid/ac0af4f66d004b5448bff3a8d8aa9168 to your computer and use it in GitHub Desktop.

Revisions

  1. themsaid revised this gist May 5, 2017. No changes.
  2. themsaid revised this gist May 5, 2017. 1 changed file with 19 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions scripts.bash
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,12 @@
    alias art="php artisan"
    alias dracarys="git reset --hard && git clean -df"
    alias phpfix="php php-cs-fixer.phar fix"
    alias weather='curl -s wttr.in/Hurghada | sed -n "2,7p"'
    alias usd='curl -s "https://www.google.com/finance/converter?a=1&from=USD&to=EGP" | LC_CTYPE=C sed "/res/!d;s/<[^>]*>//g"'
    alias shrug="echo '¯\_(ツ)_/¯' | pbcopy";
    alias fight="echo '(ง'̀-'́)ง' | pbcopy";
    alias happy="echo 'ᕕ( ᐛ )ᕗ' | pbcopy";

    # Commit all the current changes with a message
    function comme {
    git add --all
    @@ -35,4 +44,14 @@ function pushme {
    fi

    git push origin ${br/* /}
    }

    # Checkout a git branch
    function co {
    git checkout "$1"
    }

    # Checkout a new git branch
    function cob {
    git checkout -b "$1"
    }
  3. themsaid created this gist Aug 6, 2016.
    38 changes: 38 additions & 0 deletions scripts.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    # Commit all the current changes with a message
    function comme {
    git add --all

    if (($# > 1)); then
    params=''
    for i in $*;
    do
    params=" $params $i"
    done

    git commit -m "$params"
    else
    git commit -m "$1"
    fi
    }

    # Commit the current changes and push to the current branch
    function pushme {
    br=`git branch | grep "*"`

    git add --all

    if (($# > 1)); then

    params=''
    for i in $*;
    do
    params=" $params $i"
    done

    git commit -m "$params"
    else
    git commit -m "$1"
    fi

    git push origin ${br/* /}
    }