Skip to content

Instantly share code, notes, and snippets.

View darkoverlordofdata's full-sized avatar

Bruce Davidson darkoverlordofdata

View GitHub Profile
@darkoverlordofdata
darkoverlordofdata / SignalTest
Created February 16, 2015 21:27
FlxSignal issue
package ;
import flixel.util.FlxSignal;
class SignalTest {
var signal0:FlxSignal;
function callbackEmpty1() {}
public function new() {
@darkoverlordofdata
darkoverlordofdata / match.js
Created January 2, 2015 06:03
Ludei Multiplayer Adapter
/**
* Ludei Multiplayer Adapter:
*
* Turns Based Match
*
* @see https://github.com/ludei/cocoonjs-demos/tree/master/Multiplayer
* @dependancies cocoon.js
*
*/
var Match = (function(){
@darkoverlordofdata
darkoverlordofdata / mt19937.dart
Last active August 29, 2015 14:11
MersenneTwister dart port as class
/*
A C-program for MT19937, with initialization improved 2002/1/26.
Coded by Takuji Nishimura and Makoto Matsumoto.
Before using, initialize the state by using init_genrand(seed)
or init_by_array(init_key, key_length).
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
All rights reserved.
@darkoverlordofdata
darkoverlordofdata / canvas.cpp
Last active August 29, 2015 14:09
cpp in the browser
/**
From the demo:
http://www.lostdecadegames.com/how-to-make-a-simple-html5-canvas-game/
*/
#include <cheerp/client.h>
#include <cheerp/clientlib.h>
#include <cheerp/webgl.h>
#include <iostream>
@darkoverlordofdata
darkoverlordofdata / bits.coffee
Last active August 29, 2015 14:09
asm.js with coffee-script wrapper
asm = require('./bits_asm.js')
class Bits
SIZE = 1024;
bits: null
asm: null
constructor:(nbits=0) ->
@darkoverlordofdata
darkoverlordofdata / Gruntfile.coffee
Last active August 29, 2015 14:08
dart-like workflow
#+--------------------------------------------------------------------+
#| Gruntfile.coffee
#+--------------------------------------------------------------------+
#| Copyright DarkOverlordOfData (c) 2014
#+--------------------------------------------------------------------+
#|
#| dart-like workflow
#|
#| dart-like is free software; you can copy, modify, and distribute
#| it under the terms of the MIT License
@darkoverlordofdata
darkoverlordofdata / phaser_tutorial_02.dart
Last active August 29, 2015 14:08
Dart port of phaser_tutorial_02
import 'package:play_phaser/phaser.dart' as Phaser;
void main() {
new Game();
}
class Game extends Phaser.State {
var platforms;
@darkoverlordofdata
darkoverlordofdata / arg.coffee
Last active August 29, 2015 14:08
Spiced Rum-Script
#!/usr/bin/env coffee
#+--------------------------------------------------------------------+
#|
#| 'Tis file be part 'o Arg
#|
#| Arg! be free software; ye can copy, modify, 'n distribute
#| it under th' terms 'o th' MIT License
#|
#+--------------------------------------------------------------------+
@darkoverlordofdata
darkoverlordofdata / modular.coffee
Last active August 29, 2015 14:02
Lightweight CommonJS module manager
#
# Lightweight CommonJS module manager
#
# The page still needs to load the modules explicitly and in the
# correct order. Modular creates only the Define/Require semantics.
#
#
# define 'module_name', (module) ->
# define 'module_name', (exports) ->
# define 'module_name', (require) ->
@darkoverlordofdata
darkoverlordofdata / PdfToText.bas
Created April 23, 2014 16:43
Parse a PDF file in Excel VBA
Sub PdfToText()
Dim answer
Dim source As String
Dim dest As String
Dim exe As String
Dim wsh As Object
Set wsh = VBA.CreateObject("WScript.Shell")
answer = Application.GetOpenFilename(Title:="Please choose a file to import", FileFilter:="PDF Files *.pdf (*.pdf),")