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
/* | |
* Example how to serve files from an SD-card using Me No Dev's async webserver for the ESP8266. | |
* See https://github.com/me-no-dev/ESPAsyncWebServer | |
* | |
* Basically I copied the code for serving static files from SPIFFS and modified it for the SD library. | |
* To resolve conflicts between SPIFFS and SD File classes I had to include the sd namespace in SD.h and SD.cpp in packages/esp8266/hardware/esp8266/2.3.0/libraries/SD/src. | |
* So in SD.h put "namespace sd { ... }; using namespace sd;" around everything excluding the # preprocessor directives. | |
* And in SD.cpp put "namespace sd { ... };" around everything excluding the # preprocessor directives. | |
* | |
* Also, don't forget to fill in your WiFi SSID and password and put an index.htm file on your SD card. |
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
# This script work on any system using systemd as the init process. | |
# It works on Debian/Raspbian Jessie. | |
# If you have Debian/Rapbian Wheezy and want to use this script with systemd | |
# follow the information here : https://wiki.debian.org/systemd | |
# To easily download, install and set at startup: | |
# wget -O /tmp/download https://gist.github.com/Belphemur/3f6d3bf211b0e8a18d93/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/systemd/system/ && sudo systemctl --reload-daemon && sudo systemctl enable Node-RED | |
# To consult the log : journalctl -u Node-RED | |
[Unit] |
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
"""Google spreadsheet related. | |
Packages required: oauth2client, google-api-python-client | |
* https://gist.github.com/miohtama/f988a5a83a301dd27469 | |
""" | |
from oauth2client.service_account import ServiceAccountCredentials | |
from apiclient import discovery | |
def get_credentials(scopes: list) -> ServiceAccountCredentials: |
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
"use strict"; | |
/** | |
* Specification base class | |
* @class | |
*/ | |
var Specification = { | |
and: function(spec) { | |
return new AndSpecification(this, spec); | |
}, |
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 | |
# Install lets-chat, create two rooms, and a hubot that joins | |
# both of the rooms. Tested on an AWS EC2 instance using the Linux AMI. | |
# Pete Thomas <pete.thomas@gmail.com>, @peterthomas | |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |