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
# http://navel-labs.com is built in Nesta (a cms on top of Sinatra) and | |
# hosted by the awesome Heroku. Since Heroku apps don't have filesystem | |
# write access, they can't use the default page caching strategy. But | |
# Heroku offers awesome http proxy caching if you just set the right headers. | |
# | |
# Replace lib/cache.rb with this code and call the cache method like usual | |
# in Nesta, and boom! You have page caching on Heroku! | |
# | |
# Nesta: http://effectif.com/nesta | |
# Heroku: http://heroku.com |
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
// I don't usually touch the AppDelegate anywhere else in the program | |
// so I'm not sure if this solves what you're trying to do or not. | |
// But, this should show the difference of how to declare public vs. | |
// private properties. | |
@interface SomeClass : NSObject { | |
// If you use LLVM then you don't have to declare the private var!! | |
} | |
@property (nonatomic, retain) NSString *somePublicStringProperty; |
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
tell application "Xcode" | |
set targetProject to project of active project document | |
tell targetProject | |
if active SDK contains "iphoneos" then | |
set active SDK to "iphonesimulator" | |
else | |
set active SDK to "iphoneos" | |
end if | |
end tell |
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
YELLOW='\[\033[1;33m\]' | |
BLUE='\[\033[1;34m\]' | |
GREEN='\[\033[1;32m\]' | |
RED='\[\033[0;31m\]' | |
NORMAL='\[\033[00m\]' | |
# Prompt Setup | |
function minutes_since_last_commit { |
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/bash | |
# https://gist.github.com/949831 | |
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
# command line OTA distribution references and examples | |
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.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
class AbsPathTag < Liquid::Tag | |
def initialize(tag_name, src, tokens) | |
super | |
@src = src | |
@src.strip! | |
end | |
def render(context) | |
@base_url = context.registers[:site].config['url'] | |
absoluteize(@src) |
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/bash | |
# In honor of Dennis Ritchie, I present my directory diff'ing | |
# script built on the piping magic of Unix. | |
# | |
# Usage: diffdir dir1 dir2 | |
set -e # Bomb out of the script on any errors | |
diff_directories() { |
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 just a fun experiment to write an expectation | |
# framework with matchers. NOT PRODUCTION READY! :) | |
def main | |
include Expectation | |
my_matchers = matchers do | |
define_matcher :to_be do |expected, actual| |
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
#!/usr/bin/env bash | |
# | |
# Copyright (c) 2013 Jonathan Penn (http://cocoamanifest.net) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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 | |
YELLOW='\[\033[1;33m\]' | |
BLUE='\[\033[1;34m\]' | |
GREEN='\[\033[1;32m\]' | |
RED='\[\033[0;31m\]' | |
NORMAL='\[\033[00m\]' | |
WHITE='\[\033[0;37m\]' | |
function minutes_since_last_commit { |