Skip to content

Instantly share code, notes, and snippets.

View konsumer's full-sized avatar

David Konsumer konsumer

View GitHub Profile
@konsumer
konsumer / index.html
Created October 26, 2012 12:32
Load Flare levels in melonjs
<!DOCTYPE html>
<html>
<head>
<title>Iso Demo</title>
<style>
html, body {
padding:0;
margin:0;
}
#framecounter {
@konsumer
konsumer / Makefile
Created January 20, 2013 10:37
Basic setup for C-based Gameboy rom with splash screen.
GBDK = /opt/gbdk
CC = ${GBDK}/bin/lcc -Wa-l -Wl-m -Wl-j
RGB = /opt/rgbds/rgbfix
BINS = mygame.gb
all: $(BINS)
%.o: %.c
$(CC) -c -o $@ $<
/**
* Menu file for DKart
*/
#include <gb/gb.h>
#include <stdio.h>
#include <string.h>
#include <gb/console.h>
#include <gb/drawing.h>
#include <gb/font.h>

OMG github is amazing

// this is code.
function dosSomeStuff(){
    console.log('o cool');
}
var w = new function() {
this.Jb = 153;
this.Xh = 178;
this.lh = 382
},
fa = 0;
function ga(a) {
if("object" != typeof a) return a;
if(a.hash) return a.hash();
count = 0
for l1 in range(ord('A'),ord('Z')):
for l2 in range(ord('A'),ord('Z')):
for l3 in range(ord('A'),ord('Z')):
for n1 in range(0,9):
for n2 in range(0,9):
for n3 in range(0,9):
# print "%s%s%s-%d%d%d" % (chr(l1), chr(l2), chr(l3), n1, n2, n3)
count+=1
print "you have a 1/%d chance of having a particular license number in Alaska, Mississippi, Nebraska, New Mexico, North Dakota, Northern Mariana Islands, Puerto Rico, South Carolina, or Vermont" % count
# this uses https://github.com/mjoldfield/Arduino-Makefile
ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java
ARDMK_DIR = ${HOME}/bin/Arduino-Makefile
ARDUINO_SKETCHBOOK = ${HOME}/Documents/Arduino
BOARD_TAG = uno
ARDUINO_PORT = /dev/cu.usb*
ARDUINO_LIBS = I2C16 EEPROM_24XX1025
void setup() {
Serial.begin(9600);
delay (500);
}
void loop() {
String content = "";
char character;
while(Serial.available()) {
character = Serial.read();
def wordSearch(puzzle, word):
rows = len(puzzle)
cols = len(puzzle[0])
for startingRow in range(rows):
for startingCol in range(cols):
found = w1(puzzle, word, startingRow, startingCol)
if (found != None):
return found
return None
/*!
* $ Simple Modal plugin
* Author: John Deerhake, @jdeerhake
* Version 0.0.4
* Licensed under the MIT license
*/
;(function ( $ ) {
var backdrop,
FADE_TIME = 300,