Skip to content

Instantly share code, notes, and snippets.

{
'app_has_moved' : true,
'new_app_location' : "https://itunes.apple.com/nl/app/your_new_app/idNEW_APP_ID?mt=8",
'app_has_moved_message' : "In order to stay current, please re-download the app from this location. Apologies for the inconvenience."
}
@Sjors
Sjors / Gemfile.lock
Created April 14, 2012 12:35
Gemfile on April 14
GIT
remote: git://github.com/flying-sphinx/flying-sphinx.git
revision: 49bfed5d91b0afb06390fd50f4e058662f342907
specs:
flying-sphinx (0.6.4)
faraday_middleware (~> 0.7.0)
multi_json (>= 1.0.1)
net-ssh (>= 2.0.23)
rash (~> 0.3.0)
riddle (>= 1.5.0)
@Sjors
Sjors / robot_user_agents.rb
Created August 3, 2011 00:08
Recognize search engines and spammers using user-agents.org
require 'net/http'
require 'xmlsimple'
url = "http://www.user-agents.org/allagents.xml"
xml_data = Net::HTTP.get_response(URI.parse(url)).body
data = XmlSimple.xml_in(xml_data)
agents = data['user-agent'].select{|agent| type = agent["Type"].first; type.include?("R") || type.include?("S")}
agent_names = agents.collect {|agent| agent["String"].first}
@Sjors
Sjors / Gemfile.rb
Created June 16, 2011 07:27
Gemfile
source 'http://rubygems.org'
gem 'rails', '>=3.0.0'
gem 'rake', ">=0.9.2"
gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3'
gem 'cancan', ">=1.3.2"
gem 'haml',">=3.0.9"
gem 'rails3-jquery-autocomplete', '0.3.2'
gem 'paperclip'
gem 'json'
@Sjors
Sjors / Compile output for contact.m for iCuke HTTP server
Created February 9, 2011 09:52
Output of compiling contact.m for the iCuke HTTP server
Sjors-Macbook:modules sjors$ icuke-module 4 contact.m
xcrun -sdk iphonesimulator4.2 gcc -I. -I/usr/local/lib/ruby/gems/1.8/gems/iCuke-0.6.3/ext/iCuke/sdk4.2 -I/usr/local/lib/ruby/gems/1.8/gems/iCuke-0.6.3/ext/iCuke/sdk4.2/json -arch i386 -pipe -ggdb -std=c99 -DTARGET_OS_IPHONE -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -F/System/Library/PrivateFrameworks -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -x objective-c -fobjc-abi-version=2 -fobjc-legacy-dispatch -c -o contact.o contact.m
xcrun -sdk iphonesimulator4.2 gcc -I. -I/usr/local/lib/ruby/gems/1.8/gems/iCuke-0.6.3/ext/iCuke/sdk4.2 -I/usr/local/lib/ruby/gems/1.8/gems/iCuke-0.6.3/ext/iCuke/sdk4.2/json -arch i386 -pipe -ggdb -std=c99 -DTARGET_OS_IPHONE -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -F/System/Library/PrivateFrameworks -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -Xlinker -objc_abi_version -Xlinker 2 -dynamiclib -o contact-sdk4.2.dylib -undefined dynamic_l