- full presentation: public.jm3.net
- alternatively: 140proof.github.io/d3-drift
- view Bl.ock: bl.ocks.org/jm3/9768799
- view Gist: gist.github.com/jm3/9768799
This file contains 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
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
This file contains 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
# 1 | |
class Blah | |
private | |
def method1 | |
end | |
def method2 |
This file contains 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
bash -c ' | |
if [ ! -f /usr/local/bin/chef-client ]; then | |
apt-get update | |
apt-get -y upgrade | |
apt-get install -y build-essential wget zlib1g-dev libssl-dev libffi-dev | |
cd /usr/src | |
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p180.tar.bz2 | |
tar xjf ruby-1.9.2-p180.tar.bz2 | |
cd ruby-1.9.2-p180 | |
./configure |
This file contains 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
# coding: utf-8 | |
import struct | |
with open('in.bmp', 'rb') as fd, open('out.bmp', 'wb') as out: | |
s = fd.read(1) | |
count = 1 | |
while s: | |
if count < 37: # header bytes | |
out.write(s) |
This file contains 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
Factory.define :application do |factory| | |
factory.attachment(:sample, "public/samples/sample.doc", "application/msword") | |
end |
This file contains 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 File.dirname(__FILE__) + '/../spec_helper' | |
describe AccountController do | |
as_any_user :get => :show do | |
it { should assign_to(:user, :with => @current_user)} | |
it { should respond_with(:success) } | |
end | |
as_any_user :get => :edit do | |
it { should assign_to(:user, :with => @current_user)} |