Copyright (c) 2011 Jed Schmidt
a small module for auto-importing modules in node.js.
require( "./autorequire" )
require.auto( <module-name> )
/Library/Application\ Support/Titanium/sdk/osx/1.1.0/tibuild.py -d ~/tmp -n -t bundle -a /Library/Application\ Support/Titanium/sdk/osx/1.1.0/ ~/Projects/Titanium\ Studio\ Workspace/MyApp |
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], |
<!DOCTYPE html> | |
<html> | |
<!-- | |
Copyright 2011 Google Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
python -m SimpleHTTPServer | |
By default, SimpleHTTPServer serves on port 8000. To specify a port, use (where 9090 is the port you want): | |
python -m SimpleHTTPServer 9090 | |
And to run it in the background, use: | |
python -m SimpleHTTPServer & |
var http = require("http"), | |
util = require("util") | |
http.createServer(function(req, rsp){ | |
var regex = /^\/(v1|v2)/g | |
var matches = req.url.match(regex) | |
if((matches && matches[0] === "/v1") || (req.headers["x-api-version"] === "v1")) | |
var port = 8001 |
emulate: | |
emulator -cpu-delay 0 -no-boot-anim -cache ./cache -avd default > /dev/null 2>&1 & # put the avd's chatty ass in the background | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
palm-emulator --start "SDK 1.4.5.465 (320x480)" |
#!/usr/bin/python | |
import json, sys, re | |
filename = sys.argv[1] | |
f = open(filename, 'r') | |
contents = json.load(f) | |
contentIndex = {} | |
for content in contents['content']: |
// before | |
mainWindow.menu("File", function(err, file) { | |
if(err) throw err; | |
file.openMenu(function(err, menu) { | |
if(err) throw err; | |
menu.item("Open", function(err, item) { | |
if(err) throw err; | |
item.click(function(err) { | |
if(err) throw err; | |
mainWindow.getChild(type('Window'), function(err, dialog) { |
require.registerExtension('.js', function(js){ | |
return js.replace(/^ *\/\/debug: */gm, ''); | |
}); |