This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>frame</title> | |
</head> | |
<body> | |
<div id="test"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function(scope) { | |
scope.name = "Here I am!!!"; | |
/* scope.fun = function(val){alert(val);return val}; */ | |
scope.$watch('msg.payload', function(newValue, oldValue) { | |
/* Do something clever here */ | |
if(!angular.equals(newValue, oldValue)){ | |
alert(newValue); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var playSound = (function beep() { | |
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxYBYYZdifkU |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"a280b0ca.203e2","type":"ui_template","z":"78b2e9d1.c8c848","tab":"635f39f2.c5f958","name":"","group":"","order":1,"format":"<pre>--{{msg.payload}}--{{msg.sender}}--</pre><br>\nv1:{{v1}}<br>\nv2:{{v2}}<br>\nv3:{{v3}}<br>\n<script>\n(function(scope) {\n scope.v1=\"\";\n scope.v2=\"\";\n scope.v3=\"\";\n scope.$watch('msg.sender', function(newValue, oldValue) {\n if((this.msg===undefined)||(this.msg===null)){console.log(\"msg not defined\");return;}\n switch(this.msg.sender.substr(0,1)){\n case \"1\":\n this.v1=this.msg.payload;\n break;\n case \"2\":\n this.v2=this.msg.payload;\n break;\n case \"3\":\n this.v3=this.msg.payload;\n break;\n default:\n console.log(\"not existing case:\"+this.msg.sender);\n }\n }.bind(scope));\n})(scope);\n</script>","storeOutMessages":true,"fwdInMessages":true,"x":695,"y":204,"wires":[[]]},{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original work from http://www.clearlyandsimply.com/clearly_and_simply/2014/05/marimekko-charts-in-microsoft-excel.html | |
https://github.com/gbrault/gistfiles/blob/master/marimekko_template%20Vertical.xlsm | |
Transfomed work (see excel file marimekko_template - Horizontal Final): | |
https://github.com/gbrault/gistfiles/blob/master/marimekko_template%20-%20Horizontal%20Final.xlsm | |
look clearly and simply post for usage | |
Changes: | |
- Totals (rows, cols) and Competitors suppressed from initial schema | |
- Rows becomes Columns (Horizontal Marimekko) | |
- Cell A1 of "Colors" sheet is the thresold % to hide names | |
- names displayed instead of values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Make sure you have removed all global instances of node-red and dashboard on the developement machine | |
2. In a shell session (shell_1), create a directory to install node-red | |
3. cd this dir (node-red) | |
4. npm init | |
5. npm i node-red | |
6. cd node_modules/node-red | |
7. npm start | |
8. stop => the .node-red directory in <user> default directory should then be created | |
9. In a new shell (shell_2): cd <user>/.node-red/node_modules | |
10. git clone https://github.com/node-red/node-red-dashboard.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node-Red is a great piece of work but lake three key features: | |
* A file browser and editor | |
* A remote console | |
* An SQL manager for Sqlite | |
To extend Node-RED, three piece of software of interest | |
* ShellInABox: [see](https://github.com/shellinabox/shellinabox) a very nice https Linux console | |
* CloudCmd: [see](https://github.com/coderaiser/cloudcmd) a file and editor browser with a console as well (but less conformant than ShellInAbox) | |
* nrsqljs: [see](https://github.com/gbrault/nrsqljs) an SQL manager to browse and edit database tables for sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sqlite3=require('sqlite3'); | |
var pgu={ | |
db: {}, | |
res: {}, | |
all: function (topic,bind=[]){ | |
this.db.all(topic, bind, function(err, row) { | |
if (err) { console.log(err,msg); return null;} | |
else { | |
this.res=row; | |
console.log(JSON.stringify(this.res)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "1e5321cd.1e8eee", | |
"type": "debug", | |
"z": "165dee9e.7db461", | |
"name": "", | |
"active": false, | |
"console": "false", | |
"complete": "true", | |
"x": 567.5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"b84481db.dc536","type":"ui_template","z":"9a1b4d5d.5c1f8","group":"1b2ddeac.a9d561","name":"File Browser & Editor","order":0,"width":"27","height":"15","format":"<iframe id=\"cloudcmd\" seamless width=\"100%\" height=\"100%\"></iframe>\n<script>\n(function(scope) {\n // debugger;\n window.ifr = document.getElementById(\"cloudcmd\");\n window.ifr.src=\"http://\"+window.location.hostname+\"/cldcmd\";\n})(scope);\n</script>","storeOutMessages":true,"fwdInMessages":true,"x":528,"y":218,"wires":[[]]},{"id":"1b2ddeac.a9d561","type":"ui_group","z":"","name":"Console","tab":"ed7c4d56.dbdb2","disp":false,"width":"27"},{"id":"ed7c4d56.dbdb2","type":"ui_tab","z":"","name":"File Browser","icon":"dashboard","order":4}] |
OlderNewer