Skip to content

Instantly share code, notes, and snippets.

View shanesmith's full-sized avatar
🤨

Shane Smith shanesmith

🤨
  • Clio
  • Ottawa, ON
View GitHub Profile
@shanesmith
shanesmith / fix-xcodeproj.rb
Created August 14, 2014 15:54
Fix a Cordova-generated xcodproj not having any schemes defined
#!/usr/bin/env ruby
require 'xcodeproj'
path = ARGV.shift
xcproj = Xcodeproj::Project.open(path)
# Fix schemes not being defined
xcproj.recreate_user_schemes
@shanesmith
shanesmith / gist:3532095
Created August 30, 2012 16:15
Data example
Data.sessions.getAll(
function(xml) {
$(xml).find("session").each(function(id, session) {
var title = $(session).find('title').text();
myView.addToList(title);
};
},
function(errorText) {
alert("There was an error: " + errorText);
}
@shanesmith
shanesmith / bb-fix.js
Created May 9, 2012 14:45
Sencha Touch 1.1.1 Fix for Blackberry OS 7 Field Tap Bug
if (Ext.is.Blackberry) {
// Fix BlackBerry OS 7 issue where tapping on
// text fields does not give focus
Ext.gesture.Manager.onTouchEnd = function(e) {
if (this.isFrozen) {
return;
}
@shanesmith
shanesmith / gist:2590198
Created May 3, 2012 22:59
Extended proxy to resolve Android 3+ url param bug
/**
* Android 3+ doesn't like url params
* for file:// ajax request, so let's remove them!
*/
Ext.define('MyApp.proxy.NoParamAjax', {
extend: 'Ext.data.proxy.Ajax',
alias: 'proxy.noparamajax',