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
function __rvm_prompt { | |
rvm-prompt ' ' i v g | |
} | |
function __color_prompt { | |
local G='\[\033[01;32m\]' | |
local B='\[\033[01;34m\]' | |
local W='\[\033[00m\]' | |
local R='\[\033[01;31m\]' | |
local Y='\[\033[01;33m\]' |
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
case $ARCH in | |
amd64|i386) | |
default_mirror http://archive.ubuntu.com/ubuntu | |
;; | |
sparc) | |
case $SUITE in | |
gutsy) | |
default_mirror http://archive.ubuntu.com/ubuntu | |
;; | |
*) |
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
#!/bin/bash | |
# | |
# Improved version of http://docs.dotcloud.com/guides/backups/ | |
# | |
HOSTNAME=`hostname` | |
TAG="${HOSTNAME}_$(TZ=UTC date +%Y-%m-%d_%H:%M:%S_UTC)" | |
[ "$3" ] || { | |
echo "Please specify what to backup, how, and where." |
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
var Semaphore = function(callback, context) { | |
this.semaphore = 0; | |
this.callback = callback; | |
this.context = context || this; | |
}; | |
Semaphore.prototype.increment = function(i) | |
{ | |
if (i == undefined) { | |
i = 1; |
NewerOlder