Skip to content

Instantly share code, notes, and snippets.

@karlbright
karlbright / gist:1558768
Created January 4, 2012 06:18 — forked from sj26/gist:1558727
Sorting and merging a set of numbers and ranges
We couldn’t find that file to show.
var http = require('http')
http.createServer(function (req,res) {
res.writeHead(200, {'Content-Type':'text/plain'});
res.end('Hello World! \n');
}).listen(1337,"127.0.0.1");
console.log('Server running at http://127.0.0.1:1337//');
@karlbright
karlbright / rspec-syntax-cheat-sheet.rb
Created August 19, 2011 02:23 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# 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")
@karlbright
karlbright / best_model.rb
Created April 27, 2011 00:22 — forked from ltw/best_model.rb
Order of a standard Model
class Model < ParentModel
include Foo::Bar
extend Bar::Baz
acts_as_authentic
dsl_specific_flags
module InternalModule
...
end
# ____ _ _ ____ _
# | _ \ ___ | |__ ___ | |_ | _ \ ___ ___| | __
# | |_) / _ \| '_ \ / _ \| __| | |_) / _ \ / __| |/ /
# | _ < (_) | |_) | (_) | |_ | _ < (_) | (__| <
# |_| \_\___/|_.__/ \___/ \__| |_| \_\___/ \___|_|\_\
#
# 1. http://en.wikipedia.org/wiki/Special:Random
# The first article title on the page is the name of your band.
#
# 2. www.quotationspage.com/random.php3
http_path = "/"
http_stylesheets_path = "/stylesheets"
http_images_path = "/images"
http_javascripts_path = "/javascripts"
sass_dir = "sass"
css_dir = "public/stylesheets"
images_dir = "public/images"
javascripts_dir = "public/javascripts"