Skip to content

Instantly share code, notes, and snippets.

View BillyWM's full-sized avatar
🙉
🕹

William Wenge-Murphy BillyWM

🙉
🕹
View GitHub Profile
@nogweii
nogweii / github_news_feed_minimizer.user.js
Created April 23, 2010 02:04
An attempt at making the news feed better, cleaner, and less noisy.
// ==UserScript==
// @name Github news feed minimizer
// @namespace evaryont.me
// @include https://github.com/
// @include https://github.com/dashboard/yours
// @datecreated 2010-04-22
// @version 0.1
// @author Colin 'Evaryont' Shea
// @license MIT
// @description Do many little things, but overall, make the whole page a lot better.
/*
AST tree generated from parsing the following Design By Numbers program:
paper 30
repeat A 0 300
{
pen 50
line 0 55 100 55
SCRIPT_TITLE = "Mega Man 2 - Weapon Select"
SCRIPT_VERSION = "1.0"
require "m_utils"
m_require("m_utils",0)
--[[
Just a quick script to allow Mega Man to cycle through his weapons with the select button without having to pause.
It works, but it's pretty buggy.
@sli
sli / fan-c.c
Last active September 24, 2015 08:18
Fancy C dialect for prim and proper programmeurs.
//#define ?? auto
#define cease break
#define upon case
//#define ?? char
#define steadfast const
#define abide continue
//#define ?? default
#define undertake do
//#define ?? double
#define otherwise else
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
@also
also / mozilla-readasarraybuffer.js
Created April 10, 2011 05:47
readAsArrayBuffer polyfill for Firefox 4
if (!FileReader.prototype.readAsArrayBuffer) {
FileReader.prototype.readAsArrayBuffer = function readAsArrayBuffer () {
this.readAsBinaryString.apply(this, arguments);
this.__defineGetter__('resultString', this.__lookupGetter__('result'));
this.__defineGetter__('result', function () {
var string = this.resultString;
var result = new Uint8Array(string.length);
for (var i = 0; i < string.length; i++) {
result[i] = string.charCodeAt(i);
}
@egonelbre
egonelbre / gist:938938
Created April 23, 2011 20:19
wave generation speed up
freq = 770; len = 10; rate = 44100; vol = 1.0;
start = new Date();
w = '';
phase = 0;
sin = Math.sin;
chr = String.fromCharCode;
total = len*rate;
@p01
p01 / LICENSE.txt
Last active March 9, 2024 13:40 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@brandon-fryslie
brandon-fryslie / genetic.js.coffee
Created February 24, 2012 08:32
Genetic Algorithm in CoffeeScript
# Add some useful features to array prototypes
Array::fold = (initial, fn) -> initial = fn initial, x for x in @; initial
Array::sum = -> @fold 0, (memo, i) -> memo + i
Array::mean = -> @sum() / @length
Array::max = -> Math.max.apply {}, @
Array::min = -> Math.min.apply {}, @
Array::median = -> if @length % 2 is 0 then (@[@length/2-1]+@[@length/2])/2 else @[Math.ceil @length/2]
Array::variance = -> avg = @mean(); @fold(0, (memo, i) -> memo + Math.pow i-avg, 2) / @length
Array::std_dev = -> Math.sqrt @variance()
@dmajda
dmajda / gist:1926638
Created February 27, 2012 19:58
Semantic predicates and label visibility in PEG.js
/*
* Task: Parse even numbers in PEG.js (http://pegjs.majda.cz).
*
* Solution: Let's parse all numbers and reject odd ones using a semantic
* predicate -- an arbitrary piece of code that returns true (meaning "continue
* parsing") or false (meaning "halt parsing").
*
* This solution wouldn't work before commit a2af1fe612 because predicates
* didn't have access to labeled expressions in the grammar as variables
* (without ugly workarounds). But they have the access now and the solution