Skip to content

Instantly share code, notes, and snippets.

View halfmanhalfdonut's full-sized avatar
🏒

Nick Jurista halfmanhalfdonut

🏒
View GitHub Profile

Keybase proof

I hereby claim:

  • I am halfmanhalfdonut on github.
  • I am demibeignet (https://keybase.io/demibeignet) on keybase.
  • I have a public key ASAl1WCKqtigY1nWsxo5IMQE-bKgQ8X6rB0nQFwtcqTXhAo

To claim this, I am signing this object:

/** GENERATED: Fri Apr 15 07:59:53 PDT 2016 **/
(function($, settings) {
if (!String.prototype.trim) {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
};
}
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function(searchElement, fromIndex) {
var i, pivot = (fromIndex) ? fromIndex : 0,
@halfmanhalfdonut
halfmanhalfdonut / khl-rosters.json
Last active December 18, 2015 07:19
KHL Juiced ROM rosters
[
[
{
"first_name": "Emil",
"last_name": "Garipov",
"position": "G",
"jersey": 77
},
{
"first_name": "Konstantin",
@halfmanhalfdonut
halfmanhalfdonut / NHL94GameStatExtractor.php
Last active December 16, 2015 14:29
NHL94 Stat Extractor (ZSnes)
<?php
namespace app\extractors;
use \Exception;
class NHL94GameStatExtractor {
/* Hex locations for stats */
# AA - time in seconds
@halfmanhalfdonut
halfmanhalfdonut / NestopiaExtractor.php
Created April 24, 2013 00:32
Stat Extractor for Tecmo Super Bowl (NES)
<?php
class NestopiaExtractor {
//private vars for storage of stats
var $home;
var $away;
//hex locations for stats
const SCORE_LOC = 0x3CD;
@halfmanhalfdonut
halfmanhalfdonut / sf2.coffee
Last active December 16, 2015 13:39
Super Street Fighter II stat extractor (2p)
fs = require 'fs'
class SF2
constructor: (file) ->
# Skeleton json response
@stats = {
"session": +new Date
"p1": {
"fighters": [],
"total": {}
@halfmanhalfdonut
halfmanhalfdonut / basketball-prototype.coffee
Last active September 29, 2015 17:17
Keanu Basketball module
Basketball = (keanu, opts, duration) ->
return if not keanu
@keanu = keanu
@ctx = @keanu.ctx
@origin = opts.origin or []
@originX = @origin[0] or 0
@originY = @origin[1] or 0
@originRadius = @origin[2] or 0
INTERVAL_TIME = 10 # 10ms between each interval
# whoa
# Keanu constructor (new Keanu())
# @id - String - DOM element ID for desired canvas object
# returns Keanu object
class window.Keanu
constructor: (id) ->
return if not id
@canvas = document.getElementById id
@ctx = @canvas.getContext '2d'
@halfmanhalfdonut
halfmanhalfdonut / Basketball.js
Created October 14, 2011 16:34
Basketball shell
var Basketball; // The only thing I smoke are fools like you on the b-ball court
// So our basketball needs to take some options -- namely if it's using ball trails or not. Yes? Yes.
// We also need it to keep track of its own bounding box. That is, the minimum and maximum X/Y values
// We can probably reduce mouse trail load by making them one shape rather than multiple circles.
(function() {
Basketball = function(keanu, opts, duration) {
if (!keanu) return; // Well forget YOU, then. No where to draw this bad boy!