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 / VCTargetsPath.reg
Last active December 15, 2015 06:59
Reg file that cured error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. VCTargetsPath.reg is all that should be required
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\4.0]
"VCTargetsPath"="$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\"
@No9
No9 / config.gypi
Created March 15, 2013 14:07
Openindiana demangled dtrace output after running node build with a manually Steps to reproduce: 1. git clone git://github.com/joyent/node.git 2. cd node 3. ./configure 4. Change host_arch and target_arch to 'x64' in config.gypi 5 make 6 npm install -g stackvis 7. Run a node process 8. sudo dtrace -n 'profile-97/execname == "node" && arg1/{ @[js…
# Do not edit. Generated by the configure script.
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'clang': 0,
'gcc_version': 46,
'host_arch': 'x64',
'node_install_npm': 'true',
@No9
No9 / report.json
Last active December 13, 2015 17:08
Some sample code for parsing a report file
{
"typename" : "header",
"mode":"client",
"peer":"9a6cfdf0-6bab-11e2-8648-fd224dae7ee4",
"timestamp":1359640016194,
"data":
{
"typename" : "summary",
"downloaded":909115392,
"downloadRate":2864163.073936958,
@No9
No9 / Senecabus.js
Last active December 12, 2015 10:38
var seneca = require('seneca')()
seneca.add( {cmd:'sales-tax'}, function(args){
var rate = 0.23
var total = args.net * (1+rate)
seneca.act({cmd:'tax-total'}, {total:total})
})
seneca.add( {cmd:'tax-total'}, function(args){
try{
@No9
No9 / gist:4199784
Created December 4, 2012 01:45
Building Ardrone OS on Ubuntu 12.04
@No9
No9 / gist:4074070
Created November 14, 2012 19:08
Installing Erlang and CouchDb on OpenIndiana oi_151.1.7 X86
@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 / 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 / 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 / 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