Skip to content

Instantly share code, notes, and snippets.

/*****
To authorize on Twitter API through xAuth, you need HMAC-SHA1
I'm using the following lib for that:
http://jssha.sourceforge.net
Make sure you have sha.js included!
<script src="http://jssha.sourceforge.net/sha.js"></script>
Also, you need to email api@twitter.com to get xAuth access
I cannot do that for you - see http://dev.twitter.com/pages/xauth
@volca
volca / build.rb
Created December 12, 2011 07:59 — forked from daveverwer/build.rb
Ruby script to replace an iOS settings bundle depending on the DEBUG/RELEASE build configuration flag.
configuration = ENV["CONFIGURATION"]
project_dir = ENV["PROJECT_DIR"]
settings_bundle = "#{project_dir}/Resources/Settings.bundle"
plist_location = "#{project_dir}/Resources/SettingPlists"
release_or_debug = ENV["CONFIGURATION"] == "Debug" ? "Debug" : "Release"
settings_plist = "#{plist_location}/SettingsRoot#{release_or_debug}.plist"
system("cp #{settings_plist} #{settings_bundle}/Root.plist");
system("touch #{settings_bundle}/Root.plist");
@volca
volca / asicon.sh
Created April 3, 2012 01:55 — forked from lexrus/asicon.sh
AppStore Icons Generator
#!/bin/bash
# According to https://developer.apple.com/library/ios/#qa/qa1686/_index.html
# Install GraphicsMagick with Homebrew: brew install GraphicsMagick
gm convert $1 -resize 512x512 iTunesArtwork.png # Ad Hoc iTunes
gm convert $1 -resize 144x144 Icon-72@2x.png # Home screen for "The New iPad"
gm convert $1 -resize 114x114 Icon@2x.png # Home screen for Retina display iPhone/iPod
gm convert $1 -resize 72x72 Icon-72.png # App Store and Home screen on iPad
gm convert $1 -resize 58x58 Icon-Small@2x.png # Spotlight and Settings for Retina display
gm convert $1 -resize 57x57 Icon.png # Home screen on non-Retina iPhone/iPod
gm convert $1 -resize 50x50 Icon-Small-50.png # Spotlight on iPad 1/2
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.