that's where i be
Tests build confidence. Write 'em. They'll save your ass, and they'll let you take a chainsaw to your code without being afraid of unintended
| require 'spec_helper' | |
| describe GroupsController do | |
| include SessionTestHelper | |
| describe "GET 'show'" do | |
| it "should load the group from the database" do | |
| @the_group = Factory(:group) | |
| Group.stub(:find_active_by_unique_name).with("london-developers"). | |
| and_return(@the_group) |
| require 'spec_helper' | |
| describe GroupsController do | |
| include SessionTestHelper | |
| describe "GET 'show'" do | |
| it "should load the group from the database" do | |
| @the_group = Factory(:group) | |
| Group.stub(:find_active_by_unique_name).with("london-developers"). | |
| and_return(@the_group) |
| (defun color-theme-sunburst () | |
| (interactive) | |
| (color-theme-install | |
| '(color-theme-sunburst | |
| ((background-color . "#000000") | |
| (foreground-color . "#FFFFFF") | |
| (cursor-color . "#DAD085")) | |
| (default ((t (nil)))) | |
| (modeline ((t (:background "DarkRed" :foreground "white" | |
| :box (:line-width 1 :style released-button))))) |
| > ruby /tmp/version.rb | |
| 1.8.6 | |
| > cat /tmp/version.rb | |
| puts VERSION | |
| > rvm use 1.8.7 -S /tmp/version.rb | |
| Now using ruby 1.8.7 p249 |
| # wrote it, didn't try it | |
| module TWSS | |
| class Body | |
| def initialize(text) | |
| @text = text | |
| end | |
| def sentences | |
| @text.split(/\?|\.|\;/).map{ |s| Sentence.new(s) } |
| # turns hey => "[h]ey" | |
| def grep_safe(path) | |
| "[#{path.chars.first}]#{path.chars.to_a.slice(1, path.chars.count).join}" | |
| end |
| Day job: | |
| Rails developer | |
| Favorite Python project: | |
| NodeBox | |
| Favorite Conference: | |
| Scottish Ruby Conference | |
| Python Experience Level: |
| /*This code for a PIC12F615 compiles in mikroC for PIC http://www.mikroe.com | |
| It takes an analog value from a dash-mounted potentiometer and drives a MOSFET proportional to the input. The MOSFET pulses the low-side of a blower motor in | |
| a 1997 Mitsubishi Mirage, providing 128 speeds*/ | |
| void main() { | |
| int anin=0, ramped=255; | |
| unsigned long temp = 0; |
| title New Browser Setup | |
| User->Phone: identifying info | |
| Phone->idjump: identifying info | |
| idjump->Phone: encrypted blob | |
| User->Phone: decrypting info | |
| Phone->local storage: decrypted blob |