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
UPSNAME UNIFIUPS | |
UPSCABLE usb | |
UPSTYPE usb | |
DEVICE | |
LOCKFILE /tmp | |
SCRIPTDIR /etc/apcupsd | |
PWRFAILDIR /etc/apcupsd | |
NOLOGINDIR /etc | |
ONBATTERYDELAY 6 | |
BATTERYLEVEL 5 |
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 <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
#define _IS_MY_HOME | |
// wifi | |
#ifdef _IS_MY_HOME | |
#include "/usr/local/src/ap_setting.h" | |
#else | |
#include "ap_setting.h" | |
#endif |
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 <IRremoteESP8266.h> | |
//#include <IRremote.h> | |
int RECV_PIN = 14; | |
IRrecv irrecv(RECV_PIN); | |
void setup ( ) | |
{ | |
Serial.begin(115200); | |
irrecv.enableIRIn(); |
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
# bitcoin.py | |
# | |
# I, the copyright holder of this work, hereby release it into the public | |
# domain. This applies worldwide. | |
# | |
# If this is not legally possible: | |
# I grant any entity the right to use this work for any purpose, without any | |
# conditions, unless such conditions are required by law. | |
from tools import * |
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
# /etc/init/nginx.conf - add this below the "respawn" line (line 7) | |
limit nofile 50000 50000 | |
# /etc/sysctl.conf - add this to the bottom of the file | |
fs.file-max = 50000 | |
net.core.somaxconn = 65536 | |
net.ipv4.tcp_max_tw_buckets = 1440000 | |
# /etc/security/limits.conf - add this to the bottom of the file | |
www-data soft nofile 50000 |
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/python | |
import subprocess | |
import os | |
import simplejson | |
import datetime | |
import sys | |
import math | |
import re | |
from time import time |
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
// http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/ | |
// http://www.analysir.com/blog/wp-content/uploads/2014/03/Arduino_Record_Long_AirConditioner_Infrared_Signals_10.txt | |
// For LG AC | |
/* | |
Author: AnalysIR | |
Revision: 1.0 | |
This code is provided to overcome an issue with Arduino IR libraries | |
It allows you to capture raw timings for signals longer than 255 marks & spaces. |
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
$('#container').highcharts({ | |
chart: { | |
alignTicks: true, // When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks. | |
animation: true, // Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here. | |
backgroundColor: '#FFF', // The background color or gradient for the outer chart area. | |
borderColor: '#4572A7', // The color of the outer chart border. | |
borderRadius: 5, // The corner radius of the outer chart border. In export, the radius defaults to 0. Defaults to 5. | |
borderWidth: 0, // The pixel width of the outer chart border. | |
className: null, // A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart. | |
defaultSeriesType: 'line', // Alias of type. |
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 is an example of how to send data to Slack webhooks in Python with the | |
requests module. | |
Detailed documentation of Slack Incoming Webhooks: | |
https://api.slack.com/incoming-webhooks | |
''' | |
import json | |
import requests |
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 sketch sends ads1115 current sensor data via HTTP POST request to thingspeak server. | |
* It needs the following libraries to work (besides the esp8266 standard libraries supplied with the IDE): | |
* | |
* - https://github.com/adafruit/Adafruit_ADS1X15 | |
* | |
* designed to run directly on esp8266-01 module, to where it can be uploaded using this marvelous piece of software: | |
* | |
* https://github.com/esp8266/Arduino | |
* |