- Jim Weirich: The Building Blocks of Modularity – http://goo.gl/g4Nk
- Jim Weirich: SOLID Ruby – http://goo.gl/z3jd
- Sandi Metz: SOLID Object-Oriented Design – http://goo.gl/PDn6T
- Sandi Metz: Less – The Path to Better Design – http://goo.gl/VuTl4
- Demeter is for Encapsulation – http://is.gd/eeyLx
- Opinionated Modular Code – http://is.gd/eeyXm
- Scaling to Hundreds of Millions of Requests – http://vimeo.com/12814529
- Confident Code – http://goo.gl/VFLX
- Destroy All Software Screencasts – https://www.destroyallsoftware.com/screencasts
- Corey Haines: Fast Rails Tests – http://goo.gl/Va2gb
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
# config/initializers/formtastic.rb | |
module FormtasticBootstrap | |
class FormBuilder < Formtastic::FormBuilder | |
# Allow "split-field" inputs such as name (first+last) or location (city+state). | |
# Block contents are wrapped in a ".controls" field set next to the specified | |
# +label+ | |
# | |
# Usage: | |
# |
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
# SASS SECTION | |
BUILD_DIR := tmp/build | |
SASS_SRC_FILES := $(shell find app/sass -name "*.scss" | xargs) | |
SASS_FILES := $(SASS_SRC_FILES:%.scss=$(BUILD_DIR)/%.scss) | |
SASS_MAIN_FILE := $(BUILD_DIR)/app/sass/main.scss | |
SASS_TO_CSS_FILE := app/assets/stylesheets/main.css.erb | |
$(BUILD_DIR)/%.scss: %.scss | |
mkdir -p $(dir $@) |
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
# by bryan helmkamp with slight modification by chris wanstrath | |
# from http://www.brynary.com/2008/8/3/our-git-deployment-workflow | |
module GitCommands | |
extend self | |
def diff_staging | |
`git fetch` | |
puts `git diff origin/production origin/staging` | |
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
desc "Push design to spec" | |
task :design do | |
require 'yaml' | |
specs = YAML::load_file './spec/design.yml' | |
specs.each_pair do |describe, specs_array| | |
spec_file = File.new("./spec/#{describe.downcase.gsub(/ /, '_')}_spec.rb", 'w') | |
spec_file.puts <<-END | |
require File.dirname(__FILE__) + '/spec_helper' | |
describe "#{describe}" do |
resource/
- html
- layout.html
- jobs/{index.html, new.html ...}
- js/
- css/
src/
- cmd
- web/main.go
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
FROM gliderlabs/alpine:3.2 # 1. tiny container | |
MAINTAINER: Anders Törnqvist <...@...com> | |
RUN apk add --update ca-certificates bash | |
COPY . go/src/github.com/unders/program # 2. copy your sorce code | |
RUN apk add go got mercurial \ # 3. add dependencies | |
&& cd /go/src/github.com/unders/program \ | |
&& export GOPATH=/go \ | |
&& go get -t \ # 4. resovel deps |
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
#!/bin/bash | |
VERSION="1.1" | |
REEV="http://rubyforge.org/frs/download.php/48623/ruby-enterprise-1.8.6-20081215.tar.gz" | |
REEF="ruby-enterprise-1.8.6-20081215.tar.gz" | |
REEFF=${REEF%".tar.gz"} | |
PASSENGER="2.0.6" | |
echo "#####################################" | |
echo "Welcome, let's get this party rollin'" | |
echo "#####################################" |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'thor' | |
require 'fileutils' | |
require 'yaml' | |
# module: tm | |
$SILENT = true | |
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
class SomeClass | |
class << self | |
def hooks | |
@hooks ||= Hash.new([]) | |
end | |
def add_hook(kind, &block) | |
self.hooks[kind] << block | |
end |
OlderNewer