Instantly share code, notes, and snippets.

View serial_split.py
from __future__ import print_function
import serial
# This script is intended to redirect a specially demarcated section
# of the serial stream to STDERR, which you can then redirect to
# wherever you wish (like a text file for importing into Excel).
# host usage:
# python serial_split.py 2> mydata.txt
View main.js
"use strict";
var Hapi = require('hapi');
var Joi = require('joi');
var database = require('./database');
exports.init = function (startListening, doneCallback) {
var server = Hapi.createServer(nconf.get('listenIp'), nconf.get('port'), {
cors: {
origin: [
View eCompass.ino
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_LSM303_U.h>
#include <orientation.h>
// For the fabs function in fixedWidthPrint
#include <Math.h>
/* Assign a unique ID to this sensor at the same time */
Adafruit_LSM303_Accel_Unified accl = Adafruit_LSM303_Accel_Unified(54321);