Skip to content

Instantly share code, notes, and snippets.

View dannypage's full-sized avatar
https://danny.page

Danny Page dannypage

https://danny.page
View GitHub Profile
anonymous
anonymous / gist:4331127
Created December 18, 2012 19:27
40 Random Letters and Numbers
''.join(random.sample(string.letters+string.digits, 40))
@dlo
dlo / README.md
Created December 20, 2012 04:42
Apple Crash Report Cleanup Script

A lot of the time, crash reports sent via email get a bit garbled over the wire, and Xcode won't symbolicate them. It turns out that a lot of email clients (including Apple Mail) are the cause of this.

This script takes a crash report and cleans it up so that Xcode likes it.

Usage:

$ cat example.crash | cleanup.py
@matt-bernhardt
matt-bernhardt / 070831_mls_salaries.csv
Last active January 27, 2016 04:41
Files describing salary expenditures in Major League Soccer from 2007 through 2015. See more at
Club Last Name First Name Pos Base Salary Compensation
CHI Armas Chris M $225,000.00 $225,000.00
CHI Banner Michael M $12,900.00 $12,900.00
CHI Barrett Chad F $41,212.50 $48,712.50
CHI Blanco Cuauhtemoc F $2,492,316.00 $2,666,778.00
CHI Brown C.J. D $106,391.00 $106,391.00
CHI Busch Jon GK $58,008.00 $58,008.00
CHI Carr Calen F $38,000.00 $50,500.00
CHI Conde Wilman D $144,000.00 $151,500.00
CHI Correa Thiago M $44,100.00 $44,100.00
@dariusk
dariusk / index.js
Created February 20, 2016 19:28
@TinyAssistant
var Twit = require('twit');
var T = new Twit(require('./config.js'));
var wordfilter = require('wordfilter');
var ent = require('ent');
var readability = require('readability-api');
readability.configure({
consumer_key: 'CONSUMER_KEY',
consumer_secret: 'CONSUMER_SECRET'
});
@AlexandreRangel
AlexandreRangel / concrete-v03.rb
Created October 9, 2016 23:20
Sonic Pi music code
# Alexandre rANGEL www.quasecinema.org
# born out of concrete v03
# 9/Oct/2016
# Sonic Pi 2.11 dev
use_bpm 120
live_loop :notes1 do
with_bpm 240 do
x = tick
@matt-bernhardt
matt-bernhardt / ppg_2011-2015.csv
Created July 10, 2016 15:27
Points Per Game after every round of MLS play, from 2011 - 2015
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 40 columns, instead of 36 in line 5.
ID,Season,Team,Playoffs,Position,TeamID,G1,G2,G3,G4,G5,G6,G7,G8,G9,G10,G11,G12,G13,G14,G15,G16,G17,G18,G19,G20,G21,G22,G23,G24,G25,G26,G27,G28,G29,G30,G31,G32,G33,G34
1,2011,Columbus,Yes,4,11,0,0.5,1.33,1.25,1.6,1.5,1.71,1.63,1.44,1.3,1.27,1.25,1.38,1.29,1.4,1.5,1.41,1.5,1.47,1.4,1.48,1.55,1.48,1.54,1.6,1.54,1.48,1.46,1.41,1.37,1.32,1.38,1.42,1.38
2,2011,DC,No,7,12,3,1.5,1,1,1.4,1.17,1,1.25,1.22,1.2,1.36,1.33,1.23,1.21,1.2,1.19,1.29,1.28,1.21,1.3,1.29,1.36,1.35,1.29,1.36,1.31,1.3,1.36,1.31,1.27,1.23,1.19,1.18,1.15
3,2011,Chicago,No,6,13,1,2,1.33,1,0.8,0.83,0.86,0.88,0.89,0.8,0.82,0.83,0.85,1,1,1,1,1,0.95,0.9,0.9,0.86,0.87,0.88,0.96,1.04,1,1.07,1.14,1.2,1.19,1.16,1.21,1.26
4,2011,Colorado,Yes,5,14,3,3,3,2.25,1.8,1.5,1.43,1.63,1.56,1.5,1.45,1.42,1.38,1.36,1.47,1.38,1.29,1.28,1.26,1.35,1.29,1.36,1.35,1.42,1.48,1.54,1.52,1.46,1.41,1.37,1.35,1.41,1.39,1.44
5,2011,New England,No,9,15,1,2,1.67,1.5,1.2,1,1.29,1.13,1.11,1.3,1.18,1.08,1,0.93,0.93,0.94,0.88,0.89,0.84,0.95,0.95,0.95,0.91,0.88,0.88,0.88,0.89,0.96,0.93,0.9
@tangotiger
tangotiger / parseSchedule.py
Last active June 20, 2017 23:49
NHL Schedule: JSON to csv/html
import json
print("Parse start")
# http://live.nhl.com/GameData/SeasonSchedule-20152016.json
sourcefile = "C:/Users/TOM/DataNHL/original/SeasonSchedule.json"
targetfile = "C:/Users/TOM/DataNHL/final/parsed_SeasonSchedule.csv"
htmltargetfile = "C:/Users/TOM/DataNHL/final/parsed_SeasonSchedule.htm"
header_row='NHL_GAME_ID' \
@MonkmanMH
MonkmanMH / gist:5802497
Created June 18, 2013 03:30
Annotating select points on an X-Y plot using ggplot2
#
# for details see
# http://bayesball.blogspot.ca/2013/06/annotating-select-points-on-x-y-plot.html
#
# load the ggplot2 and grid packages
library(ggplot2)
library(grid)
# read data (note csv files are renamed)
tbl1 = read.csv("FanGraphs_Leaderboard_h.csv")
tbl2 = read.csv("FanGraphs_Leaderboard_d.csv")
@FuzzySlipper
FuzzySlipper / JsonDB.cs
Created September 18, 2018 20:23
Runtime CastleDB file reader
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using SimpleJSON;
namespace PixelComrades {
public class JsonDB {
private const string Id = "ID";
private const string EnumProp = "hasIndex";
@jackrugile
jackrugile / calc.js
Last active January 8, 2019 15:38
Some common calculation helpers I use in a lot of my demos and games.
class Calc {
/*
------------------------------------------
| rand:float - returns random float
|
| min:number - minimum value
| max:number - maximum value
|
| Get a random float between two values