Skip to content

Instantly share code, notes, and snippets.

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"
# ____ _ _ ____ _
# | _ \ ___ | |__ ___ | |_ | _ \ ___ ___| | __
# | |_) / _ \| '_ \ / _ \| __| | |_) / _ \ / __| |/ /
# | _ < (_) | |_) | (_) | |_ | _ < (_) | (__| <
# |_| \_\___/|_.__/ \___/ \__| |_| \_\___/ \___|_|\_\
#
# 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
@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
@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")
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 / 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.
@karlbright
karlbright / gist:2020188
Created March 12, 2012 06:10 — forked from dx7/gist:1333785
Installing ruby-debug with ruby-1.9.3-p0
# Install with:
# bash < <(curl -L https://raw.github.com/gist/1333785)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p0 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@karlbright
karlbright / border.css
Created May 2, 2012 23:47 — forked from nrrrdcore/border.css
Faded/Gradient Borders in Pure CSS
.border-container {
width: 28%; /* border will be on the left on this container */
float: right;
overflow: hidden; /* only needed if floating container */
min-height: 600px; /* static height if you want your container to be taller than its content */
-moz-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
-webkit-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF;
border-width: 0 0 0 1px;
-webkit-border-image:
@karlbright
karlbright / build.js
Created June 7, 2012 23:02 — forked from millermedeiros/build.js
sample node.js build script including RequireJS optimizer (r.js) and copy/delete/filter files
var _cli = require('commander'),
_glob = require('glob'),
_minimatch = require('minimatch'),
_wrench = require('wrench'),
_fs = require('fs'),
_path = require('path'),
_requirejs = require('requirejs');
@karlbright
karlbright / pop-stripe.md
Created July 19, 2012 04:38
Rainbow stripe mixin with SCSS + Compass

Rainbow stripe mixin with SCSS + Compass

Usage

div
  height: 100px
  width: 100px

div.rainbow-1