Skip to content

Instantly share code, notes, and snippets.

View ericdagenais's full-sized avatar

Eric Dagenais ericdagenais

View GitHub Profile
@ericdagenais
ericdagenais / uncrush.sh
Created July 6, 2012 06:45
Uncrush PNG Single Line
find . -type d ! -name uncrushed -print | sed 's/\.\///' | xargs -n1 -I '{}' mkdir -p "uncrushed/{}" && find . -name \*.png -print | grep -v './uncrushed/' | sed 's/\.\///' | xargs -n1 -I '{}' /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -revert-iphone-optimizations '{}' 'uncrushed/{}'
@ericdagenais
ericdagenais / Tortoise-Diff-Merge-Settings.md
Created May 24, 2012 18:52
Tortoise Diff/Merge Settings

Perforce

  • Merge

"C:\Program Files\Perforce\P4Merge.exe" %base %theirs %mine %merged

DiffMerge

  • Diff

"C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe" /t1=Mine /t2=Original %mine %base

@ericdagenais
ericdagenais / backbone.sync.js
Created May 22, 2012 04:19 — forked from rubenfonseca/backbone.sync.js
Backbone + Titanium - part 2
//Customise Backbone.sync to work with Titanium rather than jQuery
var getUrl = function(object) {
if (!(object && object.url)) return null;
return _.isFunction(object.url) ? object.url() : object.url;
};
Backbone.sync = (function() {
var methodMap = {
'create': 'POST',
'read' : 'GET',
@ericdagenais
ericdagenais / Rakefile
Last active February 21, 2018 00:36 — forked from oppara/Rakefile
Titanium Mobile Rakefile Build and TestFlight API Script for iOS
DEV_PROVISIONING_UUID = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
DEV_SIGN = 'Your Signing Name'
ADHOC_PROVISIONING_UUID = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
ADHOC_SIGN = 'Your Signing Name'
DEV_APP_DEVICE = 'ipad' # or iphone, universal
IPHONE_SDK_VERSION = '5.0'
@ericdagenais
ericdagenais / titanium_migrations.js
Created December 5, 2011 00:11 — forked from madmanlear/titanium_migrations.js
Rails-like migrations for Titanium
/*
Model methods below requires Joli.js: https://github.com/xavierlacot/joli.js
Requires a tables named 'migrations' with columns id & version
Database migrations
Each migration is attached to a timestamp
When the migration is run, a record is added to the migrations table so it isn't run again
The rollback function takes a string date and rolls back all migrations since that date and deletes the migration record
Usage: