Skip to content

Instantly share code, notes, and snippets.

View mwbrooks's full-sized avatar
🏠
Working from home

Michael Brooks mwbrooks

🏠
Working from home
View GitHub Profile
@mwbrooks
mwbrooks / phonegap-issue-gardening-call-2011-11-28..md
Created November 28, 2011 20:12
PhoneGap Issue Gardening Call 2011-11-28

Goals for the call

  • Disable issues on GitHub/PhoneGap
  • Mirror issues from GitHub/Callback to JIRA
  • Typical issue gardening (culling, assign, prioritize, and update)

GitHub Issues

@mwbrooks
mwbrooks / gist:1153357
Created August 18, 2011 05:32
phonegap-android using CLI
#
# Based on the PhoneGap Android Terminal Quickstart Guide:
# http://wiki.phonegap.com/w/page/30864168/phonegap-android-terminal-quickstart
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Setting up your System
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# It's easier if you have the Android SDK in your PATH.
@mwbrooks
mwbrooks / config.xml
Created May 25, 2011 22:26
BlackBerry WebWorks Child Browser
<feature id="blackberry.invoke" />
<feature id="blackberry.invoke.BrowserArguments" />
<feature id="blackberry.identity" />
@mwbrooks
mwbrooks / Makefile
Created March 16, 2011 23:05
BlackBerry Playbook Makefile to build and deploy.
#
# Package and Deploy to the Playbook
#
# Getting Started:
#
# 1. Update ADDRESS with your Playbook IP Address
# 2. Update PASSWORD with your Playbook password
# 3. Update SDK_DIR with the path to the Playbook WebWorks SDK
#
# Usage:
@mwbrooks
mwbrooks / bb-code-signing-backup.md
Created March 15, 2011 17:45
Backup BlackBerry Code-Signing Keys

Backup your BlackBerry Code-Signing Keys

  1. Find the SDK directory where you installed your keys

Installed using Eclipse

C:\Eclipse-3.5.2\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\
@mwbrooks
mwbrooks / thumbs.alunny.js
Created March 2, 2011 07:21
code golf! 446 bytes minified (yui-compressor defaults)
(function(window, document) {
/**
* Do not use thumbs.js on touch-enabled devices
*/
if (document.ontouchstart) return;
/**
* Map touch events to mouse events
*/
@mwbrooks
mwbrooks / MyProjectAppDelegate.m
Created February 9, 2011 18:57
Disable telephone number detection in PhoneGap-iOS
// ...
- (void)webViewDidStartLoad:(UIWebView *)theWebView
{
// disable telephone detection, basically <meta name="format-detection" content="telephone=no" />
theWebView.dataDetectorTypes = UIDataDetectorTypeAll ^ UIDataDetectorTypePhoneNumber;
return [ super webViewDidStartLoad:theWebView ];
}
@mwbrooks
mwbrooks / app.js
Created February 4, 2011 16:36
Quick example of invoking a browser window using BlackBerry WebWorks
//
// only invoke the browser when using BlackBerry WebWorks
//
if (typeof blackberry !== 'undefined') {
var args = new blackberry.invoke.BrowserArguments('http://phonegap.com');
blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);
}
@mwbrooks
mwbrooks / battery-plugin.js
Created February 2, 2011 23:25
Plugin example
(function() {
var Battery = function() {
return {
//
// Get a battery property
//
// @param property to get. Only 'Power' is supported.
// @param successCallback is provided an argument { level: [0, 100] }
// @param errorCallback is called on any native error and provided a message
//
@mwbrooks
mwbrooks / UntitledAppDelegate.m
Created January 28, 2011 18:18
Load a PhoneGap-iPhone app from a custom start page.
//
// UntitledAppDelegate.m
// Untitled
//
// Created by Michael Brooks on 11-01-28.
// Copyright __MyCompanyName__ 2011. All rights reserved.
//
#import "UntitledAppDelegate.h"
#import "PhoneGapViewController.h"