Skip to content

Instantly share code, notes, and snippets.

View No9's full-sized avatar
🦀
Rusting with a slight chance of code

Anton Whalley No9

🦀
Rusting with a slight chance of code
View GitHub Profile
@No9
No9 / Harmon.js
Created May 28, 2012 21:11
A sample implementation of trumpet in nodejistsu http-proxy
var http = require('http'),
httpProxy = require('http-proxy'),
trumpet = require('trumpet');
httpProxy.createServer(
function (req, res, next) {
var _write = res.write;
res.write = function (data) {
var app = require('http').createServer(handler)
, fs = require('fs')
app.listen(8090);
function handler (req, res) {
fs.readFile(__dirname + '/index.html',
function (err, data) {
if (err) {
res.writeHead(500);
@No9
No9 / gist:3184960
Created July 26, 2012 22:24
WebOS Emulator on Ubuntu 12.04 Notes

Getting WebOS up and running on Ubuntu 12.04

These notes are a direct copy from my open tabs and command line when I successfully got the emulator up and running. I may have missed something so please add your findings.

Install Python2.6

http://askubuntu.com/questions/125342/how-can-i-install-python-2-6-on-12-04

$ sudo add-apt-repository ppa:fkrull/deadsnakes
$ sudo apt-get update
@No9
No9 / gist:3217890
Created July 31, 2012 15:37
Google IO 2012 Breaking the JavaScript Speed Limit with V8
@No9
No9 / nodebuild
Created October 13, 2012 18:25
Checkout and build node on OpenIndiana
#!/usr/gnu/bin/sh
export CC=/usr/gnu/bin/gcc
cd ~/github/node
git reset --hard HEAD
git clean -f
git pull
#Make sure to change version
git checkout v0.8.11
./configure --with-dtrace
@No9
No9 / motor.js
Created October 24, 2012 21:31
Motor Shield Johnny-Five Sketch
var five = require("johnny-five"),
// or "./lib/johnny-five" when running from the source
board = new five.Board();
board.on("ready", function() {
var MOTOR1 = 12;
var MOTOR2 = 13;
var BREAK1 = 9;
var BREAK2 = 8;
var SPEEDPIN1 = 3;
@No9
No9 / NodeandOpenIndiana.md
Last active October 12, 2015 05:18
Install Openindiana and Node.js
layout title author
post
node.js & OpenIndiana
Anton Whalley

Introduction

At nearform we recommend Joyent to our customers for production deployment of projects. The default operating system we normally choose is SmartOS.

@No9
No9 / gist:3986224
Created October 31, 2012 10:05
Initial sketch for streaming to Firmata
var sys = require("sys");
var net = require("net");
var firmata = require("firmata");
var times = 0;
var client = net.connect( 4444, '192.168.1.37', function() {
var ledPin = 13;
var board = new firmata.Board(client, function(err){
if (err) {
console.log(err);
@No9
No9 / gist:4074070
Created November 14, 2012 19:08
Installing Erlang and CouchDb on OpenIndiana oi_151.1.7 X86
@No9
No9 / gist:4199784
Created December 4, 2012 01:45
Building Ardrone OS on Ubuntu 12.04