I hereby claim:
- I am osteele on github.
- I am osteele (https://keybase.io/osteele) on keybase.
- I have a public key whose fingerprint is C498 49BE 5DEA 5871 3D3B 9EBD 6410 7EDA 1D58 E869
To claim this, I am signing this object:
puts (1..100).map { |n| '1'*n+":#{n}\n" }.join. | |
gsub(/^(1{5})*:/,'\0Buzz').gsub(/^(1{3})*:/,'Fizz').gsub(/.*:|(z)\d+/,'\1') | |
puts (1..100).map { |n| 'x'*n+"#{n}\n" }.join. | |
gsub(/^(xxx)*\d/,'Fizz').gsub(/[05]$/,'Buzz').gsub(/^x*|\d*(.+?)\d*/,'\1') | |
# This application template for Rails >= 2.3 installs the OpenLaszlo | |
# plugin and its dependencies. It offers to download the OpenLaszlo | |
# SDK and set the OPENLASZLO_HOME environment variable, and it updates | |
# .gitignore. | |
# | |
# To create a new Rails app: | |
# rails webapp -m http://gist.github.com/83809.txt | |
# | |
# To upgrade an existing app: | |
# rake rails:template LOCATION=http://gist.github.com/83809.txt |
I hereby claim:
To claim this, I am signing this object:
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [AnyObject]) { | |
let location = locations.lastObject as! CLLocation | |
if let lastLocation = lastGeocodedLocation { | |
if lastLocation.distanceFromLocation(location) < distanceFilter { | |
NSLog("current location is within \(round(distanceFilter))m of previous location") | |
return | |
} | |
if abs(location.coordinate.latitude - lastLocation.coordinate.latitude) < lastLocation.horizontalAccuracy && | |
abs(location.coordinate.longitude - lastLocation.coordinate.longitude) < lastLocation.verticalAccuracy { | |
var distance = sqrt(pow(lastLocation.horizontalAccuracy,2) + pow(lastLocation.verticalAccuracy,2)) |
#!/usr/bin/env python | |
# INSTALL: pip install github3.py | |
# USAGE: ./get_file_forks.py AllenDowney/DataScience age_lm.py | |
# Set HOMEBREW_GITHUB_API_TOKEN to avoid Github's rate limit. | |
import os | |
import sys | |
import github3 |
#!/bin/bash -eu | |
# Usage: wget https://gist.githubusercontent.com/osteele/7f53dce67ce2925f55e2/raw/install-sublime.sh | bash | |
# Add the Sublime Text 3 (ST3) repository | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
# Update and upgrade your system: | |
sudo apt-get update | |
sudo apt-get upgrade |
# Install Package Control package manager for ST3 | |
ST3_CONFIG=~/.config/sublime-text-3 | |
PC_DIR=$ST3_CONFIG/Installed\ Packages/Package\ Control.sublime-package | |
PC_FNAME=Package%20Control.sublime-package | |
mkdir -p "$PC_DIR" | |
curl -O https://sublime.wbond.net/$PC_FNAME | |
unzip -u $PC_FNAME -d "$PC_DIR" | |
rm $PC_FNAME | |
# Add the Anaconda and Floobits packages. When ST3 is launched, Package Control will install these. |
#!/bin/bash -eu | |
die() { echo "$@" 1>&2 ; exit 1; } | |
LAUNCH_AGENTS_DIR=~/Library/LaunchAgents | |
[[ -d $LAUNCH_AGENTS_DIR ]] || die "Missing directory: $LAUNCH_AGENTS_DIR. Are you sure you're on a Mac?" | |
NOTEBOOK_DIR=~/code/notebooks | |
[[ -d $NOTEBOOK_DIR ]] || die "Missing directory: $NOTEBOOK_DIR" |
# -*- coding: utf-8 -*- | |
"""Print email nags regarding toolbox pull requests. | |
The current directory should contain a file `Master Grades.xlsx` with two sheets, and columns | |
`First Name`, `Last Name`, `E-mail`, and `GitHub`. | |
Author: Oliver Steele <oliver.steele@olin.edu> | |
""" | |
import os |