Delete all your CouchDB databases:
rm -Rf /usr/local/var/lib/couchdb/*
URL to browse CouchDB databases: 127.0.0.1:5984/_utils
# Random chars | |
chars = ('a'..'z').to_a + ('A'..'Z').to_a | |
(0...10).collect { chars[Kernel.rand(chars.length)] }.join | |
=> "nmhhuMrybz" |
# Rebase | |
$ git commit -a -m "Commit message" | |
$ git fetch | |
$ git rebase [branch] # origin/master | |
$ git push | |
# Stash | |
$ git stash | |
$ git pull | |
$ git stash apply |
#!/usr/bin/env ruby | |
require 'fileutils' | |
def fail!(msg = "Failure!") | |
puts(msg) | |
exit(1) | |
end | |
REPOSITORY_URL = 'git://github.com/mexpolk/homebrew.git' | |
PACKAGE_URL = 'http://github.com/mexpolk/homebrew/tarball/master' |
Delete all your CouchDB databases:
rm -Rf /usr/local/var/lib/couchdb/*
URL to browse CouchDB databases: 127.0.0.1:5984/_utils
# Don't you ever use this on production environment | |
rake db:migrate:reset db:seed db:test:clone --trace |
find ./app/views/comments/ -name '*erb' | \ | |
xargs ruby -e 'ARGV.each { |i| puts "html2haml -r #{i} #{i.sub(/erb$/,"haml")}"}' | \ | |
bash |
// Defining constructor function | |
function ObjectConstructor(message) { | |
// TODO: Add your own initialization code here | |
this.message = message || 'Hello Prototype World!'; | |
}; | |
// Defining an instance function | |
ObjectConstructor.prototype.sayHello = function() { | |
alert(this.message); | |
}; |
// Defining constructor function | |
function SingletonObject() { | |
// TODO: Add your own initialization code here | |
this._message = 'Hello Prototype World!'; | |
}; | |
// Current instance property | |
SingletonObject._instance = null; | |
SingletonObject.getInstance = function() { |