tstamp = Math.floor(Date.parse(iso-8601-tstamp)/1000);
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
javascript:x=document.getElementsByTagName(%22A%22); | |
y=window.open(); | |
y.document.write(%22<HTML><HEAD></HEAD><BODY><table>%22); | |
for(n=0;n<x.length;n++){ | |
y.document.write(%22<tr><td>%22+x[n].href+%22</td></tr>%22); | |
} | |
y.document.write(%22</table></BODY></HTML>%22); | |
y.document.close(); | |
void 0; |
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
#! /bin/sh | |
# Starts and stops node-red | |
# /etc/init.d/node_red | |
### BEGIN INIT INFO | |
# Provides: node_red | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Node Red |
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
#!/bin/bash | |
# | |
# This starts and stops shairport | |
# | |
### BEGIN INIT INFO | |
# Provides: sonos-airplay | |
# Required-Start: $network | |
# Required-Stop: | |
# Short-Description: Sonos Airplay Bridge | |
# Description: Sonos Airplay Bridge |
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
#!/bin/sh [0/329] | |
# takes warning and critical percentage as $1 and $2 parameters | |
# if not specified defaults to 95% and 97% respectivley | |
STATUS_CRITICAL=1 | |
STATUS_WARNING=2 | |
STATUS_OK=0 | |
WARNING_LEVEL=${1:-95} |
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":"1f8dc6c2.cba389","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":"nodered-1"},{"id":"fb5bdbec.60523","type":"mqtt out","name":"","topic":"","broker":"1f8dc6c2.cba389","x":1010.25,"y":158,"z":"f1e02243.ca166","wires":[]},{"id":"fd3d9542.f0877","type":"inject","name":"\"print power.percent\" Command Example","topic":"","payload":"{\"troop\": \"1\", \"scout\": \"1\", \"topic\": \"result\", \"command\": \"print power.percent\"}","payloadType":"string","repeat":"","crontab":"","once":false,"x":200.5,"y":227.5,"z":"f1e02243.ca166","wires":[["1e34db31.3aea5d"]]},{"id":"b16c8037.41ae8","type":"http request","name":"REST POST","method":"POST","url":"","x":620,"y":158.25,"z":"f1e02243.ca166","wires":[["898e121d.69f8d","cab5ea3b.2ee23"]]},{"id":"898e121d.69f8d","type":"function","name":"Prepare Output","func":"data = JSON.parse(msg.payload);\n\nreading = { payload: data.data.reply.trim() , topic: msg.topic, retain: 1 };\ntstamp = { payload: data.data._t, topic: msg.topic + \"/tstamp\", retain |
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: node-red | |
# Required-Start: $local_fs $remote_fs $network | |
# Required-Stop: $local_fs $remote_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start or stop the node-red server | |
### END INIT INFO | |
# Can be downloaded and installed in one go by using this command |
I hereby claim:
- I am juzam on github.
- I am gangoli (https://keybase.io/gangoli) on keybase.
- I have a public key whose fingerprint is 8103 AC90 94B8 BDEA BAC3 298D 0255 DFFC 6D1F 1B40
To claim this, I am signing this object:
Simple mqtt-launcher setup.
install python and paho-mqtt (pip install paho-mqtt) in your cygwin environment. dowload the blinkstick debug client and unzip it in your desired directory (/usr/local/bin in the example)
the topic structure in the example is this:
blinkstick/serialn/pixelindex
where serialn is the serial number of your blinkstick device.
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
#!/bin/bash | |
# reduntant check since in cygwin both options works the same way | |
if [ $OS = "cygwin" ]; then | |
BLINK1TOOL=/usr/local/bin/blink1-tool.exe | |
else | |
BLINK1TOOL=/usr/local/bin/blink1-tool | |
fi | |
# colour mapping |
OlderNewer