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 re | |
import sys | |
from datetime import datetime | |
# Función para convertir el tiempo SRT a formato datetime | |
def srt_time_to_datetime(srt_time): | |
return datetime.strptime(srt_time, '%H:%M:%S,%f') | |
# Función para convertir el tiempo datetime a formato SRT | |
def datetime_to_srt_time(dt): |
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 <WiFi.h> | |
#include "lwip/etharp.h" | |
const char* ssid = "xxxxxx"; | |
const char* password = "xxxxxx"; | |
const IPAddress remote_ip (192, 168, 1, 1); // Should be in your same subnet | |
void setup () { |
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
from xml.dom import minidom | |
import re | |
import math | |
mydoc = minidom.parse('TweetCloud.xml') | |
items = mydoc.getElementsByTagName('a') | |
hashtags = [] |
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 "Arduino.h" | |
#include <WiFi.h> | |
#include "esp_log.h" | |
#include "esp_system.h" | |
#include "esp_event.h" | |
#include "mqtt_client.h" | |
#define SECURE_MQTT // Comment this line if you are not using MQTT over SSL | |
#ifdef SECURE_MQTT |
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
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerName node.yourdomain.com | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html # this does not matter | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
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
# Rclone mount on boot | |
# Copy file to: /etc/systemd/system | |
# You need to create a remote on RClone and a folder on your disk, both with same name <rclone-remote> | |
# This example uses /cloud/ folder as origin to mount all remotes, change it to your needs | |
# This example use a linux user named rclone. Create it or adapt it to your needs. Rclone will get config from that user's home folder | |
# Register new service by typing: | |
# sudo systemctl daemon-reload | |
# Do the next one for every remote you want to load on boot | |
# sudo systemctl enable rclone-mount@<rclone-remote>.service | |
# systemctl start rclone-mount@<rclone-remote>.service |
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
#include <Arduino.h> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
// Data wire is plugged into port D2 on NodeMCU | |
#define ONE_WIRE_BUS D2 | |
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs) | |
OneWire oneWire(ONE_WIRE_BUS); |
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 <ESPAsyncTCP.h> | |
#include <Ticker.h> | |
#include <ESPAsyncWebServer.h> | |
#include <ESP8266WiFi.h> | |
#include <functional> | |
#include <Hash.h> | |
using namespace std; | |
using namespace placeholders; |