Skip to content

Instantly share code, notes, and snippets.

@dunkfordyce
dunkfordyce / index.html
Created November 22, 2012 19:07
midi -> nodejs -> socket.io -> browser
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost');
socket.on('midi', function (data) {
console.log(data);
});
</script>
@dunkfordyce
dunkfordyce / gist:f7e3b902b9ea6870e2f8
Created February 13, 2015 10:27
computercraft altar
-- simple altar turtle
-- anything put in its inventory it will place
-- into the altar and wait for it to become "something else"
-- by dunkfordyce/d1223m
altar = peripheral.wrap('front')
os.queueEvent('turtle_inventory')
while true do
[info] Preparing build dirs
Current branch localAspenBranch is up to date.
HEAD is now at d7e992d file parser queue: major rework to correctly support music albums wihout lucky timing and guessing, parsing times and proper queue restarts
First, rewinding head to replay your work on top of it...
Fast-forwarded master to 9bf1c2ead7ce401ce0f8fc3585e7a0cc47fb3f0f.
HEAD is now at 0c8eec0 MVK: pull new libvlc before re-applying patches
Updating '.':
Fetching external item into 'HTTPFetcher':
External at revision 143.
// classes example
#include <iostream>
using namespace std;
class Object {
public:
virtual string toString()=0;
virtual int toInt()=0;
virtual Object* add(Object* other)=0;
// classes example
// g++ -static-libgcc -static-libstdc++ main.cpp -o main.exe
#include <iostream>
#include <map>
using namespace std;
class Object {
public:
virtual string toString()=0;
// classes example
// g++ -static-libgcc -static-libstdc++ main.cpp -o main.exe
#include <iostream>
#include <map>
using namespace std;
class Object {
public:
virtual string toString()=0;
// classes example
// g++ -static-libgcc -static-libstdc++ main.cpp -o main.exe
#include <iostream>
#include <map>
#include <vector>
using namespace std;
class Object {
static vector<Object*> all_objects;