Skip to content

Instantly share code, notes, and snippets.

View ghtomcat's full-sized avatar

Markus Leutwyler ghtomcat

View GitHub Profile
@ghtomcat
ghtomcat / gist:2036528
Created March 14, 2012 13:36
How to call the Compass API in Phonegap webOS
function displayCurrentHeading() {
function successful(response) {
navigator.notification.showBanner('current heading: '+response);
}
var request=navigator.compass.getCurrentHeading(successful,{});
}
@ghtomcat
ghtomcat / socket_server.js
Created July 17, 2012 12:40
node.js server for EnyoSlides
var io = require('socket.io').listen(8080);
console.log("listening on port 8080");
// Socket Routes
io.sockets.on('connection', function (socket) {
socket.on('setPresenter', function(){
socket.set('presenter', true, function(){
socket.emit('ready');

Keybase proof

I hereby claim:

  • I am ghtomcat on github.
  • I am tomcat (https://keybase.io/tomcat) on keybase.
  • I have a public key whose fingerprint is 2404 8BCA F621 B221 3133 1A31 4C20 3603 2500 234E

To claim this, I am signing this object:

var five = require('johnny-five');
var keypress = require('keypress');
var board = new five.Board();
board.on('ready', function() {
console.log('Welcome to Sumobot!');
console.log('Control the bot with the arrow keys, and SPACE to stop.');
var five = require('johnny-five');
var keypress = require('keypress');
var board = new five.Board({port:"/dev/tty/AdafruitEZ-Link6b34-SPP"});
board.on('ready', function() {
console.log('Welcome to Sumobot!');
console.log('Control the bot with the arrow keys, and SPACE to stop.');
var servoL = new five.Servo.Continuous(9);
var five = require('johnny-five');
var keypress = require('keypress');
var board = new five.Board();
board.on('ready', function() {
console.log('Welcome to Sumobot!');
console.log('Control the bot with the arrow keys, and SPACE to stop.');
var EtherPortClient = require("etherport-client").EtherPortClient;
var keypress = require('keypress');
var five = require("johnny-five");
var EtherPortClient = require("etherport-client").EtherPortClient;
var board = new five.Board({
port: new EtherPortClient({
host: "192.168.192.7",
port: 3030
}),
var keypress = require('keypress');
var five = require("johnny-five");
var EtherPortClient = require("etherport-client").EtherPortClient;
var board = new five.Board({
port: new EtherPortClient({
host: "192.168.1.235",
port: 3030
}),
var keypress = require('keypress');
var five = require("johnny-five");
var EtherPortClient = require("etherport-client").EtherPortClient;
var board = new five.Board({
port: new EtherPortClient({
host: "xx.xx.xx.xx",
port: 3030
}),
var keypress = require('keypress');
var five = require("johnny-five");
var EtherPortClient = require("etherport-client").EtherPortClient;
var board = new five.Board({
port: new EtherPortClient({
host: "xx.xx.xx.xx",
port: 3030
}),