This file contains hidden or 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
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] ) |
This file contains hidden or 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
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] ) |
This file contains hidden or 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
# todo, doc me | |
def ${1:method_name} | |
$0 | |
end |
This file contains hidden or 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 '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 | |
This file contains hidden or 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
export z=$w'/zep_solar/' | |
export zp=$z'/zepulator' | |
export zs=$z'/zep_solar' |
This file contains hidden or 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
# 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() { |
This file contains hidden or 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
tests = [ { :disabled_panels => [] }, | |
{ :disabled_panels => [ [0, 0], [0, 1], [1, 0], [1, 1] ] } | |
] | |
tests.each do |test| | |
context "disabled panels at: #{test[:disabled_panels]}" do | |
setup do | |
obj = valid_builder.get_instance | |
index_states = [ | |
[0,0,false], | |
[0,1,true], |
This file contains hidden or 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
d=["2x4","2x6","4x4","4x10","2x8", "2x10"] | |
d.sort {|a,b| a.split("x") <=> b.split("x")} # doesnt work, nor any variations I can think of | |
# expected | |
["2x4","2x6","2x8","2x10","4x4", "4x10"] |
This file contains hidden or 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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Maintainer: amix the lucky stiff | |
" http://amix.dk - [email protected] | |
" | |
" Version: 3.6 - 25/08/10 14:40:30 | |
" | |
" Blog_post: | |
" http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc | |
" Syntax_highlighted: | |
" http://amix.dk/vim/vimrc.html |
This file contains hidden or 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
" Vimrc file, http://phuzz.org | |
set nocompatible " use vim defaults | |
set ls=2 " allways show status line | |
set tabstop=4 " numbers of spaces of tab character | |
set shiftwidth=4 " numbers of spaces to (auto)indent | |
set scrolloff=3 " keep 3 lines when scrolling | |
set showcmd " display incomplete commands | |
set hlsearch " highlight searches | |
set incsearch " do incremental searching |