I want to rename Elephant, as there's already a company out there called 'Elephant Backup' and I'd like to avoid confusion.
It is done. Meet storelet
| irb(main):004:0> require 'json' | |
| => true | |
| irb(main):005:0> data = { "timestamp" => Time.new } | |
| => {"timestamp"=>2011-07-13 13:55:29 +0100} | |
| irb(main):006:0> json = data.to_json | |
| => "{\"timestamp\":\"2011-07-13 13:55:29 +0100\"}" | |
| irb(main):007:0> deserialised = JSON.parse json | |
| => {"timestamp"=>"2011-07-13 13:55:29 +0100"} | |
| irb(main):008:0> deserialised["timestamp"].class | |
| => String |
| /* | |
| * Jsgauge 0.4.1 | |
| * http://code.google.com/p/jsgauge/ | |
| * | |
| * Licensed under the MIT license: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * | |
| * Tweaked by Mark Embling (http://markembling.info/) to use requestAnimationFrame instead of setTimeout. | |
| */ | |
| /*jslint browser: true */ |
| 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" | |
| # 'git status' alias function | |
| function gs { | |
| git status $args | |
| } |
| cd path/to/project/public | |
| php -S localhost:8080 index.php |
| Copyright (c) 2012, Mark Embling | |
| All rights reserved. | |
| Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
| - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
| - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
| - Neither the name of Mark Embling nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
I want to rename Elephant, as there's already a company out there called 'Elephant Backup' and I'd like to avoid confusion.
It is done. Meet storelet
| import mosquitto | |
| client = mosquitto.Mosquitto("can-haz-msg") | |
| client.connect("mqtt.example.com") | |
| client.subscribe("my-topic") | |
| for msg in client.wait_for_next_message(): | |
| print msg.payload |
| mark@silicon:~$ sudo pip install blinkstick | |
| Downloading/unpacking blinkstick | |
| Downloading BlinkStick-0.7.0.tar.gz | |
| Running setup.py egg_info for package blinkstick | |
| Downloading/unpacking grapefruit==0.1a3 (from blinkstick) | |
| You are installing an externally hosted file. Future versions of pip will default to disallowing externally hosted files. | |
| You are installing a potentially insecure and unverifiable file. Future versions of pip will default to disallowing insecure files. | |
| Downloading grapefruit-0.1a3.tar.gz (194kB): 194kB downloaded | |
| Running setup.py egg_info for package grapefruit |
| using System; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Reflection; | |
| namespace ConsoleApplication1 { | |
| class Program { | |
| static void Main(string[] args) { | |
| Console.WriteLine("CLR"); | |
| Console.WriteLine(Environment.Version); |