Skip to content

Instantly share code, notes, and snippets.

Avatar

Ted Mielczarek luser

View GitHub Profile
@luser
luser / crashlog
Created Jul 7, 2011
Telephone.app crash
View crashlog
Process: Telephone [29524]
Path: /Applications/Telephone.app/Contents/MacOS/Telephone
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
luser / gist:2829765
Created May 29, 2012 — forked from pnasrat/gist:935329
bob's install-name-tool.py
View gist:2829765
import macholib
def install_name_tool(fn, new_id=None, changedict=None):
m = macholib.MachO(fn)
if new_id:
m.rewriteInstallNameCommand(new_id)
if changedict:
m.rewriteLoadCommands(changedict)
m.save()
if __name__ == '__main__':
@luser
luser / local_data_chat.html
Created Oct 27, 2012
webrtc datachannel demo
View local_data_chat.html
<html>
<head>
<title>Simple WebRTC Data Channel Test</title>
</head>
<body>
<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
luser / README
Created Nov 8, 2012
Unpacking Wind Waker strings
View README
First, acquire a Wind Waker ISO somehow.
Next you need some tools. You'll need the Wiimms ISO Tools:
http://wit.wiimm.de/ , you can fetch the source from:
svn co http://opensvn.wiimm.de/wii/trunk/wiimms-iso-tools/
Running "make" in that directory will build them.
You'll also need the Wiimms SZS Tools:
http://szs.wiimm.de/ , source is at:
View webrtctest.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<video id="local" autoplay></video>
<video id="remote" autoplay></video>
<pre id="out">
</pre>
</body>
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
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.index, e.gamepad.id,
e.gamepad.buttons.length, e.gamepad.axes.length);
});
@luser
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
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",
e.gamepad.index, e.gamepad.id);
});
@luser
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;