Skip to content

Instantly share code, notes, and snippets.

View nerdyc's full-sized avatar

Christian Niles nerdyc

View GitHub Profile
@nerdyc
nerdyc / tap-tracker.css
Created September 12, 2013 21:32
A few custom styles to make Tracker easier to read
.story .label {
font-weight: normal;
text-transform: uppercase;
}
.story .story_name {
display: block;
}
a.std.label {
@nerdyc
nerdyc / new.rb
Created January 6, 2011 01:30
Faking the new operator in Ruby. IT"S A JOKE LAUGH.
module Kernel
def new(object)
if object.is_a?(Class)
object.new
else
object
end
end
# Tell MacRuby where to find our framework. Use BUILT_PRODUCTS_DIR if set, otherwise look for a build/ or ../build/
# directory
ENV['DYLD_FRAMEWORK_PATH'] =
[ENV['BUILT_PRODUCTS_DIR'], "#{File.dirname(__FILE__)}/build/Debug", "#{File.dirname(__FILE__)}/../build/Debug"].detect do |path|
!path.nil? && File.exist?(path)
end
# Include the Bacon libraries
require "rubygems"
require "bacon"
namespace :xcode do
namespace :build do
desc %{Builds the Release configuration}
task :release do
sh "xcodebuild -configuration Release"
end
desc %{Builds the Debug configuration}
require "rubygems"
require "mocha/standalone"
require "mocha/object"
include Mocha::API
mocha_setup
NSURLRequest.stubs(:alloc).returns(nil)
NSURLRequest.alloc # returns nil!