This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// rAF polyfill based on https://gist.github.com/1579671 | |
(function(w) { | |
"use strict"; | |
// Find vendor prefix, if any | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for( var i = 0; i < vendors.length && !w.requestAnimationFrame; i++ ) { | |
w.requestAnimationFrame = w[vendors[i]+'RequestAnimationFrame']; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
import win32api | |
if (len(sys.argv) < 4): | |
print "Usage: python mousemove.py dx dy speed" | |
sys.exit() | |
current = win32api.GetCursorPos() | |
cx = sx = current[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ig.module( | |
'plugins.touch-button' | |
) | |
.requires( | |
'impact.system', | |
'impact.input', | |
'impact.image' | |
) | |
.defines(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ig.module( | |
'plugins.analog-stick' | |
) | |
.requires( | |
'impact.system' | |
) | |
.defines(function(){ | |
ig.AnalogStick = ig.Class.extend({ | |
stickSize: 30, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var video = document.createElement('video'); | |
console.log( 'can play mp4', video.canPlayType('video/mp4') ); | |
video.src = 'test.mov'; | |
// Also loads from the internet: | |
//video.src = 'http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1211/sample_iTunes.mov'; | |
// Show playback controls: | |
//video.controls = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author mrdoob / http://mrdoob.com/ | |
*/ | |
THREE.OBJLoader = function () { | |
THREE.EventDispatcher.call( this ); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/ioctl.h> | |
#include <arpa/inet.h> | |
#include <net/if.h> | |
void ip_for_interface(const char *interface_name, char *ip, const int length) { | |
*ip = NULL; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <string.h> | |
typedef union { | |
unsigned int hex; | |
struct { | |
unsigned char r, g, b, a; |
OlderNewer