Skip to content

Instantly share code, notes, and snippets.

# Prompt Setup
function minutes_since_last_commit {
now=`date +%s`
last_commit=`git log --pretty=format:'%at' -1`
seconds_since_last_commit=$((now-last_commit))
minutes_since_last_commit=$((seconds_since_last_commit/60))
echo $minutes_since_last_commit
}
git_prompt() {
export z=$w'/zep_solar/'
export zp=$z'/zepulator'
export zs=$z'/zep_solar'
require 'spec_helper'
describe Layout do
describe "#generate(rafter_spacing, rafter_x_width,
mounting_length, mounting_width)" do
before(:each) do
@topic = Factory.build(:layout).generate
end
@dreamr
dreamr / gist:1115011
Created July 30, 2011 00:12
TextMate Ruby Bundle Snippets - def .. end
# todo, doc me
def ${1:method_name}
$0
end
def initialize( points, rafter_spacing, region )
self.points = points
ensure_points_are_geo_ruby_points
ensure_at_least_3_points
self.region = region
self.rafter_spacing = rafter_spacing
self.polygon = Polygon.from_points( [self.points] )
def initialize( points, rafter_spacing, region )
self.points = points
ensure_points_are_geo_ruby_points
ensure_at_least_3_points
self.region = region
self.rafter_spacing = rafter_spacing
self.polygon = Polygon.from_points( [self.points] )
def initialize( points, rafter_spacing, region )
self.points = points
ensure_points_are_geo_ruby_points
ensure_at_least_3_points
self.region = region
self.rafter_spacing = rafter_spacing
self.polygon = Polygon.from_points( [self.points] )
module Riot
Riot.reporter = Riot::VerboseStoryReporter
class Reporter
def initialize
@passes = @failures = @errors = 0
@failing_stories = @erroring_stories = []
@current_context = ""
end
Solar Array Layout
==================
Legend
------
+-- measurements -----------------------+
| RS Rafter Spacing |
| |
|-- zones ------------------------------|
Laying out the Solar Array
==========================
1) Component Awareness
----------------------
Components need to know about each other so that rules can be kept,
an calculations can be made based on the inter-connectedness of the
array as a whole of pieces.
To accomplish this I am going to make components a lot smarter then