Skip to content

Instantly share code, notes, and snippets.

@jacter
jacter / README.md
Created May 25, 2011 02:52 — forked from bergie/README.md
Falsy Values tutorials
@jacter
jacter / node_redir_test.js
Created April 26, 2011 03:24 — forked from polotek/node_redir_test.js
Testing 301 redirects with node
var http = require('http');
var server = http.createServer(function (req, resp) {
if(req.url.match('redir')) {
resp.writeHead(301, {'Location':'http://google.com/', 'Expires': (new Date).toGMTString()});
resp.end();
} else {
resp.writeHead(200, {'content-type': 'text/plain', 'content-length':4});
resp.end('Main');
}
});
#!/bin/sh
SDK=`dirname $0`
SCRIPT=`basename $0`
SDKPARENT=`dirname $SDK`
PLATFORM=`uname -sp`
if [ "$PLATFORM" = "Darwin i386" -o "$PLATFORM" = "Darwin x86_64" ]; then
echo "iPhone Toolchain installer script by rpetrich"
echo ""
@jacter
jacter / main.m
Created April 7, 2011 07:38 — forked from stuartcarnie/main.m
//
// main.m
// ProtectTest
// Demonstrates newer versions of iOS now support PROT_EXEC pages, for just-in-time compilation.
//
// Must be compiled with Thumb disabled
//
// Created by Stuart Carnie on 3/4/11.
// Copyright 2011 Manomio LLC. All rights reserved.
//
hw.ncpu: 1
hw.byteorder: 1234
hw.memsize: 527433728
hw.activecpu: 1
hw.physicalcpu: 1
hw.physicalcpu_max: 1
hw.logicalcpu: 1
hw.logicalcpu_max: 1
hw.cputype: 12
hw.cpusubtype: 9
#! /bin/bash
#
# Program : iphone4.2-node-configure
# Authors : Nathan Rajlich (nathan@tootallnate.net)
# Michael Aaron Safyan (michaelsafyan@gmail.com)
# Synopsis : This program runs the "configure" script for Node.js.
# An install prefix of "/opt/iphone-4.2/" is used.
unset CPATH
#! /bin/bash
#
# Program : iphone4.2-node-configure
# Authors : Nathan Rajlich (nathan@tootallnate.net)
# Michael Aaron Safyan (michaelsafyan@gmail.com)
# Synopsis : This program runs the "configure" script for Node.js.
# An install prefix of "/opt/iphone-4.2/" is used.
unset CPATH
require 'rubygems'
require 'open-uri'
require 'sinatra'
require 'json'
require 'digest/sha1'
configure do
set :developer_key, ENV['LAYAR_DEVELOPER_KEY'] || ""
set :user_agent, ENV['USER_AGENT'] || "Layar (hsbchk) / 1.0"
end