Skip to content

Instantly share code, notes, and snippets.

View njh's full-sized avatar

Nicholas Humfrey njh

View GitHub Profile
@njh
njh / _README.md
Last active October 5, 2019 12:06
Shell script to create a WebID certificate using OpenSSL
@njh
njh / mqtt-eventsource.rb
Created April 14, 2012 14:09
Subscribe to MQTT messages in browser using HTML5 Server-Sent Events
#!/usr/bin/env ruby
require 'rubygems'
require 'eventmachine'
require 'em-mqtt'
require 'sinatra/base'
require 'thin'
class WebApp < Sinatra::Base
@omsai
omsai / gist:2363047
Created April 11, 2012 22:01
Arduino UNO pulse counter
/*
Arduino UNO reads rising edge trigger pulses on pin 2 and displays counter on
Sparkfun SerLCD LCD-10097
Photo of setup: http://ompldr.org/vZGNlbA/photo.JPG
Pariksheet <[email protected]> Mar 2012
*/
@creationix
creationix / chatServer.js
Created November 19, 2010 20:47
A simple TCP based chat server written in node.js
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client