Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dogwalk" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="10"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".KevinWynneScheduleActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="adnroid.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
@shakesoda
shakesoda / add-events.js
Created October 21, 2011 20:52
JavaScript: This is what I get for not wanting to repeat myself.
/*
* Example usage:
* addEvents(document, {
* load: [ foo, bar ],
* click: baz
* })
*/
function addEvents(obj, list, evt) {
function isArray(value) {
return (value instanceof Array)
# shakesoda's xorg.conf with modelines for 640x480 and 800x600 arcade monitors
# tested with a Makvision M2929D4G-TS (h freqs 30-40KHz, v freqs 47-90Hz)
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
require 'rmagick'
#
# simple mandelbrot set using imagemagick
#
# settings
maxIterations = 50
factor = 256.0
@shakesoda
shakesoda / steps.rs
Created December 8, 2011 02:53
RS format spec (WIP)
--
This format is designed to be very easy to parse, flexible and deterministic. A
section may only be defined once. If multiple are defined using the same
identifier then only the first will be parsed.
Sections are marked by lines beginning with -- <identifier>. Blank identifiers
or ones that aren't searched for will be completely ignored and may contain
anything. Spaces, Tabs, and Newlines (LF, CRLF) are ignored.
Note: the version tag is _required_ to guarantee compatibility - if you don't
@shakesoda
shakesoda / install-server.sh
Created December 11, 2011 02:11
quick craftbukkit setup
#!/bin/bash
BINDIR=/Users/`whoami`/minecraft
mkdir $BINDIR
cd $BINDIR
# download latest craftbukkit
curl -O http://ci.bukkit.org/job/dev-CraftBukkit/lastSuccessfulBuild/artifact/target/craftbukkit-1.0.0-SNAPSHOT.jar
#define FORMAT(str) \
{ \
va_list va; \
char staticbuf[1024]; \
char *buf = staticbuf; \
va_start(va, in); \
unsigned int need = vsnprintf(buf, sizeof(staticbuf), in, va) + 1; \
if (need > sizeof(staticbuf)) \
{ \
/* staticbuf wasn't large enough, malloc large enough */ \
@shakesoda
shakesoda / gist:1871736
Created February 20, 2012 21:52
OpenGL Error macro
#define CheckError()\
{\
GLenum err = glGetError();\
if (unlikely(err != GL_NO_ERROR))\
{\
for (; err != GL_NO_ERROR; err = glGetError())\
{\
switch (err)\
{\
case GL_INVALID_ENUM: LOG->Error("GL_INVALID_ENUM"); break;\
@shakesoda
shakesoda / jcl.sh
Created March 6, 2012 17:23
Quick and dirty shell script to remove some junk files from JOE
#!/usr/bin/env bash
if [[ $# != "1" ]]; then
echo "Not enough arguments. Usage: jcl <path>"
exit
fi
# remove trailing slash
path=`echo $1 | sed 's/\/*$//'`
@shakesoda
shakesoda / foo.cpp
Created April 9, 2012 21:18
uniform setter thing
class Uniform
{
public:
// todo: macroify, make m_program actually a thing.
void set_uniform_float(std::string key, float data)
{
using namespace std;
unsigned location = 0;
map<string, unsigned>::iterator it;