This file contains hidden or 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
require "yaml" | |
ROOT = File.expand_path('..', File.dirname(__FILE__)) | |
puts "Project root: #{ROOT}" | |
db_file = File.join(ROOT, "config", "database.yml") | |
puts "database.yml path: #{db_file}" | |
db_configuration = YAML.load_file(db_file) | |
puts "Database configuration:" |
This file contains hidden or 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 | |
set -o errexit | |
git filter-branch --tree-filter "git rm -r -f --ignore-unmatch *.psd" HEAD | |
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune |
This file contains hidden or 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
Host devbox | |
Hostname localhost | |
Port 2222 | |
User strika | |
ForwardX11 yes | |
ForwardX11Trusted yes | |
ForwardAgent yes | |
StrictHostKeyChecking no | |
UserKnownHostsFile=/dev/null |
This file contains hidden or 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
gem list | cut -d" " -f1 | xargs gem uninstall -aIx |
This file contains hidden or 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
def generate_token | |
token = Digest::SHA1.hexdigest([Time.now, rand].join) | |
end |
This file contains hidden or 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
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install git |
This file contains hidden or 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
class NullObject | |
def nil?; true; end | |
def !; true end | |
def to_a; []; end | |
def to_s(*args); ""; end | |
def to_str(*args); ""; end | |
def to_f(*args); 0.0; end | |
def to_i(*args); 0; end | |
def method_missing(*args, &blk) | |
self |
This file contains hidden or 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
VBoxManage modifyvm "mybox" --natpf1 "rails,tcp,,3000,,3000" | |
VBoxManage modifyvm "mybox" --natpf1 "guestssh,tcp,,2222,,22" |
NewerOlder