Skip to content

Instantly share code, notes, and snippets.

@purpleidea
Created February 4, 2014 05:04
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 purpleidea/8798413 to your computer and use it in GitHub Desktop.
Save purpleidea/8798413 to your computer and use it in GitHub Desktop.
Code and slides from "Quick DevOps Hacks" lightning talk.
# slides
Available at:
https://dl.dropboxusercontent.com/u/48553683/quick-devops-hacks-devopsmtl-2014.pdf
# show the exit status in your $PS1
Article and code at:
https://ttboj.wordpress.com/2014/01/29/show-the-exit-status-in-your-ps1/
# avoid typing 'cd ..' over and over
(Put in your ~/.bash_aliases, or your ~/.bashrc)
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias .......='cd ../../../../../..'
alias ........='cd ../../../../../../..'
# strace scripts with pidof -x
Article and examples at:
https://ttboj.wordpress.com/2013/10/26/easier-strace-of-scripts-with-pidof-x/
# safely paste in channel with vipe
Examples:
$ ./devopsmtl | vipe | fpaste -o
$ echo devopsmtl | vipe | xsel
# launch any program from the shell
Looking forward to seeing if someone can come up with a better solution.
I have similar scripts in my ~/bin for nautilus, evince, nemo, etc...
$ cat ~/bin/gedit
#!/bin/bash
{ `/usr/bin/gedit "$@" &> /dev/null`; } < /dev/stdin &
# vagrant vsftp, vscreen, & vcssh
Articles and examples at:
https://ttboj.wordpress.com/2013/12/21/vagrant-vsftp-and-other-tricks/
https://ttboj.wordpress.com/2014/01/02/vagrant-clustered-ssh-and-screen/
In concentrated form at:
https://gist.github.com/purpleidea/8071962
# cowsay
Example:
$ cowsay 'The Technical Blog of James is mooorvelous!'
Hope you enjoyed the talk, and thank you for listening.
- James
@purpleidea (twitter/irc)
https://ttboj.wordpress.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment