Skip to content

Instantly share code, notes, and snippets.

View brianleroux's full-sized avatar
💚
You are now aware that you are breathing

Brian LeRoux brianleroux

💚
You are now aware that you are breathing
View GitHub Profile
@brianleroux
brianleroux / xui-3.0.0.js
Created May 22, 2012 09:29
proposal for xui3
var ie = (function(){
var undef
, v = 3
, div = document.createElement('div')
, all = div.getElementsByTagName('i')
while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
)
@brianleroux
brianleroux / test.js
Created April 5, 2012 17:14
shipping is the goal; not completeness. occams. etc.
// should render two boxes
var ctx = canvas.getContext("2d");
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
ctx.fillRect (30, 30, 55, 50);
@brianleroux
brianleroux / install-weinre.sh
Created April 1, 2012 17:21
INSTALL WEINRE
npm install -g http://people.apache.org/~pmuellr/weinre-builds/bin/apache-cordova-weinre-2.0.0-pre-H0FABA3W-incubating-bin.tar.gz
@brianleroux
brianleroux / wtfjira.md
Created March 25, 2012 05:55
navigating jira for cordovajs issues
  1. navigate to https://issues.apache.org/jira/browse/CB
  2. click on 'versions due' in the top right-ish on the release you want. 1.6 creates this ghastly url: https://issues.apache.org/jira/browse/CB/fixforversion/12319548
  3. click on 'Unresolved: By Component' in the second from top right-ish for CordovaJS, which for our example creates this awesome url: https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+CB+AND+fixVersion+%3D+%221.6.0%22+AND+resolution+%3D+Unresolved+AND+component+%3D+CordovaJS+ORDER+BY+priority+DESC&mode=hide
  4. rejoice! we have filtered by 1.6 for the CordovaJS component; you can save this filter for later. =/
@brianleroux
brianleroux / phonegap-photofetcher.js
Created March 23, 2012 20:12 — forked from pamelafox/phonegap-photofetcher.js
PhoneGap Convert Photo File URI to Data URI
function getPhoto() {
navigator.camera.getPicture(onPhotoSuccess, onPhotoFail,
{quality: 70, targetWidth: 500, targetHeight: 500,
sourceType: navigator.camera.SourceType.PHOTOLIBRARY,
destinationType: navigator.camera.DestinationType.FILE_URI,
});
}
function onPhotoSuccess(imageUri) {
var $img = $('<img/>');
@brianleroux
brianleroux / webkit-xcode-4.3.md
Created March 7, 2012 19:31
building webkit from src w/ Xcode 4.3

Update your path to the Xcode dev tools:

sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer

Then set your xcode folder:

xcode-select -switch /Developer

And then you can run the build-webkit tool from the Tools folder:

@brianleroux
brianleroux / .bashrc
Created February 6, 2012 22:00
bitch be cool
DGREY="\[\e[0;32m\]"
ENDCOLOR="\[\e[0m\]"
PS1="$DGREY# $ENDCOLOR"
# android business
export PATH=$PATH:~/Repo/android-sdk-mac_x86/platform-tools
export PATH=$PATH:~/Repo/android-sdk-mac_x86/tools
export PATH=$PATH:~/Repo/phonegap-android/bin
# inform iterm of the palm sdk for some reason
@brianleroux
brianleroux / writer.html
Created December 8, 2011 07:28
trying to reproduce cb-107 issue
<!DOCTYPE HTML>
<html>
<head><meta name=viewport content=width=device-width,user-scalable=no></head>
<body>
<h1>testing cb-107</h1>
<script src=phonegap-1.3.0rc1.js></script>
<script>
// async bootup mumbo jumbo
function fail(error) {
console.log(JSON.stringify(error))
@brianleroux
brianleroux / standards.md
Created October 25, 2011 16:20 — forked from paulirish/standards.md
jQuery Standards Team

#Announcing The jQuery Standards Team

Today we're happy to announce the creation of a new jQuery sub-team called the jQuery Standards Team to give web developers to have a voice in the standards process.

##Introduction

We all know that web standards are important. They help ensure the code we write works across different technologies, for people of different abilities and most importantly across all browsers.

That said, how often do we all feel our voices, suggestions and ideas are heard by those groups responsible for defining these standards? The reality is that whilst many of us would like to see change, due to time restrictions and lengthy formal processes we're unable to participate in standards discussions, get involved with writing specifications and contribute to meetings about the future of features. This makes it difficult for web developers to have a voice.

@brianleroux
brianleroux / migrate.sh
Created October 21, 2011 17:50
dont worry about it
#! /bin/sh
set -e
news=(callback-qt callback-weinre callback-test callback-docs callback-mac callback-bada callback-windows-phone callback-webos callback-blackberry)
olds=(phonegap-qt weinre mobile-spec phonegap-docs phonegap-mac phonegap-bada phonegap-wp7 phonegap-webos phonegap-blackberry-webworks)
for i in ${!olds[*]}
do
# clone down the old repo
git clone "http://github.com/phonegap/${olds[$i]}"