This file contains hidden or 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
| version: '2' | |
| services: | |
| nodered1: | |
| depends_on: | |
| - mosquitto | |
| image: nodered/node-red-docker:0.17.5 | |
| ports: | |
| - "1884:1880" | |
| restart: always |
This file contains hidden or 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 midiTypes = { | |
| '8': 'noteoff', | |
| '9': 'noteon', | |
| '10': 'polyat', | |
| '11': 'controlchange', | |
| '12': 'programchange', | |
| '13': 'channelat', | |
| '14': 'pitchbend' | |
| }; |
This file contains hidden or 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": "f1ffeb7e.f6451", | |
| "type": "http in", | |
| "z": "c29865fe.249648", | |
| "name": "", | |
| "url": "/upload", | |
| "method": "get", | |
| "upload": false, | |
| "swaggerDoc": "", |
This file contains hidden or 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 osc = global.get('osc'); | |
| var clock = global.get('sincewhen'); | |
| var result; | |
| if (msg.hasOwnProperty('freq')) { | |
| context.freq = msg.freq; | |
| return; | |
| } | |
| if (msg.wave) { |
This file contains hidden or 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
| function ramp() { | |
| if (to > from) { | |
| if (context.count >= to) { | |
| clearInterval(context.rampInterval); | |
| context.rampInterval = null; | |
| context.count = from - 1; | |
| return; | |
| } | |
| context.count = context.count += 1; |
This file contains hidden or 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": "40050c8a.de271c", | |
| "type": "inject", | |
| "z": "a68c389e.596268", | |
| "name": "Vert", | |
| "topic": "press", | |
| "payload": "<i class=\"fa fa-circle fa-2x nr-dashboard-ok\"></i>", | |
| "payloadType": "str", | |
| "repeat": "", |
This file contains hidden or 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
| setInterval(() => { | |
| msg.payload = msg.payload == 'BLUE' ? 'RED' : 'BLUE'; | |
| node.send(msg); | |
| }, 1000); |
This file contains hidden or 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
| set -g prefix C-a | |
| # bind 'C-a C-a' to type 'C-a' | |
| bind C-a send-prefix | |
| unbind C-b | |
| # bind key for synchronizing panes | |
| bind-key S set-window-option synchronize-panes | |
| set -g mouse on |
This file contains hidden or 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
| cd /home/pi/source/2015_chandler/node-red | |
| sudo pm2 stop node-red | |
| npm install | |
| sudo pm2 start node-red |
This file contains hidden or 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": "dc8fd660.237028", | |
| "type": "websocket-listener", | |
| "z": "c5b2c450.3a4d38", | |
| "path": "/calendar", | |
| "wholemsg": "false" | |
| }, | |
| { | |
| "id": "cb2fc39d.34d04", |