Skip to content

Instantly share code, notes, and snippets.

@djacobs
djacobs / euler24.js
Created November 30, 2011 04:22
Euler 24 solution
#!/usr/local/bin/node
// basic problem setup
// the answer we want for the millionth iteration is 2783915460
var iteration = 999999;
var size = 2;
// figure out the size of the largest factorial smaller than our target iteration
var tempi = iteration;
@djacobs
djacobs / propubnerd-gists.md
Created March 26, 2012 17:07 — forked from kleinmatic/propubnerd-gists.md
ProPubNerd Gists

Open Source code doesn’t always come in big complex packages. At ProPublica we sometimes share small, simple snippets of using GitHub "Gists." These Gists range from single-byte file delimiters to an entire JavaScript framework for making stepper graphics. They rarely have documentation and don’t even always have names, but they can be super-useful. Here are some we’ve shared over the past few years:

@djacobs
djacobs / automatedBuildAndUploadToTestflight.sh
Created April 18, 2012 04:20 — forked from amattn/automatedBuildAndUploadToTestflight.sh
Automated Xcode build and upload to TestFlight.
#!/bin/sh
# Current as working as of 2012/4/17
# Xcode 4.3.2
PROJECT_ROOT="$HOME/SomeDirWhereYourProjectLives/XXXXXXXX"
WORKSPACE="$PROJECT_ROOT/XXXXXXXX.xcodeproj/project.xcworkspace"
CONFIG="AdHoc"
SCHEME="XXXXXXXX"
import time
import random
random.seed(time.clock())
print random.randint(0, 10000);