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
This is a demo of steps seen in | |
http://toolmantim.com/articles/setting_up_a_new_remote_git_repository | |
** Setup remote repo | |
taylorwired:~ taylor$ ssh panda | |
Last login: Sat Jan 10 19:46:44 2009 from taylorwired.home | |
[taylor@panda ~]$ mkdir testme.git | |
[taylor@panda ~]$ cd testme.git/ | |
[taylor@panda testme.git]$ git --bare init |
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
" --------------------------------------------------------------------------- | |
" Settings for gist.vim | |
if has("mac") | |
let g:gist_clip_command = 'pbcopy' | |
end | |
let g:gist_detect_filetype = 1 |
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 'date' | |
class Task | |
@note = nil | |
def note=(s, action=nil) | |
if @note.nil? | |
@note = Note.new(s) | |
elsif action.nil? | |
@note.modify(s) | |
else |
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
class PushupRoutine | |
attr_accessor :slowreps, :fastreps, :defspeed, :inc, :inc_when | |
alias increment :inc | |
def initialize(opts={}) | |
@defspeed = opts[:speed] || "fast" | |
@slowreps = opts[:slow] || 1 | |
@fastreps = opts[:fast] || 1 | |
@inc = opts[:inc] || 0 | |
@repsets = [] |
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 'pushuproutine' | |
require 'spec/expectations' | |
@pr=nil | |
Given /^I have an empty routine$/ do | |
@pr = PushupRoutine.new | |
end | |
When /^I add a set with (\d+) (\w+) reps for the first set$/ do |reps, speed| |
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
Feature: Add set to a push up routine | |
A routine consists of n sets | |
A set contains x reps | |
The number of reps can be different for each set and should be specified | |
Sets are added in the order they are given | |
Scenario: Add four sets w/one slow rep for the 1st and five fast reps for the other three sets | |
Given I have an empty routine | |
When I add a set with 5 slow reps for the first set | |
And then I add a 3 more sets with 10 fast reps each |
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
#!/bin/sh | |
EXPOSE_KEY="Print" | |
# skippy has to be started | |
# TODO: check for skippy | |
if [ -f /usr/bin/xmacroplay-keys ] ; then | |
xmacroplay-keys :0 $EXPOSE_KEY > /dev/null 2>&1 | |
fi |
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
# This has code is now in my snippets repo | |
# http://github.com/taylor/snippets | |
# | |
# Extending any? functionality just for fun | |
# New features: | |
# * :odd and :even args will test for duh odd and even for any element | |
# * The ability to pass multiple conditions to match on (logical OR. eg. | |
# it stops on the first postive/true match otherwise falls thru to false). | |
# * The ability to pass any type of closure not just implicity block | |
# * Any other argument is treated like those to include? |
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
Global setup: | |
Download and install Git | |
git config --global user.email EMAIL_ADDRESS | |
Next steps: | |
mkdir PROJECT_NAME | |
cd PROJECT_NAME | |
git init | |
touch README | |
git add README |
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
# So I bought this PDF book on ActiveMerchant from Peepcode. | |
# It's tests use Test::Unit, I was using RSpec. So I translated them. | |
# http://peepcode.com/products/activemerchant-pdf | |
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
include ActiveMerchant::Billing | |
describe OrderTransaction do | |
before do | |
@amount = 100 |
OlderNewer