Skip to content

Instantly share code, notes, and snippets.

@phillbaker
phillbaker / gist:631291
Created October 17, 2010 21:04
rapidsms_python2-5.patch
From 787dd8c55a4cee7fdfdbf509e7b3cac109504fe2 Mon Sep 17 00:00:00 2001
From: pbaker <me@retrodict.com>
Date: Sun, 3 Oct 2010 23:35:48 -0400
Subject: [PATCH 1/3] *nix-based kludge to workaround absence of ignore_patterns in python 2.5, only appeared in 2.6
---
lib/rapidsms/management/commands/startproject.py | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/lib/rapidsms/management/commands/startproject.py b/lib/rapidsms/management/commands/startproject.py
@phillbaker
phillbaker / ThreadPool.rb
Created January 23, 2011 19:04
Basic abstracted structure of this scraper.
#
# This file is part of ThreadPool, a jruby or ruby-based
# thread pool manager.
# Copyright (C) 2009,2010 Daniel Bush
# This program is distributed under the terms of the MIT
# license.
# A copy of the license is
# enclosed with this project in the file LICENSE.
#
#
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!--
This is an example that shows how to create an application that uses
an embedded sqlite database in a mobile device (iphone,ipod,ipad,android using phonegap, jquery
and sqlite.
@phillbaker
phillbaker / app.js
Created March 21, 2012 15:30
Phonegap-JQuery app boilerplate
(function(){
// Geo namespace
var App;
if (typeof exports !== 'undefined') {
App = exports;
} else {
App = this.App = {};
}
@phillbaker
phillbaker / gist:2211792
Created March 27, 2012 02:16
Expensify Git reflog (git log --pretty=format:'%h @%an (%ad): %s')
8972dbe, 2012-03-25 23:44:55: Initial commit | <- API? I love APIs. It's almost midnight, better knock this out.
54793e3, 2012-03-25 23:50:25: Check authToken | <- Deprecated? White-label? I thought that was Walmart...
a1deaad, 2012-03-26 00:07:44: Separate files, add Google CDN jQuery | <- Okay, add some php and js and it'll just fall into place. Like that problem set...
f14d2d2, 2012-03-26 00:33:58: Add jquery ajax post call (CORS?)...whoops it's a GET to a different URL | <- Ughrufmph. I know this isn't going to work...what?
9fb8d58, 2012-03-26 02:00:11: Authtoken with hardcoded php local proxy |
87df47a, 2012-03-26 02:13:49: Add cross-domain proxy; returns success |
4b4893a, 2012-03-26 02:15:37: Clean up wrong code |
f820
@phillbaker
phillbaker / gist:3041093
Created July 3, 2012 17:08
Auto-incrementing build numbers in Xcode 4.3 (based on http://davedelong.com/node/37)
#!/bin/bash
# Set the marketing version of the project.
# Take the number from git and apply it to the project.
# Any "v" prepended to the git tag will be removed.
# Get the current release description from git.
git_version=`git describe --tags`
# Check to see if the tag starts with with "v", and remove if so.
@phillbaker
phillbaker / Facebook-iOS-SDK.podspec
Created July 26, 2012 21:37
Facebook-iOS-SDK v3.0.6.b
Pod::Spec.new do |s|
s.name = 'Facebook-iOS-SDK'
s.version = '3.0.6.b'
s.platform = :ios
s.license = 'Apache License, Version 2.0'
s.summary = 'The iOS SDK provides Facebook Platform support for iOS apps.'
s.description = 'The Facebook iOS SDK enables you to access the Facebook Platform APIs including the Graph API, FQL, and Dialogs.'
s.homepage = 'http://developers.facebook.com/docs/reference/iossdk'
s.author = 'Facebook'
s.source = { :git => 'https://github.com/facebook/facebook-ios-sdk.git', :tag => 'sdk-version-3.0.6.b' }
@phillbaker
phillbaker / MJPopupViewController.podspec
Created July 26, 2012 21:53
MJPopupViewController v0.0.0
Pod::Spec.new do |s|
s.name = 'MJPopupViewController'
s.version = '0.0.0'
s.platform = :ios
s.summary = 'A UIViewController Category to display a ViewController as a popup with different transition effects.'
s.homepage = 'https://github.com/martinjuhasz/MJPopupViewController'
s.author = { 'Martin Juhasz' => 'martin@martinjuhasz.de' }
s.source = { :git => 'https://github.com/martinjuhasz/MJPopupViewController.git', :commit => '45ac970c38ed5240a111b9047cc39b5413d42f6e' }
s.source_files = 'Source'
s.frameworks = 'QuartzCore', 'CoreGraphics'
@phillbaker
phillbaker / LLRoundSwitch.podspec
Created July 31, 2012 16:10
LLRoundSwitch v1.0.1
Pod::Spec.new do |s|
s.name = 'LLRoundSwitch'
s.version = '1.0.1'
s.license = 'MIT'
s.summary = 'Customizable replacement for UISwitch with ARC support'
s.homepage = 'http://github.com/LordLobo/LLRoundSwitch'
s.author = { 'LordLobo' => 'dan.giralte@gmail.com' }
s.source = { :git => 'http://github.com/LordLobo/LLRoundSwitch.git', :commit => 'ae2fdb6d7bc7b6b0f1e96f4aadd69f7246477422' }
s.description = 'Customize the on/off text, the color of the background, supports event delegation, all with ARC in-mind.'
s.platform = :ios
@phillbaker
phillbaker / eventmachine.cheat
Created August 5, 2012 20:15
EventMachine Cheat Sheet
EventMachine
============
Installation:
$ gem install eventmachine
Synchronous Ruby code (Not EM appropriate):
ret = operation(); do_something_with(ret)
Evented, asynchronous code (EM appropriate):