Skip to content

Instantly share code, notes, and snippets.

@rcolinray
rcolinray / pico8_entity_component.lua
Created September 4, 2018 02:52
Entity-component helpers for Pico-8
------------
-- object --
------------
-- base prototype
object={}
function object:new(o)
o=o or {}
setmetatable(o,self)
self.__index=self
@rcolinray
rcolinray / cool.sh
Created April 14, 2014 03:48
Remote into Cool Compilers VM
mkdir /Volumes/cool
sshfs compilers@localhost:/usr/class/cs143/cool /Volumes/cool -p 3022
open /Volumes/cool
@rcolinray
rcolinray / remove-cabal-pkgs.sh
Created April 8, 2014 23:14
Remove all Cabal packages.
for pkg in `ghc-pkg list | sed -e '1,/Cabal-1.18.1.3/d'`
do
ghc-pkg unregister --force $pkg
done
for file in `ls -d -1 ~/Library/Haskell/ghc-7.6.3/lib/** | grep -v Cabal-1.18.1.3`
do
rm -rf $file
done
@rcolinray
rcolinray / haste-boot-log.txt
Created April 2, 2014 05:16
Output from haste-boot
haste-boot
Downloading base libs from GitHub
Sending:
GET /haste-libs/haste-libs-0.2.99.tar.bz2 HTTP/1.1
Host: valderman.github.io
Creating new connection to valderman.github.io
Received:
HTTP/1.1 200 OK
@rcolinray
rcolinray / sonic-screwdriver.ino
Created November 19, 2013 21:02
Arduino sonic screwdriver.
#include <MozziGuts.h>
#include <Sample.h>
#include <EventDelay.h>
#include "sonicscrewdriver.h"
#define CONTROL_RATE 64
Sample <SONIC_SCREWDRIVER_NUM_CELLS, AUDIO_RATE> aSample(SONIC_SCREWDRIVER_DATA);
EventDelay kTriggerDelay;
@rcolinray
rcolinray / gl_ffmpeg.cpp
Created November 19, 2013 20:54
OpenGL-FFMpeg integration
// Use OpenGL 3.0+, but don't use GLU
#define GLFW_INCLUDE_GL3
#define GLFW_NO_GLU
#include <GL/glfw.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
extern "C" {