Skip to content

Instantly share code, notes, and snippets.

View sanderversluys's full-sized avatar

Sander Versluys sanderversluys

View GitHub Profile
@sanderversluys
sanderversluys / EventsExample.js
Created February 6, 2012 10:40
Backbone.js Events
var object = {};
_.extend(object, Backbone.Events);
object.on("alert", function(msg) {
alert("Triggered " + msg);
});
object.trigger("alert", "an event");
@sanderversluys
sanderversluys / FractalAnimation.html
Created February 17, 2012 14:05
FractalAnimation
<!DOCTYPE html>
<html>
<head>
<script>
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Mˆller
@sanderversluys
sanderversluys / L-System.html
Created February 20, 2012 10:46
L-System exploration
<!DOCTYPE html>
<html>
<head>
<script>
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Mˆller
@sanderversluys
sanderversluys / L-System2.html
Created February 20, 2012 14:19
L-System exploration 2
<!DOCTYPE html>
<html>
<head>
<script>
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Mˆller
<!DOCTYPE html>
<html>
<head>
<style>
div.t { background-color: #ddd; position: absolute; }
</style>
<script>
window.addEventListener('load', function() {
@sanderversluys
sanderversluys / MandelbrotZoom.html
Created February 21, 2012 09:59
MandelbrotZoom
<!DOCTYPE html>
<html>
<head>
<script>
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Mˆller
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.widget.Toast;
public class MySecretBroadcastReceiver extends BroadcastReceiver {
public static final String DEBUG_KEY = "DEBUG";
@sanderversluys
sanderversluys / car-crash.html
Created May 31, 2012 15:26
Car crash calculator
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Car crash</title>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.8.20/themes/base/jquery-ui.css"/>
@sanderversluys
sanderversluys / twtcsv.py
Created June 26, 2012 08:04
Twitter to csv export script
import json
import urllib2
import unicodecsv
user = "ifsorbuts"
count = 100
output = "tweets.csv"
feed = "https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&screen_name={0}&count={1}".format(user, count)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include jni/libobj/Android.mk
include jni/libpng/Android.mk
include jni/libzip/Android.mk
include jni/freetype/Android.mk
include jni/ftgles/Android.mk
include jni/qcar/Android.mk