Skip to content

Instantly share code, notes, and snippets.

View sspboyd's full-sized avatar
🎯
Focusing

Stephen Boyd sspboyd

🎯
Focusing
View GitHub Profile
@sindresorhus
sindresorhus / countrycode-latlong-array.json
Created November 5, 2011 16:03
Country codes (ISO 3166) to latitude longitude - converted from http://www.maxmind.com/app/country_latlon
{
"ad": [
"42.5000",
"1.5000"
],
"ae": [
"24.0000",
"54.0000"
],
"af": [
@sspboyd
sspboyd / processing.org-new-project-template.java
Last active August 9, 2022 18:10
Processing.org-New Project Template
import processing.pdf.*;
////Declare Globals
int rSn; // randomSeed number. put into var so can be saved in file name. defaults to 47
final float PHI = 0.618033989;
boolean recording = false; // used for MovieMaker output
boolean PDFOUT = false;
//// Declare Font Variables
@imbcmdth
imbcmdth / fast_math.js
Last active June 26, 2021 05:54
Fast Approximate Functions for JavaScript based on https://code.google.com/p/fastapprox/
var Approx = {
fastlog2: (function () {
var a = new ArrayBuffer(4),
i = new Int32Array(a),
f = new Float32Array(a);
return function fasterLog2 (number) {
f[0] = number;
var t = i[0] * 1.1920928955078125e-7;
return t - 126.94269504;
@dbreunig
dbreunig / ReporterSaveFileDescription.md
Last active January 22, 2021 16:07
A description of the data written to the Reporter App Dropbox save folder.

#Reporter Save File Schema

##The Reporter Export File

Reporter saves to your Dropbox account with plaintext JSON files, one for each day. When a Report is entered in the app a file is created for that day if it does not exist. Otherwise, the report is appended to the existing file. The save folder is located in 'Dropbox/Apps/Reporter-App/'.

Reporter save files are named according to the following convention:

YYYY-MM-DD-reporter-export.json

Toxi's Lebkuchen (plain "Elisen" style)

Spice blend

  • 3 whole star anise
  • 15 whole cardamon pods
  • 2 tblsp ground cinnamon (or ~0.75 stick)
  • 1.5 tblsp ground cloves
  • 0.5 tsp ground coriander
  • 0.75 tsp ground ginger
@mchow01
mchow01 / TWTR-mysql.py
Last active May 7, 2020 17:36
Store tweets from a Twitter timeline into a MySQL database using Tweepy
import tweepy
import MySQLdb
import sys
# Tweepy API doc here: http://pythonhosted.org/tweepy/html/api.html
# Keys
consumer_key = ''
consumer_secret = ''
access_token = ''
@mbostock
mbostock / .block
Last active May 10, 2021 17:42
Beeswarm
license: gpl-3.0
height: 200
redirect: https://observablehq.com/@d3/beeswarm
@steveharoz
steveharoz / .block
Last active May 8, 2024 12:21 — forked from mbostock/.block
d3-force testing ground
license: gpl-3.0
height: 1030
scrolling: yes
@widmerin
widmerin / .block
Last active April 18, 2021 14:04 — forked from netzwerg/.block
D3.js Life in Weeks
license: apache-2.0
border: no
height: 900
@d3indepth
d3indepth / .block
Last active April 19, 2021 20:54
Force layout (x axis)
license: gpl-3.0
height: 220
border: no