wherein we hang out and talk about npm stuff and occasionally mock ruby
- npm catches missing node-waf and/or node-waf deps like python - charlie
(function () { | |
function deviceready() { | |
var e = document.createEvent('Events') | |
e.initEvent('deviceready') | |
document.dispatchEvent(e) | |
} | |
if (typeof PhoneGap != 'undefined') { | |
navigator.camera = {} | |
navigator.camera.getPicture = function() { | |
alert('sorry, camera not supported in the browser: yet!') |
238B angularjs | |
170B backbone | |
204B javascriptmvc | |
204B knockoutjs | |
340B sammyjs | |
238B spine | |
374B sproutcore | |
204B yuilibrary |
<!DOCTYPE html> | |
<html> | |
<body> | |
<script src="phonegap-1.0.0.js"></script> | |
<script> | |
function uploadPhoto(imageURI) { | |
function win(r) { |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name=viewport content=width=device-width, user-scalable=no> | |
<style> | |
body { | |
margin:0; | |
padding:0; | |
background:blue; | |
} |
// USAGE | |
// post('http://example.com', {name:'brian'}, console.log) | |
var post = function(url, params, cb) { | |
var x = new XMLHttpRequest() | |
, p = '' | |
x.onreadystatechange = function() { | |
if (x.readyState === 4) | |
cb.call(this, x.status) | |
} |
if (!PhoneGap) | |
document.dispatchEvent(document.createEvent('Events').initEvent('deviceready')) |
// seems the coffee method run is the way to go but I was using it wrong (I think) | |
require('fs').readFile('app.coffee', function(err, code) { | |
// anyhow, this works but is certianly not ideal | |
eval(require('coffee-script').compile(code.toString('utf8'))) | |
}) | |
// also: I do *not* want a compile ceremony leaving .js detritus all over my project if possible! |
require.paths.unshift('./node_modules') | |
var express = require('express') | |
, app = express.createServer() | |
, store = require('connect-redis') | |
app.configure(function(){ | |
app.use(express.methodOverride()) | |
app.use(express.bodyParser()) |
# the horror, the utility | |
android list targets | grep 'id: ' | sed 's/id: \([0-9]\).*/\1/g' | tail -1 |