Skip to content

Instantly share code, notes, and snippets.

View lukeredpath's full-sized avatar
🏠
Working from home

Luke Redpath lukeredpath

🏠
Working from home
View GitHub Profile
@lukeredpath
lukeredpath / ExampleTestCase.m
Created September 7, 2012 15:18
SenTestHelpers.h
#import "SenTestHelpers.h"
DEFINE_TEST_CASE(ExampleTestCase)
- (void)testItWorksProperly
{
expect(@"foo").to.equal(@"foo");
}
END_TEST_CASE
NSOperation *op1 = /* get operation */;
NSOperation *op2 = /* get operation */;
[op1 addDependency:op2];
[queue addOperation:op1];
[queue addOperation:op2];
// op1 seems to run before op2, and if I don't add op2, op1 runs anyway
@lukeredpath
lukeredpath / music.txt
Created September 3, 2012 11:51
My music setup, any ideas?
Mac Mini Server > iTunes Library One
Macbook Pro > iTunes Library Two
Each library is a separate iTunes library file/folder entirely, BUT...all of the media files themselves are stored on a shared external drive, which we'll call /Volumes/Music. It's connected to the Mac Mini, which reads it directly, and the Macbook Pro reads it as a network drive.
Finally, the entire library is published to iTunes Cloud, with iTunes Match enabled.
So, here's the issue: if I add a new album to Library One:
* The album is in Library One
@lukeredpath
lukeredpath / application_runner_spec.rb
Created July 12, 2012 15:07
Frank without Cucumber
require File.join(File.dirname(__FILE__), *%w[spec_helper])
class ApplicationRunner
include Frank::Cucumber::FrankHelper
def initialize(app_path)
@app_path = app_path
end
def run
$ pwd
/Users/luke/Code/repos/AuctionSniperTouch/AuctionSniperTouch
$ xcodebuild install -workspace ../AuctionSniperTouch.xcworkspace -scheme AuctionSniperTouch DSTROOT=./Frank/frankified_build PRODUCT_NAME=Frankified
$ ls Frank
drwxr-xr-x 5 luke staff 170 12 Jul 12:56 features
drwxr-xr-x 20 luke staff 680 12 Jul 12:56 frank_static_resources.bundle
-rw-r--r--@ 1 luke staff 176 12 Jul 13:36 frankify.xcconfig
-rw-r--r-- 1 luke staff 4166608 12 Jul 12:56 libFrank.a
host = Mimic.mimic { # your first stubs here }
# later on...
host.instance_eval do
# more stubs here
end
@lukeredpath
lukeredpath / Gemfile
Created July 11, 2012 11:53
A parser for Twitter's tweet archive dump format
gem "mongo"
gem "bson_ext"
gem "mongoid"
@lukeredpath
lukeredpath / sketch.rb
Created June 29, 2012 16:04 — forked from mattwynne/sketch.rb
sketch for Matt Wynne
class Organization
def initialize(parameters = {})
@parameters = parameters
end
def to_param
"42"
end
def valid?
# By default, rspec/rails tags all specs in spec/integration as request specs,
# which is not what we want. There does not appear to be a way to disable this
# behaviour, so this file is a copy of rspec/rails.rb with this default
# behaviour commented out.
require 'rspec/core'
RSpec::configure do |c|
c.backtrace_clean_patterns << /vendor\//
c.backtrace_clean_patterns << /lib\/rspec\/rails/
end
➜ {luke@macbookpro} otherscreen-ios $ echo $PATH [ master ➜ 1086f68 ] ✔ ⚑
/Users/luke/.rbenv/shims:/Users/luke/.rbenv/bin:/Users/luke/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin