Skip to content

Instantly share code, notes, and snippets.

Avatar

Eddie Ringle EddieRingle

View GitHub Profile
@EddieRingle
EddieRingle / darray.c
Created Oct 23, 2011
A Neat DArray Implementation
View darray.c
/*
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@EddieRingle
EddieRingle / hashtable.c
Created Oct 28, 2011
A Neat HashTable Implementation
View hashtable.c
/*
* Copyright (c) 2011 Eddie Ringle <eddie@eringle.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
View ui.coffee
###
UI Element classes
Written by Eddie Ringle
###
class Button extends HTMLButtonElement
constructor: (@className, value) ->
@innerHTML = value
setValue: (value) ->
@EddieRingle
EddieRingle / example.c
Created Mar 10, 2012
I don't even know
View example.c
struct crb_game {
int state;
char *name;
crb_gfx *gfx;
crb_snd *snd;
crb_lua *lua;
int (*on_start)(void);
int (*on_stop)(void);
@EddieRingle
EddieRingle / gist:2189280
Created Mar 24, 2012
Simple JSON to HTML thingy
View gist:2189280
shapeOptions = [
{
node: "select"
children: [
{
node: "option"
attrs: {
value: "rectangle"
}
content: "Rectangle"
View gameLoop.coffee
gameLoop: ->
@running = true
@lastTickCount = 0
@totalTickCount = 0
lastTick = lastFrame = psTicks = 0
ticksSince = 0
frames = ticks = 0
doTick = doFrame = no
updateLoop = (currentTicks) =>
doTick = (currentTicks - lastTick) > (1000 / @targetTickrate)
View preferences.c
#include "crb/preferences.h"
static struct crb_preferences *prefs;
int crb_preferences_initialize(char *prefs_file)
{
if (prefs != NULL)
crb_preferences_cleanup();
if (prefs_file == NULL) {
@EddieRingle
EddieRingle / gist:3086528
Created Jul 10, 2012
List of things pooshed to the AOSP 4.1.1 build from the I/O JB image for toro
View gist:3086528
/vendor/firmware/ducati-m3.bin
/vendor/firmware/libpn544_fw.so
/vendor/firmware/smc_pa_wvdrm.ift
/vendor/lib/libsec-ril.so
/vendor/lib/libwvdrm_L1.so
/vendor/lib/libwvm.so
/vendor/lib/libWVStreamControlAPI_L1.so
/vendor/lib/drm/libdrmwvmplugin.so
/vendor/lib/hw/gps.omap4.so
/etc/permissions/com.vzw.hardware.ehrpd.xml
@EddieRingle
EddieRingle / gist:3179361
Created Jul 25, 2012
A Slide-out Navigation Implementation for Android
View gist:3179361

This Gist is now embodied in the form of Undergarment. That is all.

View hash_fun.patch
--- util/google/sparsehash/sparseconfig.h
+++ util/google/sparsehash/sparseconfig.h
@@ -5,7 +5,7 @@
#define GOOGLE_NAMESPACE ::google
/* the location of <hash_fun.h>/<stl_hash_fun.h> */
-#define HASH_FUN_H "hash_fun.h"
+#define HASH_FUN_H </usr/include/c++/4.2.1/ext/hash_fun.h>
/* the location of <hash_map> */