Skip to content

Instantly share code, notes, and snippets.

View eaton's full-sized avatar

Eaton eaton

View GitHub Profile
#!upstart
description "appname"
author "authorname"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn # restart when job dies
respawn limit 5 60 # give up after 5 respawns in 60 seconds
@eaton
eaton / gist:3768758
Created September 23, 2012 03:40 — forked from saetia/gist:1623487
Clean Install – Mountain Lion OS X 10.8
<?php
$ceiling = 600851475143;
$factor = -1;
for ($i = 1; $i < sqrt($ceiling); $i += 2) {
$factor = getLargestFactor($i);
if ($factor == 1) {
primeList($i);
}
}