Skip to content

Instantly share code, notes, and snippets.

View stevenringo's full-sized avatar

Steven Ringo stevenringo

View GitHub Profile
// pastie-style syntax colouring for jekyll's syntax highlighter
pre
color: #ccc
font-size: 13px
background: #fff
line-height: 1.5em
border: #aaa 1px solid
overflow-x: auto
overflow-y: hidden
%p
Blah blah blah blah
%a(href='#foo') foo
and
%a(href='#bar') bar
\.
-# The problem with the above Haml fragment is that I am left with a space after <a href='#bar'>bar</a> and before the period.
-# Haml's whitespace removal does not resolve the issue, because it can either remove ALL whitespace
-# around an element or ALL whitespace within an element. Neither option seems to fit the bill.
/ http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#whitespace_removal__and_
/ Use like so
%p
Blah blah blah blah
%a(href='#foo') foo
%a(href='#bar')> bar
\.
@stevenringo
stevenringo / warnings
Created June 24, 2011 01:44
RSpec deprecation warnings for files without \require 'spec_helper'\ in the /lib directory in rails
*****************************************************************
DEPRECATION WARNING: you are using deprecated behaviour that will
be removed from RSpec 3.
You have set some configuration options after an example group has
already been defined. In RSpec 3, this will not be allowed. All
configuration should happen before the first example group is
defined. The configuration is happening at:
@stevenringo
stevenringo / application.sass
Created June 27, 2011 03:55
All compass stylesheet framework imports
// @import compass/css3
// @import compass/layout
// @import compass/reset
// @import compass/reset-legacy
// @import compass/support
// @import compass/typography
// @import compass/utilities
//
// @import compass/css3/appearance
// @import compass/css3/background-clip
@stevenringo
stevenringo / gist:1077311
Created July 12, 2011 03:02
Has Many through factory with fabricator
class Country < ActiveRecord::Base
has_many :registrations
has_many :members
has_many :distribution_groups, :through => :members
end
class DistributionGroup < ActiveRecord::Base
has_many :members
has_many :countries, :through => :members
end
@stevenringo
stevenringo / database.yml
Created August 9, 2011 12:22
SQLite database.yml file for rails
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
@stevenringo
stevenringo / install_homebrew.rb
Created August 30, 2011 10:46 — forked from mxcl/install_homebrew.markdown
Installs Homebrew to /usr/local with version before it broke
#!/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like.
module Tty extend self
def blue; bold 34; end
def white; bold 39; end
def red; underline 31; end
def reset; escape 0; end
def bold n; escape "1;#{n}" end
//
// ArtistsViewController.m
// dslcollection
//
// Created by Steven Ringo on 24/10/11.
// Copyright (c) 2011 Jospe. All rights reserved.
//
#import "ArtworksViewController.h"
@stevenringo
stevenringo / httpfeeds.5by5.tvbuildanalyze
Created October 9, 2012 21:17
Downcast app not updating metadata
Old title and description are shown, although feed URL seems to be updated.