Skip to content

Instantly share code, notes, and snippets.

@cupakromer
cupakromer / .rspec
Created June 10, 2012 13:16 — forked from coreyhaines/.rspec
Loading just active record
--colour
-I app
require "money"
class Decorator < BasicObject
undef_method :==
def initialize(component)
@component = component
end
def method_missing(name, *args, &block)
alias duf='du -sk * | sort -n | perl -ne '\''($s,$f)=split(m{\t});for (qw(K M G)) {if($s<1024) {printf("%.1f",$s);print "$_\t$f"; last};$s=$s/1024}'\'

Bearded's Hourly Contract

Date: [[Date of Document]] Between [Our Company] and [Your Company]

Summary

We’re not big on formality, but sometimes it’s best to have a few simple things written down so that we’re all on the same page. In this contract you won’t find complicated legal terms or large passages of unreadable text. We have no desire to trick you into signing something that you might later regret. We do want what’s best for the safety of both parties, now and in the future.

@cupakromer
cupakromer / hilong.rb
Created February 14, 2014 17:51 — forked from jstorimer/hilong.rb
#!/usr/bin/env ruby
# A simply utility to show character counts for each line of input and
# highlight lines longer than 80 characters.
#
# Written as an example for http://jstorimer.com/2011/12/12/writing-ruby-scripts-that-respect-pipelines.html
#
# Examples:
#
# $ hilong Gemfile
#!/bin/bash
for path in `rbenv root`"/versions/"*; do
if [ -d "$path" ] && [ ! -h "$path" ]; then
export RBENV_VERSION="${path##*/}"
echo "=== Running 'rake spec' for $RBENV_VERSION ==="
rm -f Gemfile.lock
rbenv exec bundle install --local
rbenv exec rake spec
echo && echo
RSpec.configure do |config|
config.around(:each) do |example|
# disabled by design
# example.call
end
end
__END__
if i have the above rspec config in `spec_helper.rb` and i run a test
require 'spec_helper'
describe SimplySettings do
before do
Rails.cache.clear
end
subject(:settings) { SimplySettings }
ruby-2.0.0-p353
gem 'jekyll', '~> 2.0.0.alpha'
gem 'nokogiri'
gem 'redcarpet'
gem 'rouge'