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
Last active October 1, 2020 07:21 — forked from forresto/noflo.json
Webcam to palette
{
"caseSensitive": false,
"properties": {
"name": "main",
"environment": {
"type": "noflo-browser",
"content": "<video id=\"video\" autoplay loop style=\"max-width:100%;\"></video><br>\n<canvas id=\"colors\" width=\"640\" height=\"100\" style=\"max-width:100%;\"></canvas>\n<button id=\"start\">start camera</button>\n<p id=\"message\"></p>"
},
"icon": "cog"
},
@bergie
bergie / noflo.json
Last active August 18, 2018 22:13
Draggable demo
{
"caseSensitive": false,
"properties": {
"name": "Movable image",
"environment": {
"type": "noflo-browser",
"content": "<style>\n.area {\n width: 100%;\n height: 300px;\n user-select: none;\n}\n.draggable {\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n -khtml-user-drag: element;\n -webkit-user-drag: element;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n width: 40px;\n height: 40px;\n border-radius: 20px;\n background-color:hsl(220,20%,20%);\n box-shadow: \n 0 -1px 0px hsl(220,100%,100%),\n 0 1px 1px hsla(220,20%,0%,.2),\n 0 3px 8px hsla(220,20%,0%,.1);\n}\n.draggable:active {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n</style>\n\n<div class=\"area\">\n <img class=\"draggable\" src=\"https://meemoo.org/hack-our-apps/shots/recursive.png\" draggable=\"true\">\n</div>"
},
"icon": ""
},
@bergie
bergie / noflo.json
Created October 23, 2017 17:52
React ToDo Example
{
"caseSensitive": false,
"properties": {
"name": "ReactTodoExample",
"environment": {
"type": "noflo-browser"
}
},
"inports": {},
"outports": {},
@bergie
bergie / noflo.json
Last active October 23, 2017 17:36 — forked from forresto/noflo.json
NoFlo clock example
{
"properties": {
"environment": {
"type": "noflo-browser",
"content": "<div class='area' title='.area'>\n <img id='clock' src='https://i.imgur.com/0S7R8OU.png' style='position:absolute; width:300px; height:300px; top:0; left:0;' />\n <img id='hours' src='https://i.imgur.com/Fw8L3L1.png' style='position:absolute; top:50px; left:130px; height:200px;' />\n <img id='minutes' src='https://i.imgur.com/WtSz99Q.png' style='position:absolute; top:0; left:140px; height:300px;' />\n <img id='seconds' src='https://i.imgur.com/m2PQs6E.png' style='position:absolute; top:0; left:145px; height:300px;' />\n</div>"
},
"name": "Clock"
},
"exports": [],
"processes": {
@bergie
bergie / noflo.json
Last active October 23, 2017 17:12 — forked from automata/noflo.json
Canvas pattern
{
"caseSensitive": false,
"properties": {
"name": "Hello Canvas!",
"environment": {
"type": "noflo-browser",
"content": "<canvas id=\"mycanvas\" width=\"200\" height=\"200\"></canvas>\n<br />\n<button id=\"mybutton\">Generate</button>"
}
},
"inports": {},
@bergie
bergie / noflo.json
Last active August 14, 2018 04:09 — forked from automata/noflo.json
Web Audio Theremin
{
"caseSensitive": false,
"properties": {
"name": "ASM2",
"environment": {
"type": "noflo-browser",
"content": "<canvas id=\"canvas\" width=\"200\" height=\"200\"></canvas>"
},
"description": "WebAssembly Theremin",
"icon": "soundcloud"
@bergie
bergie / README.md
Last active March 6, 2024 05:42
Arduino CLI with ESP8266
  • Install Arduino IDE to /opt/arduino
  • Install PubSubClient and MsgFlo
  • Edit /opt/arduino/libraries/PubSubClient/src/PubSubClient.h and set a bigger buffer size (for example 512)
  • Add ESP8266 board URL:
/opt/arduino/arduino --pref "boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs
  • Install board package
@bergie
bergie / noflo.json
Last active March 28, 2018 17:20
Simple click counter
{
"caseSensitive": false,
"properties": {
"name": "main",
"environment": {
"type": "noflo-browser",
"content": ""
},
"description": "Click counter",
"icon": ""

Keybase proof

I hereby claim:

  • I am bergie on github.
  • I am bergie (https://keybase.io/bergie) on keybase.
  • I have a public key ASDzQtuzxNISbOvbYyPUu_7D8A9A6SCu6Uo7kznIF0FsTAo

To claim this, I am signing this object:

@bergie
bergie / fbp.json
Created March 17, 2016 19:41
fbp.json for noflo-image
{
"version": 1,
"modules": [
{
"name": "image",
"description": "Image processing utilities for browser and Node.js NoFlo.",
"runtime": "noflo",
"base": "",
"components": [
{