Skip to content

Instantly share code, notes, and snippets.

@luser
luser / crashlog
Created July 7, 2011 23:19
Telephone.app crash
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 17:58 — forked from pnasrat/gist:935329
bob's install-name-tool.py
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 October 27, 2012 15:17
webrtc datachannel demo
<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 November 8, 2012 19:58
Unpacking Wind Waker strings
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:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<video id="local" autoplay></video>
<video id="remote" autoplay></video>
<pre id="out">
</pre>
</body>
@luser
luser / dump.c
Last active December 16, 2015 16:19 — forked from anonymous/dump.c.txt
#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 December 6, 2013 19:01
Gamepad API Events
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 December 6, 2013 19:17
Gamepad API using navigator.getGamepads()
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 December 6, 2013 19:40
gamepaddisconnected event
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 December 6, 2013 20:45
Gamepad API button handling
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;