Skip to content

Instantly share code, notes, and snippets.

View bergie's full-sized avatar

Henri Bergius bergie

View GitHub Profile
@bergie
bergie / noflo.json
Created September 28, 2013 12:12
AR.Drone control UI
{
"properties": {
"environment": {
"runtime": "html",
"src": "./preview/iframe.html",
"width": "300",
"height": "340",
"content": " <div style=\"position: relative; margin-top: 20px;\">\n <button style=\"padding: 2%\" id=\"takeoff\">Take off</button>\n <button style=\"padding: 2%\" id=\"land\">Land</button>\n <button style=\"padding: 2%; background-color: red\" id=\"stop\">Panic!!</button>\n <div>\n <button style=\"padding: 2%\" id=\"up\">Up</button>\n <button style=\"padding: 2%\" id=\"down\">Down</button>\n </div>\n <div>\n <button style=\"padding: 2%\" id=\"couterclockwise\">Couter Clockwise</button>\n <button style=\"padding: 2%\" id=\"clocwise\">Clockwise</button>\n </div>\n <div>\n <button style=\"padding: 2%; margin-left:4%\" id=\"forward\">\t&uarr;</button>\n <div>\n <button style=\"padding: 2%\" id=\"left\"> &larr;</button>\n <button style=\"padding: 2%\" id=\"rig
@bergie
bergie / noflo.json
Last active December 24, 2015 02:59
AR.Drone battery gauge
{
"properties": {
"environment": {
"runtime": "html",
"src": "./preview/iframe.html",
"width": 300,
"height": 300,
"content": "<style>body { width: 100%; background-image:url(https://raw.github.com/cannonerd/flowDrone/master/gauges/core/app/asset/img/bg.jpg); overflow: hidden; } .gaugeframebg, .compassWrapper, .compassrotator, .compasscenter, .centerstatic, .attitudeWrapper, .attitudemoving, .attitudestaticouter, .attitudestatic, .speedometerWrapper, .speedometerstaticbg, .speedometerpointer, .altitudeWrapper,.altitudedisk, .altitudetaticbg, .altitudepointershort, .altitudepointerlong, .batteryWrapper, .batterystaticbg, .batterypointer { position: absolute; top:0; left:0; width: 100%; }</style><div class='batteryWrapper'><img class='gaugeframebg' src='https://raw.github.com/cannonerd/flowDrone/master/gauges/core/app/asset/img/frame/instrumentframe-without-screws.png' alt='gaugeframebg'><img class='batterystaticbg' src='https://raw.github.
@bergie
bergie / noflo.json
Created September 27, 2013 17:49
AR.Drone Socket Server
{
"properties": {
"environment": {
"runtime": "websocket"
},
"name": "AR.Drone server"
},
"exports": [],
"processes": {
"ServeRequests_lkzpi": {
@bergie
bergie / noflo.json
Last active December 23, 2015 08:29
NoFlo clock demo
{
"properties": {
"name": "Clock Example",
"environment": {
"type": "noflo-browser",
"content": "<div class='area' title='.area'><img id='clock' src='http://i.meemoo.me/v1/in/GJPUFPc8ThuRp9itdXC9_clock-face.png' style='position:absolute; width:300px; height:300px;' /><img id='hours' src='http://i.meemoo.me/v1/in/fRL213GT1uCRltIqXkK2_clock-hours.png' style='position:absolute; top:50px; left:130px; height:200px;' /><img id='minutes' src='http://i.meemoo.me/v1/in/23DZFKYoRTOIAjPA7sed_clock-minutes.png' style='position:absolute; top:0; left:140px; height:300px;' /><img id='seconds' src='http://i.meemoo.me/v1/in/VU2HqPmuTqucRpnUGGBj_clock-seconds.png' style='position:absolute; top:0; left:145px; height:300px;' /></div>",
"width": 300,
"height": 300
}
},
@bergie
bergie / README.md
Last active February 15, 2022 04:38
Backbone.js infinite loading slots

Simple infinite scrolling slots example

@bergie
bergie / router.js
Created December 20, 2012 15:31
Collections handling example with Backbone
var router = Backbone.Router.extend({
initialize: function (options) {
this.collections = [];
},
routes: {
'new': 'newColl',
'show/:id': 'showColl'
},
@bergie
bergie / README.md
Created December 18, 2012 08:19
VIE and Backbone.js example

VIE and Backbone.js example

@bergie
bergie / buildfilename.fbp
Created July 13, 2012 16:35
JSON-LD to Jekyll converter with NoFlo
# We need to process the date into suitable for filename
'dc:date' -> KEY GetDate(GetObjectKey)
'10' -> LIMIT CleanDate(SubStr)
Split(Split) OUT -> IN GetDate() OUT -> IN CleanDate()
# We also need the URL name for the filename
'dc:name' -> KEY GetName(GetObjectKey)
Split() OUT -> IN GetName()
# And finally we need the format
@bergie
bergie / README.md
Created May 30, 2012 12:47
Backbone.js Collection View example

This is an example of using a Collection view with Backbone.

@bergie
bergie / README.md
Created February 14, 2012 13:55
MQTT pub/sub example

This is a simple example of the MQTT protocol with Node.js. The client code has also been tested with a combination of C++ servers and clients.