Skip to content

Instantly share code, notes, and snippets.

View andypiper's full-sized avatar
🛠️
tinkering

Andy Piper andypiper

🛠️
tinkering
View GitHub Profile
@markembling
markembling / gist:1104836
Created July 25, 2011 18:42
A small ruby script which basically spams an MQTT broker.
require 'mqtt/client'
mqtt = MQTT::Client.new('10.25.2.4')
loop do
mqtt.connect do |c|
c.publish('test/foo/bar','this is a test message #{Time.now}')
puts "published a msg"
@karlp
karlp / _etc_init.d_mosquitto
Created August 25, 2011 14:02
using daemon to make a respawning mosquitto server
#! /bin/bash
# Based on /etc/init.d/sshd as it came on CentOS 5.6:
#
# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
#
# Author: Jiri Smid <[email protected]>
# /etc/init.d/mosquitto
#
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@davist11
davist11 / gist:1204569
Last active July 1, 2024 02:51
Campfire sounds
56k: "https://123.campfirenow.com/images/56k.gif"
bell: ":bell:"
bezos: ":laughing::thought_balloon:"
bueller: "anyone?"
butts: ":open_hands: :smoking:"
clowntown: "https://123.campfirenow.com/images/clowntown.gif"
cottoneyejoe: ":notes::hear_no_evil::notes:"
crickets: "hears crickets chirping"
dadgummit: "dad gummit!! :fishing_pole_and_fish:"
dangerzone: "https://123.campfirenow.com/images/dangerzone.png"
@glejeune
glejeune / READLE.md
Created November 12, 2011 20:43
A (very) simple chat service using MQTT

Run

  1. Install and run an MQTT server (mosquitto is a good choise)

  2. Install mqtt and ncurses-ruby gems

    sudo gem install ruby-mqtt ncurses-ruby

  3. Run the client

ruby ./mqtt-chat.rb

anonymous
anonymous / Nanode_Tiny_Bas_Temp
Created December 26, 2011 10:21
Nanode Tiny Basic with temperature sensing by @ceejay
// TinyBASIC.cpp : An implementation of TinyBASIC in C
//
// Author : Mike Field - [email protected]
//
// Based on TinyBasic for 68000, by Gordon Brandly
// (see http://members.shaw.ca/gbrandly/68ktinyb.html)
//
// which itself was Derived from Palo Alto Tiny BASIC as
// published in the May 1976 issue of Dr. Dobb's Journal.
//
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@mcollina
mcollina / LICENSE
Created January 30, 2012 14:04
NetworkButton MQTT Example
Copyright (c) 2008-2012 Nicholas O'Leary
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
anonymous
anonymous / rainbow_serial.pde
Created February 4, 2012 23:01
File to drive Rainbowduino from simple serial interface
/*
Rainbowduino v3.0 Library examples:
Sets pixels on 2D plane (8x8 matrix)
*/
#include <Rainbowduino.h>
uint32_t colorRGB[13] = {0xFFFFFF,0x000000,0xFFFFFF,0x000,0xFF0000,0x00FF00,0x0000FF,0xFF0000,0x00FF00,0x0000FF,0xFF0000,0x00FF00,0x0000FF };
@p15martin
p15martin / client.js
Created February 8, 2012 02:56
Service discovery
var mqtt = require('mqttjs');
var mdns = require('mdns');
var topic = "my.data";
var connectedClient = null;
discoverService();
startMessageLoop();