These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
// If you don't use underscore.js, use it (http://documentcloud.github.com/underscore/) | |
// Then, use underscore's mixin method to extend it with all your other utility methods | |
// like so: | |
_.mixin({ | |
escapeHtml: function () { | |
return this.replace(/&/g,'&') | |
.replace(/>/g,'>') | |
.replace(/</g,'<') | |
.replace(/"/g,'"') | |
.replace(/'/g,'''); |
<!DOCTYPE html> | |
<head> | |
<title>Snow</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> | |
<script src="snow.js" type="text/javascript"/></script> | |
</head> | |
<body onload="init();"> | |
<canvas id="bgcanvas" width="410" height="316" style="position:absolute;z-index:2"></canvas> | |
<img src="globe_layers_2.png" style="position:absolute;z-index:3"> | |
<canvas id="fgcanvas" width="410" height="316" style="position:absolute;z-index:4"></canvas> |
getMousePos = function( e ) { | |
return ( e.pageX || e.pageY ) ? { | |
x: e.pageX, | |
y: e.pageY | |
} : ( e.clientX || e.clientY ) ? { | |
x: e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft, | |
y: e.clientY + document.body.scrollTop + document.documentElement.scrollTop | |
} : null; | |
}, |
var express = require('express'), | |
request = require('request'), | |
BufferList = require('bufferlist').BufferList, | |
sys = require('sys'); | |
var app = express.createServer( | |
express.logger(), | |
express.bodyDecoder() | |
); |
exports.createFullPath = function createFullPath(fullPath, callback) { | |
var parts = path.dirname(path.normalize(fullPath)).split("/"), | |
working = '/', | |
pathList = []; | |
for(var i = 0, max = parts.length; i < max; i++) { | |
working = path.join(working, parts[i]); | |
pathList.push(working); | |
} |
var HTTPS = require('https'); | |
var QueryString = require('querystring'); | |
/** | |
* Facebook API Wrapper | |
* @constructor | |
* @param {Object} info Info about the Facebook application | |
*/ | |
var Client = function (info) { | |
if (!info.id) { |
# HAProxy config | |
mkdir /etc/haproxy | |
cat > /etc/haproxy/haproxy.cfg << EOF | |
global | |
maxconn 4096 | |
defaults | |
mode http | |
//Customise Backbone.sync to work with Titanium rather than jQuery | |
Backbone.sync = (function() { | |
var methodMap = { | |
'create': 'POST', | |
'read' : 'GET', | |
'update': 'PUT', | |
'delete': 'DELETE' | |
}; | |
var xhr = Ti.Network.createHTTPClient({ timeout: 5000 }); |
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |