Skip to content

Instantly share code, notes, and snippets.

View jonsterling's full-sized avatar

Jon Sterling jonsterling

View GitHub Profile
Act III.
Scene III. A room in the castle.
PARTS:
Claudius -- Jon Sterling
Hamlet -- Pascal Matheis
Rosencrantz -- ??
Guildenstern -- ??
Polonius -- ??
* Song : Soloist
1. Santa Claus Is Coming To Town : Noah
2. Christmas Time Is Here : Jon
3. Winter Wonderland : Noah
4. O Tannenbaum : Pascal
5. O Come, O Come, Emmanuel : Pascal
6. Sleigh Ride : Jon
7. Have Yourself A Merry Little Christmas : Noah
8. Let It Snow : Noah
@jonsterling
jonsterling / .gitignore
Created January 14, 2010 20:16
Polarization Assessments
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@jonsterling
jonsterling / Problem-1.rb
Created February 1, 2010 03:46
Project Euler
# Find the sum of all the natural multiples of 3 or 5 below 1000.
puts (1...1000).select { |i| i % 3 == 0 or i % 5 == 0 }.inject { |s,i| s+i }
if ([delegate respondsToSelector:@selector(fooController:didBar:baz:qux:)]) {
[delegate fooController:self
didBar:@"barbarian"
baz:@"buzzbuzz"
qux:@"wtfreally?"];
}
// vs.
[[delegate ifResponds] fooController:self
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[letterpaper, 12pt]{article}
\usepackage{amsmath,amsfonts,amssymb,fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Adobe Caslon Pro}
\title{\Large\sc title goes here}
\author{Jonathan M. Sterling}
\usepackage{textcase}
\let\oldtextsc\textsc
\def\textsc #1{\oldtextsc{\MakeTextLowercase{#1}}}
\begin{enumerate}
\item \emph{What is the National Science Foundation?}\\
The \textsc{NSF} is where discoveries begin.
\item\begin{enumerate}
#import <UIKit/UIKit.h>
@interface UIControl (Blocks)
- (void)setActionForControlEvents:(UIControlEvents)controlEvents withBlock:(void (^)(id))aBlock;
@end
@interface RootViewController (Actions)
- (void)_goBack:sender;
- (void)_goForward:sender;
@end
@implementation RootViewController
- (void)viewDidLoad {
[super viewDidLoad];
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
CGRect r1 = CGRectMake(0.0f, 0.0f, tableView.frame.size.width,
[self tableView:tableView heightForHeaderInSection:section]);
CGRect r2 = r1;
r2.size.height += 15.0f;
UIView *v = [[UIView alloc] initWithFrame:r1];
SectionHeaderView *shv = [[SectionHeaderView alloc] initWithFrame:r2];
[shv setTitle:[self tableView:tableView titleForHeaderInSection:section]];