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
#!/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 |
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 | |
URL=$1 | |
WORKDIR=/tmp | |
# puff.py helper location | |
PUFF=/usr/local/bin/puff.py | |
ID=`youtube-dl --get-id $URL` |
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
#!/usr/bin/env python | |
from datetime import timedelta, tzinfo | |
from dateutil import tz | |
from shlex import split | |
from subprocess import Popen, PIPE | |
import os | |
import plistlib | |
NOT_ENABLED = u'Not enabled.' |
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 |
OlderNewer