This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
- Fugitive | |
- Rails Vim | |
- endwise | |
- ragtag | |
- surround | |
- matchit | |
- snipmate | |
- repeat.vim |
class Achievement | |
WEIGHT = 100 | |
class << self | |
attr_accessor :all | |
end | |
self.all = [] | |
attr_accessor :badge |
grep "should_have_many" spec/* -Ril | xargs sed -i "s/should_have_many\(.*\)/it { should have_many\1 }/g" | |
grep "should_have_one" spec/* -Ril | xargs sed -i "s/should_have_one\(.*\)/it { should have_one\1 }/g" | |
grep "should_belong_to" spec/* -Ril | xargs sed -i "s/should_belong_to\(.*\)/it { should belong_to\1 }/g" | |
grep "should_validate_presence_of.*" spec/* -Ril | xargs sed -i "s/should_validate_presence_of\(.*\)/it { should validate_presence_of\1 }/g" | |
grep "should_validate_uniqueness_of.*" spec/* -Ril | xargs sed -i "s/should_validate_uniqueness_of\(.*\)/it { should validate_uniqueness_of\1 }/g" | |
grep "should_validate_numericality_of.*" spec/* -Ril | xargs sed -i "s/should_validate_numericality_of\(.*\)/it { should validate_numericality_of\1 }/g" | |
grep "should_validate_acceptance_of.*" spec/* -Ril | xargs sed -i "s/should_validate_acceptance_of\(.*\)/it { should validate_acceptance_of\1 }/g" | |
grep "should have_many :.*through.*" spec/* -Ril | xargs sed -i 's/should have_many :\([a-z_=>]*\),.*:through => :\(.*\) |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.fire(); |
const NumberOfGoroutines = 15 | |
func main() { | |
var wg sync.WaitGroup | |
channel := make(chan string, NumberOfGoroutines) | |
redisch := make(chan *namesp.Metric, 3) | |
for i := 0; i < NumberOfGoroutines; i++ { | |
wg.Add(1) |
require "nokogiri" | |
require "upmark" | |
require "time" | |
BLACKLIST = ["pothix", "ilmo francisco m. melo"] | |
def tags_for element | |
element.xpath("category").map do |cat| | |
cat.text.downcase if cat["domain"] == "post_tag" | |
end.compact |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
printf "\n\n\n\n\n\n\n" | openssl req -new -x509 -keyout /tmp/pemfile.pem -out /tmp/pemfile.pem -days 365 -nodes 2>/dev/null | |
cat <<EOF > /tmp/python-https-server.py | |
import ssl | |
import BaseHTTPServer, SimpleHTTPServer | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler |