Skip to content

Instantly share code, notes, and snippets.

View jon's full-sized avatar

Jon Olson jon

View GitHub Profile
//
// BPIdentityTableViewCell.h
//
// Created by Jon Olson on 12/06/09.
// Copyright 2010 Ballistic Pigeon, LLC. All rights reserved.
//
#import <UIKit/UIKit.h>
#!/bin/sh
if ! [ "$#" = "1" ]; then
echo "Usage: $0 <submodule name>"
exit 1
fi
name="$1"
path=$(git config -f .gitmodules submodule."$name".path)
require 'rubygems'
require 'octopi'
require 'lighthouse'
require 'pp'
include Octopi
include Lighthouse
@username, @project, @lighthouse_account, @lighthouse_token, @lighthouse_project = ARGV
//
// Prefix header for all source files of the 'MobileAugers' target in the 'MobileAugers' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define nonatomic_retainProperty(prop, value) do { if (prop != value) { [prop release]; prop = [value retain]; } } while(0);
#define nonatomic_copyProperty(prop, value) do { if (prop != value) { [prop release]; prop = [value copy]; } } while(0);
//
// Prefix header for all source files of the 'Folio' target in the 'Folio' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CoreText/CoreText.h>
Trapped in a mandatory recruiting meeting. We are, it seems, hiring for just about everything. Doing my part:
Dir Sir or Madam,
Fancy a trip to Seattle? Talk to me about jobs at Amazon. We're actively hiring for Software Development Engineers, Software Development Engineers in Test, Web Development Engineers, Quality Assurance Engineers, and many other positions. The project is super secret, but I have been authorized to tell you that perks include a free pony and beer.
Your friend,
Jon Olson
Amazon.com
from sys import argv
from math import sqrt
maxval = int(argv.pop())
x = [ True ] * maxval
x[0] = False
for n in xrange(1, int(sqrt(maxval + 1)), 2):
if x[n - 1]:
m = n ** 2
* os-
* `y//`
* `oNy+
* .s:y
* /ooy:
* :oM:o-
* `od`y-
* os`m+:
* //+s.y-
* `/m.`y-
@jon
jon / gist:4229137
Created December 6, 2012 22:39
Just how many UDP packets *can* I send?
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
import Hypervisor
class X86InitialState {
let registers: Dictionary<hv_x86_reg_t, UInt64> = [
HV_X86_RIP: 0xfff0,
HV_X86_RFLAGS: 0x2,
HV_X86_RAX: 0,
HV_X86_RCX: 0,
HV_X86_RDX: 0xf00,
HV_X86_RBX: 0,