Skip to content

Instantly share code, notes, and snippets.


Sjors Provoost Sjors

View GitHub Profile
Sjors / Makefile
Last active Aug 29, 2015
Makefile to generate iOs icons from an SVG.
View Makefile
resolutions := 58 76 80 120 152
all_FILES := $(foreach resolution, $(resolutions), icon-$(resolution).png)
all: $(all_FILES)
icon-%.png: icon-itunes-connect-1024.png
convert $< -resize $*x$* $@
icon-itunes-connect-1024.png: icon.svg
Sjors / Compile output for contact.m for iCuke HTTP server
Created Feb 9, 2011
Output of compiling contact.m for the iCuke HTTP server
View Compile output for contact.m for 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
View Gemfile.rb
source ''
gem 'rails', '>=3.0.0'
gem 'rake', ">=0.9.2"
gem 'authlogic', :git => '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 / Gemfile.lock
Created Apr 14, 2012
Gemfile on April 14
View Gemfile.lock
remote: git://
revision: 49bfed5d91b0afb06390fd50f4e058662f342907
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)
View gist:5356032
'app_has_moved' : true,
'new_app_location' : "",
'app_has_moved_message' : "In order to stay current, please re-download the app from this location. Apologies for the inconvenience."
View gist:5356100
NSNumber* appHasMoved = [JSON objectForKey:@"app_has_moved"];
if(appHasMoved != nil && [appHasMoved boolValue]) {
// Notify the user that the app has moved.
[[NSNotificationCenter defaultCenter] postNotificationName:@"AppHasMoved"
@"new_app_location" : [JSON objectForKey:@"new_app_location"],
@"app_has_moved_message" : [JSON objectForKey:@"app_has_moved_message"],
@"app_has_moved_title" : [JSON objectForKey:@"app_has_moved_title"]
Sjors / gist:5356176
Last active Dec 16, 2015
Observe and notify user if app has moved
View gist:5356176
// Observe and notify user if app has moved:
[[NSNotificationCenter defaultCenter] addObserverForName:@"AppHasMoved"
usingBlock:^(NSNotification *note) {
// Check if we've already told the user recently
NSDate *appHasMoved = [[NSUserDefaults standardUserDefaults] valueForKey:@"AlertAppHasMoved"];
int interval = 7*24*60*60;
if (appHasMoved == nil ||
[appHasMoved compare:[[NSDate date] dateByAddingTimeInterval:-interval]] == NSOrderedAscending) {
Sjors /
Created Jan 4, 2018
Convert (BitPay) BIP-70 payment request protocol buffer to JSON

Create payment request using their demo site. Obtain URL from QR code, e.g. on OSX using QR Journal.

Sjors /
Last active Feb 17, 2018
Fetches gitian assert files from VM and signs them on host machine
while getopts ":n:v:s" opt; do
case $opt in
You can’t perform that action at this time.