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
# Don't do this | |
class SomeFancyClass | |
def my_interesting_method | |
# ... | |
locate_all_the_rainbows(...) | |
# ... | |
end | |
# Hundreds of lines below... | |
def locate_all_the_rainbows(args) |
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
var vows = require('vows') | |
, assert = require('assert') | |
, io = require('socket.io-client') | |
, socket = io.connect('http://localhost:4000'); | |
socket.on('done', function () { | |
socket.disconnect(); | |
}); | |
var userMessages = { |
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
-- Why do both of these definitions work... | |
max' :: (Ord a) => a -> a -> a | |
max' a b | |
| a >= b = a | |
| otherwise = b | |
max' :: (Ord a) => a -> (a -> a) | |
max' a b | |
| a >= b = a |
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
replicate' :: (Num i, Ord i) => i -> a -> [a] | |
replicate' n x | |
| n <= 0 = [] | |
| otherwise = x:replicate' (n - 1) x |
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
D = Class.new | |
def to_s | |
"to ess!" | |
end | |
def to_str | |
"to stir!" | |
end | |
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
Rails 3.1.2 | |
Finished in 1677.71 seconds | |
4185 examples, 0 failures, 3 pending | |
Rails 3.1.1 | |
Finished in 157.91 seconds | |
4185 examples, 0 failures, 3 pending |
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
Uncaught ReferenceError: Mailer is not defined | |
6Unsafe JavaScript attempt to access frame with URL http://www.okcupid.com/messages?readmsg=true&threadid=11263769704670532725&folder=1#send from frame with URL http://ads.okcimg.com/daisy?prev=AdMeld-RTB&format=leader&page=Mailbox. Domains, protocols and ports must match. | |
6Unsafe JavaScript attempt to access frame with URL http://www.okcupid.com/messages?readmsg=true&threadid=11263769704670532725&folder=1#send from frame with URL http://ads.okcimg.com/daisy?prev=AdMeld-RTB&format=sky&page=Mailbox. Domains, protocols and ports must match. | |
Unsafe JavaScript attempt to access frame with URL http://ads.okcimg.com/daisy?format=leader&base=1&page=Mailbox&authid=1%2c0%2c1321059550%2c0xff71beb99d1b6c8e%3b33a30fb0582569564ef9ecde126a859406459534&pageurl=%2fmessages&cachebust=51349 from frame with URL http://www.okcupid.com/messages?readmsg=true&threadid=11263769704670532725&folder=1#send. Domains, protocols and ports must match. | |
Unsafe JavaScript attempt to access frame |
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
-----> Heroku receiving push | |
-----> Ruby/Rack app detected | |
-----> Gemfile detected, running Bundler version 1.0.7 | |
Unresolved dependencies detected; Installing... | |
Using --without development:test | |
You have modified your Gemfile in development but did not check | |
the resulting snapshot (Gemfile.lock) into version control | |
You have deleted from the Gemfile: | |
* growl_notify |
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
var fs = require('fs') | |
, libxmljs = require('libxmljs') | |
, doc = fs.createReadStream('sax_parser.xml', { encoding: 'utf8' }); | |
var parser = new libxmljs.SaxPushParser(function (p) { | |
var characters = ''; | |
p.onStartDocument(function () { | |
console.log('Start parsing'); | |
console.time('XML Parsing'); |
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
# RSpec matcher to spec delegations. | |
# | |
# Usage: | |
# | |
# describe Post do | |
# it { should delegate(:name).to(:author).with_prefix } # post.author_name | |
# it { should delegate(:month).to(:created_at) } | |
# it { should delegate(:year).to(:created_at) } | |
# end |