Skip to content

Instantly share code, notes, and snippets.

@orinocoz
orinocoz / MQTT_ESP8266_temperature_humidity.ino
Created March 14, 2021 19:08 — forked from balloob/MQTT_ESP8266_temperature_humidity.ino
Sketch for the ESP8266 to publish temperature and humidity values received from a DHT22 to MQTT
// Get ESP8266 going with Arduino IDE
// - https://github.com/esp8266/Arduino#installing-with-boards-manager
// Required libraries (sketch -> include library -> manage libraries)
// - PubSubClient by Nick ‘O Leary
// - DHT sensor library by Adafruit
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>
@orinocoz
orinocoz / main.cpp
Created March 19, 2021 15:07 — forked from c4r-gists/main.cpp
Connecting a DHT11 sensor to the cloud with an ESP8266-based board
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <Cloud4RPi.h>
#include "DHT.h"
#ifndef LED_BUILTIN
#define LED_BUILTIN 2
#endif
#define DHTPIN 2 // Digital pin connected to the DHT sensor
@orinocoz
orinocoz / ALTERNATIVES.adoc
Created April 17, 2021 09:51 — forked from mbbx6spp/ALTERNATIVES.adoc
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@orinocoz
orinocoz / ffmpeg.md
Created April 25, 2021 10:19 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
/**
* ---------------------------------------------------------
* | Esp-32/Arduino Stair Led Relay control |
* | By SchizoDuckie, ©2019 |
* | |
* | Disclaimer: |
* | I am in no way, shape or form responsible for |
* | - You setting your house on fire |
* | - Your firstborn suddenly getting autism |
* | - Your girlfriend running off with the neighbour |
@orinocoz
orinocoz / Kerio-connect-nginx.conf
Created October 20, 2021 17:02 — forked from ilyaevseev/Kerio-connect-nginx.conf
Copy Kerio Connect backups to Hetzner backup server.
server {
listen 80;
listen [::]:80;
server_name mail.remotesrv.ru;
location /.well-known { alias /var/www/letsencrypt/.well-known; }
location / { return 308 https://mail.remotesrv.ru$request_uri; }
}
@orinocoz
orinocoz / transmission-ssl
Created October 30, 2021 20:51 — forked from Belphemur/transmission-ssl
Configuration to use nginx as reverse proxy for Transmission BT with SSL/HTTP2 protected with auth
upstream transmission {
server 127.0.0.1:9091; #Transmission
}
server {
listen 443 ssl http2;
server_name example.com;
auth_basic "Server Restricted";
auth_basic_user_file /var/www/myWebSite/web/.htpasswd;
# Path to the root of your installation
@orinocoz
orinocoz / nws_wx_alert_rest.txt
Created November 25, 2021 11:52 — forked from finity69x2/nws_wx_alert_rest.txt
Home Assistant Configuration for Adding Weather Alerts from the US NWS using a REST Sensor
This will allow several functions including a persistent pop-up notification on your HA front end, a notification to whichever notify service you use (I’m using Pushbullet in this example), and, if you use another custom component (https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639), it will also trigger an announcement to all of your Echo devices.
You next need to find either your NWS Zone ID or County ID. It is better to use both ID's here.
You can find your Zone or County ID by going to https://alerts.weather.gov/, scroll down to your state and click on the “zone list” and/or "county list" then look for the entry for your county.
Once you have your desired ID you create a sensor, replacing my id (INZ009, INC033) with yours. The ID is case sensitive!
Then when you have your ID's, enter them into the configuration below.
Originally from "https://hastebin.com/sojasolite.sql"
1-Need to modify the host user priveleges to skip typing your password with sudo
sudo visudo
hostuser ALL=(ALL) NOPASSWD:ALL
2-Mount this volume in HA container to preserve the sshkey generated from the HA container and used to execute shell commands. Key will then persist through reboot or upgrades.
-v /home/hass/docker/sshkey/.ssh:/root/.ssh
"/home/hass/docker/sshkey/.ssh" needs to be your own path
@orinocoz
orinocoz / nokia-router-cfg-tool.py
Created December 27, 2021 12:18 — forked from thedroidgeek/nokia-router-cfg-tool.py
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration