Skip to content

Instantly share code, notes, and snippets.

pi@raspberrypi ~/bluez-5.11 $ cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by bluez configure 5.11, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --disable-systemd
## --------- ##
var wpi = require('./build/Release/wiringPi');
wpi.wiringPiSetup();
var colour = [255, 255, 0];
var pins = [0, 2, 3 ];
pins.forEach(createPwmPin);
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@andrewn
andrewn / discovery-install.md
Last active August 29, 2015 14:04
Discovery instructions

Install

Server and app

  1. Clone the radiodan server and example applications:

     $ git clone https://github.com/radiodan/radiodan.js
     $ git clone https://github.com/radiodan/client-web-example
    
  2. Run npm install in both directories.

@andrewn
andrewn / cpa-ui-flow.py
Created July 28, 2014 11:29
CPA UI flow with a PiFace
import pifacecad
import string
# Create object
cad = pifacecad.PiFaceCAD()
cad.lcd.backlight_on()
# Config
code_length = 8
characters = list(string.digits + string.ascii_lowercase)
@andrewn
andrewn / xhr.js
Last active August 29, 2015 14:05
XHR with Promise
var xhr = (function () {
'use strict';
// xhr.get(), xhr.post() convenience methods
['get', 'post', 'put', 'delete'].forEach(function (method) {
request[method] = requestWithMethod(method);
});
function requestWithMethod(method) {
return function (url, params) {
@andrewn
andrewn / mediascape-instructions.md
Last active August 29, 2015 14:06
Mediascape Remote Control Radio instructions

Mediascape Remote Control Radio

Install correct radiodan software

Either provision a radiodan from scratch using:

https://github.com/radiodan/provision

If you already have a provisioned radiodan, run the following commands to update the software:

// Turn LED straight on, no transition
powerLED.change({
colour: [255, 255, 255]
});
rgb.on()
rgb.colour([255, 255, 255])
rgb.off()
// Fade LED on rather than just
console.log('hello');
var faye = require('faye');
var fs = require('fs');
var spawn = require('child_process').spawn;
var exec = require('child_process').exec;
var path = require('path');
var Promise = require('es6-promise').Promise;