Skip to content

Instantly share code, notes, and snippets.


Ted Mielczarek luser

View GitHub Profile
luser / crashlog
Created Jul 7, 2011 crash
View crashlog
Process: Telephone [29524]
Path: /Applications/
Identifier: com.tlphn.Telephone
Version: 1.0.1 (101)
App Item ID: 406825478
App External ID: 3343632
Code Type: X86-64 (Native)
Parent Process: launchd [103]
Date/Time: 2011-07-07 15:25:29.119 -0400
luser / gist:2829765
Created May 29, 2012 — forked from pnasrat/gist:935329
View gist:2829765
import macholib
def install_name_tool(fn, new_id=None, changedict=None):
m = macholib.MachO(fn)
if new_id:
if changedict:
if __name__ == '__main__':
luser / local_data_chat.html
Created Oct 27, 2012
webrtc datachannel demo
View local_data_chat.html
<title>Simple WebRTC Data Channel Test</title>
<table width=100% height=100%>
<tr><td><h1>Simple WebRTC Data Channel Test</h1></td></tr>
<tr><td>(Note: this JS code is REALLY UGLY)</td></tr>
<tr><td><div><button id="thebutton" onClick="start();">Start!</button></div><br/></td></tr>
luser / README
Created Nov 8, 2012
Unpacking Wind Waker strings
First, acquire a Wind Waker ISO somehow.
Next you need some tools. You'll need the Wiimms ISO Tools: , you can fetch the source from:
svn co
Running "make" in that directory will build them.
You'll also need the Wiimms SZS Tools: , source is at:
View webrtctest.html
<!DOCTYPE html>
<video id="local" autoplay></video>
<video id="remote" autoplay></video>
<pre id="out">
View dump.c
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
int test(int x, int y) {
return x + y - x * y;
int end() {
return 0;
luser / gamepad-events.js
Created Dec 6, 2013
Gamepad API Events
View gamepad-events.js
window.addEventListener("gamepadconnected", function(e) {
console.log("Gamepad connected at index %d: %s. %d buttons, %d axes.",
e.gamepad.buttons.length, e.gamepad.axes.length);
luser / gamepad-getgamepads.js
Created Dec 6, 2013
Gamepad API using navigator.getGamepads()
View gamepad-getgamepads.js
var gamepad_count = 0;
function pollGamepads() {
var gamepads = navigator.getGamepads();
if (gamepads.length != gamepad_count) {
gamepad_count = gamepads.length;
for (var i = 0; i < gamepads.length; i++) {
console.log("Gamepad %d: %s. %d buttons, %d axes",
i, gamepads[i].id,
gamepads[i].buttons.length, gamepads[i].axes.length);
luser / gamepaddisconnected.js
Created Dec 6, 2013
gamepaddisconnected event
View gamepaddisconnected.js
window.addEventListener("gamepaddisconnected", function(e) {
console.log("Gamepad disconnected from index %d: %s",
luser / gamepad-buttons.js
Created Dec 6, 2013
Gamepad API button handling
View gamepad-buttons.js
function listButtons(gamepad) {
for (var i = 0; i < gamepad.buttons.length; i++) {
var b = gamepad.buttons[i];
var pressed, val;
if (typeof(b) == "object") {
pressed = b.pressed;
val = b.value;
} else {
val = b;
pressed = b == 1.0;