Skip to content

Instantly share code, notes, and snippets.

@ssokolow
ssokolow / magog_updates_filter.py
Created June 22, 2016 15:16
Minimal prototype pre-differ for MaGOG dumps
#!/usr/bin/env python
"""This script should work as a way to extract only changed lines from a
pair of MaGOG dumps in a format that can be imported into a spreadsheet
tool.
"""
# Minimal argument-reading for proof of concept (I'd use argparse instead)
from sys import argv
import difflib, re
@banksean
banksean / perlin-noise-classical.js
Created February 15, 2010 10:00
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough [email protected]
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/