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 | |
## you'll have to do a couple extra steps to get this running | |
## there are probably other ways to handle svncanboot, but this is from the linux forum | |
set -e | |
if | |
touch /etc/_testr_file | |
then |
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 <SPI.h> | |
#include "nRF24L01.h" | |
#include "RF24.h" | |
int senderId; | |
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10 | |
//Contacts from the radio to connect NRF24L01 pinamnam -> Arduino |
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 <SPI.h> | |
#include <nRF24L01.h> | |
#include <RF24.h> | |
#define DEVICE_ID 2 | |
#define CHANNEL 1 //MAX 127 | |
RF24 radio(15, 15); // Set up nRF24L01 radio on SPI bus plus pins 7 & 8 | |
// Topology | |
const uint64_t pipes[2] = { 0xFFFFFFFFFFLL, 0xCCCCCCCCCCLL }; |
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 | |
* |
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
#define TRIAC_PIN 5 | |
#define ZERO_CROSS_PIN 4 | |
#define DEBOUNCE_TIME 9000 //9ms - 10ms is the pulse period | |
static uint32_t lastPulse = 0; | |
static uint16_t period = 5000; //5ms - 50% for each half wave | |
void ICACHE_RAM_ATTR onTimerISR(){ | |
if(GPIP(TRIAC_PIN)){//OUTPUT is HIGH | |
GPOC = (1 << TRIAC_PIN);//low |
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
struct spiffs_helper_t { | |
File f; | |
spiffs_helper_t(const char * _path ) { | |
f = SPIFFS.open(_path, "r+"); // try to open if there... for read and write | |
if (!f) { | |
f = SPIFFS.open(_path, "w+"); // if fail open for read/write but new | |
} | |
}; |
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
function video-upload() { | |
if [ $# -lt 1 ]; then | |
echo "[ERROR] Missing required file name." | |
else | |
FILESIZE=$(wc -c "$1" | awk '{print $1}') | |
printf "[START] Uploading $FILESIZE bytes.\n" | |
MEDIAID=$(twurl /1.1/media/upload.json -H upload.twitter.com -d "command=INIT&media_category=amplify_video&media_type=video/mp4&total_bytes=$FILESIZE" | jq .media_id_string | sed 's/\"//g') | |
INDEX=0 | |
split -b 5m $1 twitter-video- |
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
user www-data; | |
worker_processes 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
sendfile on; |
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
# 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 * |
OlderNewer