docker run \
--volumes-from dbdata \
-v $(pwd):/backup \
ubuntu \
tar cvf /backup/backup.tar /dbdata
This file contains 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
// GetIPv4Address returns this node's IPv4 IP Address | |
// If more than one IP address found, call GetPreferredOutboundIP | |
// 127.0.0.1 will be returned if no other IPv4 addresses are found; | |
// otherwise, the non 127.0.0.1 address will be returned | |
// Assumes node has at least one interface (and the 127.0.0.1 address) | |
// If any errors occur, 127.0.0.1 will be returned | |
func getIPv4Address() (net.IP, error) { | |
ifaces, err := net.Interfaces() | |
if err != nil { | |
return nil, err |
I hereby claim:
- I am l3x on github.
- I am l3x (https://keybase.io/l3x) on keybase.
- I have a public key ASBtYxVg2aS3mySdG3uJvcAtB4bUMuKnacLI6LGMmF3j7go
To claim this, I am signing this object:
This file contains 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
# filename: install-nvm-npm-node | |
# author: Lex Sheehan | |
# purpose: To cleanly install NVM, NODE and NPM | |
# dependencies: brew | |
# see: http://lexsheehan.blogspot.com/2015/04/cleanly-install-nvm-node-and-npm.html | |
NOW=$(date +%x\ %H:%M:%S) | |
CR=$'\n' | |
REV=$(tput rev) |
This file contains 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
# filename: install-nvm-npm-node | |
# author: Lex Sheehan | |
# purpose: To cleanly install NVM, NODE and NPM | |
# dependencies: brew | |
# references: http://lexsheehan.blogspot.com/2015/04/cleanly-install-nvm-node-and-npm.html | |
NOW=$(date +%x\ %H:%M:%S) | |
CR=$'\n' | |
REV=$(tput rev) | |
OFF=$(tput sgr0) |
This file contains 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
# What I want is a Rails or Merb plugin that: | |
# | |
# * Prints "START" at the start and "END" at the end of each method. | |
# * That only requires me to enter acts_as_traceable in the class that I want to trace | |
# | |
# Output should look something like this: | |
# | |
# *** START myclass.mymethod *** | |
# processing... | |
# *** myclass.mymethod *** |