Skip to content

Instantly share code, notes, and snippets.

@scheibinger
Last active April 1, 2016 17:54

Revisions

  1. scheibinger revised this gist Apr 1, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions bash_cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -21,4 +21,9 @@ find . -type d -maxdepth 1 -exec du -hcs {} \; | grep "./"
    #inject public key into another machine authorized_keys
    cat ~/.ssh/id_rsa.pub | ssh vagrant@localhost -p 2222 tee -a '~/.ssh/authorized_keys'

    #ubuntu

    # Fix broken packages, or halt installed stuff
    sudo dpkg --configure -a

    ```
  2. scheibinger revised this gist Apr 1, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions bash_cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -18,4 +18,7 @@ svn log -r {2012-01-01}:HEAD -v
    #misc
    find . -type d -maxdepth 1 -exec du -hcs {} \; | grep "./"

    #inject public key into another machine authorized_keys
    cat ~/.ssh/id_rsa.pub | ssh vagrant@localhost -p 2222 tee -a '~/.ssh/authorized_keys'

    ```
  3. scheibinger revised this gist Apr 1, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions bash_cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,7 @@ sudo netstat -plnt | grep '8080'
    #svn
    svn log -r {2012-01-01}:HEAD -v

    #misc
    find . -type d -maxdepth 1 -exec du -hcs {} \; | grep "./"

    ```
  4. scheibinger revised this gist Apr 1, 2016. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion bash_cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    ```sh
    #show disk usage of folders
    find . -type d -maxdepth 1 -exec du -hcs {} \; | grep "./"

    @@ -12,4 +13,6 @@ cat /tmp/mm.txt | lwp-request -m POST http://localhost:7600/edges/2269000
    sudo netstat -plnt | grep '8080'

    #svn
    svn log -r {2012-01-01}:HEAD -v
    svn log -r {2012-01-01}:HEAD -v

    ```
  5. scheibinger created this gist Apr 1, 2016.
    15 changes: 15 additions & 0 deletions bash_cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #show disk usage of folders
    find . -type d -maxdepth 1 -exec du -hcs {} \; | grep "./"

    #unzip recursively
    find . -name "*.zip" -exec unzip {} \; -exec /bin/rm {} \;

    #curl POST data and newlines
    cat /tmp/mm.txt | curl -d @- http://localhost:3000/message/new
    cat /tmp/mm.txt | lwp-request -m POST http://localhost:7600/edges/2269000

    #netstat
    sudo netstat -plnt | grep '8080'

    #svn
    svn log -r {2012-01-01}:HEAD -v