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
$gist-background-color: #323C45 | |
$gist-border-color: darken($gist-background-color,2%) | |
#primary .gist | |
width: 500px | |
.gist-file | |
+border-radius(4px) | |
border-color: $gist-border-color | |
overflow: hidden | |
.gist-syntax |
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
<h1>Heading 1</h1><p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p> | |
<h2>Heading 2</h2><p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p> | |
<h3>Heading 3</h3><p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p> | |
<h4>Heading 4</h4><p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p> | |
<h5>Heading 5</h5><p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p> | |
<h6>Heading 6</h6><p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p> | |
<blockquote><p>Paragraph inside Blockquote: Nam libero leo, elementum in, dapibus a, suscipit vitae, purus. Duis arcu. Integer dignissim fermentum enim. Morbi convall |
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
BAILIFF; Circuit court, Department 6-B is now in session, the Honourable Benjamin Kinberg presiding. Thursday, the seventh day of December. | |
MARTIN WELLS: Thursday? It's not Thursday. | |
JANET WILSON: Shh! | |
MARTIN WELLS: (insistent) It's Saturday. Yesterday was Friday and... | |
JANET WILSON: Today is Thursday. There's no court on Saturday. You know that. (concerned) Martin, do you feel all right? |
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 Model < ParentModel | |
include Foo::Bar | |
extend Bar::Baz | |
acts_as_authentic | |
dsl_specific_flags | |
module InternalModule | |
... | |
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
var request = require('request'), jsdom = require('jsdom'), sys = require('sys'); | |
var client = require("ranger").createClient("thefrontiergroup1","5945b6836f9a47654a522d70af824498e348ff9c"); | |
client.room(396980,function(room) { | |
room.listen(function(message) { | |
// start drbl | |
if(message.type == "TextMessage" && message.body.match(/drbl.in\//)) { | |
sys.puts("[event] Got drbl.in link, processing now..."); | |
var url = 'http://' + message.body.match(/drbl.in\/.{4}/)[0]; | |
jsdom.env(url, ['http://code.jquery.com/jquery-1.5.min.js'], function(errors,window) { |
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 connection(options={}) | |
@connection ||= RestClient::Resource.new(\ | |
"#{protocol}://www.pivotaltracker.com/services/v3", \ | |
:headers => {'X-TrackerToken' => @token, 'Content-Type' => 'application/xml'}) | |
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
def connection(options={}) | |
raise NoToken unless @token.present? | |
@connections ||= {} | |
@connections[@token] ||= RestClient::Resource.new(\ | |
"#{protocol}://www.pivotaltracker.com/services/v3", \ | |
:headers => {'X-TrackerToken' => @token, 'Content-Type' => 'application/xml'}) | |
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
Loading development environment (Rails 3.0.7) | |
>> "faxes".singularize | |
=> "fax" | |
>> "fax".pluralize | |
=> "faxes" | |
>> [1, 2, 3].each {|i| p helper.pluralize i, "fax" } | |
"1 fax" | |
"2 faxes" | |
"3 faxes" | |
=> [1, 2, 3] |
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 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'net/http' | |
def OpenURI.redirectable?(uri1, uri2) | |
uri1.scheme.downcase == uri2.scheme.downcase || (/\A(?:http|ftp|https)\z/i =~ uri1.scheme && /\A(?:https?|ftp)\z/i =~ uri2.scheme) | |
end | |
module Daytrotter |
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 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |