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
#include <PubSubClient.h> | |
#include <ESP8266WiFi.h> | |
const char* ssid = "................."; | |
const char* password = "................"; | |
char* topic = "esp8266_arduino_out"; | |
char* server = "iot.eclipse.org"; | |
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 | |
# | |
# Based on https://github.com/Supervisor/superlance/blob/master/superlance/crashmail.py | |
# | |
# A event listener meant to be subscribed to PROCESS_STATE_CHANGE | |
# events. It will publish an MQTT message when processes that are children of | |
# supervisord transition unexpectedly to the EXITED state. | |
# A supervisor config snippet that tells supervisor to use this script | |
# as a listener is below. |
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> | |
<html> | |
<head> | |
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> |
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
# Automatically instal the latest nginx | |
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
#Make a backup copy of your current sources.list file | |
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
#Now copy the following repositories to the end of ` /etc/apt/sources.list` | |
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list | |
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list |
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 urllib, json | |
class SABnzbd(object): | |
""" | |
Usage: | |
>>> from sabnzbd import SABnzbd | |
>>> s = SABnzbd('sakar.local', 8080, '4488f2881b90d7753bef8fb9e1bc56b3') | |
>>> s.pause() # Pauses the downloads | |
>>> s.shutdown() # Shut's down SABnzbd+ | |
""" |