- Template name:
telegram.message
- Content:
{{ define "alert_list" }}{{ range . }}{{ range .Annotations.SortedPairs }}<strong>{{ .Name }}</strong>: {{ .Value }} {{ end }}<strong>value</strong>: {{ or .ValueString "[no data]" }} {{ range .Labels.SortedPairs }}<strong>{{ .Name }}</strong>: {{ .Value }} {{ end }}| {{ if gt (len .GeneratorURL) 0 }}<a href="{{ .GeneratorURL }}">source</a> | {{ end }}{{ if gt (len .DashboardURL) 0 }}<a href="{{ .DashboardURL }}">dashboard</a> | {{ end }}{{ if gt (len .SilenceURL) 0 }}<a href="{{ .SilenceURL }}">silence</a> | {{ end }}{{ if gt (len .PanelURL) 0 }}<a href="{{ .PanelURL }}">panel</a> |{{ end }} — {{ end }}{{ end }} {{ define "telegram.message" }}
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
/* | |
* ESP8266 Web server with Web Socket to control an LED. | |
* | |
* The web server keeps all clients' LED status up to date and any client may | |
* turn the LED on or off. | |
* | |
* For example, clientA connects and turns the LED on. This changes the word | |
* "LED" on the web page to the color red. When clientB connects, the word | |
* "LED" will be red since the server knows the LED is on. When clientB turns | |
* the LED off, the word LED changes color to black on clientA and clientB web |
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
//***************************************** | |
// NEC (Japanese) Infrared code sending library for the Arduino | |
// Send a standard NEC 4 byte protocol direct to an IR LED on the define pin | |
// Assumes an IR LED connected on I/O pin to ground, or equivalent driver. | |
// Tested on a Freetronics Eleven Uno compatible | |
// Written by David L. Jones www.eevblog.com | |
// Youtube video explaining this code: http://www.youtube.com/watch?v=BUvFGTxZBG8 | |
// License: Creative Commons CC BY | |
//***************************************** |
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
import serial | |
from time import sleep | |
gpsport = serial.Serial("/dev/ttyAMA0",bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=0, rtscts=0) | |
#gpsport.flush() | |
#sleep(5) | |
while True: | |
# sleep(.5) | |
# gpsport.flush() | |
raw = gpsport.readline() |
This is a guide how to install mosquitto on Ubuntu with websockets enabled.
It is more or less the same as explained in the article "Six Steps to install mosquitto 1.4.2 with websockets on debian whezy" http://www.xappsoftware.com/wordpress/2015/05/18/six-steps-to-install-mosquitto-1-4-2-with-websockets-on-debian-wheezy/comment-page-1/
Exceptions:
- mosquitto version 1.4.10 is used.