Skip to content

Instantly share code, notes, and snippets.

View thomasvnl's full-sized avatar

Thomas V. thomasvnl

  • Dordrecht, The Netherlands
View GitHub Profile
@alex-tomin
alex-tomin / Readme.md
Last active January 16, 2024 12:40
ESP Home - Connect to MQTT with x509 Client Certificate. (Azure Event Grid)

ESPHome: Connecting to Secure MQTT Server from esp 8266 / esp32

In this example I tried to Connect to Azure Event Grid. Which worked in MQTTX (you can download the tool here), but ESP Home does not support it out of the box. See esphome/feature-requests#1019

This example receives a json message in the following format and converts values to few sensors.

{
  "IncidentId": "1234456",
  "Team":"HardWorkers",
 "Title":"Power Loss",
@sufidu
sufidu / BeyondCompareReset.dat
Created October 11, 2021 05:11
How to reset Beyond Compare trail period in Windows
Open cmd as admin and run this command to delete the next registry key:
reg delete "HKEY_CURRENT_USER\Software\Scooter Software\Beyond Compare 4" /v "CacheID"
:: It is Highly Advised to Purchase the Beyond Compare Softwares
:: This is only for the case You just want to Extend the Trial Period
@tlhakhan
tlhakhan / user-data.yml
Last active October 30, 2024 21:45
Ubuntu 20.04 example autoinstall user-data file
#cloud-config
autoinstall:
version: 1
early-commands:
- systemctl stop ssh # otherwise packer tries to connect and exceed max attempts
- hostnamectl set-hostname ubuntu-00 # update hostname even for the installer environment
- dhclient # re-register the updated hostname
network:
@zsoumya
zsoumya / bc4trialreset.cmd
Created July 12, 2019 21:25
Beyond Compare 4 Trial Reset
reg delete "HKCU\Software\Scooter Software\Beyond Compare 4" /v CacheID /f
@schmich
schmich / ducky.md
Last active September 24, 2024 08:54
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@Nomane
Nomane / bump-version.sh
Last active January 15, 2024 02:49
Bump version shell script.
#!/bin/bash
# Thanks goes to @pete-otaqui for the initial gist:
# https://gist.github.com/pete-otaqui/4188238
#
# Original version modified by Marek Suscak
#
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3" or even "1.2.3-beta+001.ab"
@DeanCording
DeanCording / Template_ESP8266.ino
Last active April 29, 2023 03:23
ESP8266 Arduino project template with optional OTA firmware update
/**
* ESP8266 project template with optional:
* - WiFi config portal - auto or manual trigger
* - OTA update - Arduino or web server
* - Deep sleep
* - Process timeout watchdog
*
* Copyright (c) 2016 Dean Cording <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
/*
IoT Manager mqtt device client https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager
Based on Basic MQTT example with Authentication
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient
- connects to an MQTT server, providing userdescr and password
- subscribes to the topic "/IoTmanager" (waiting "HELLO" messages from mobile device)
- publishes config to the topic "/IoTmanager/config/deviceID/"
Tested with Arduino IDE 1.6.7 + ESP8266 Community Edition v 2.1.0-rc2
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient
@boneskull
boneskull / proxy
Created January 26, 2016 00:43
example nginx config to reverse proxy a node-red server (websocket support)
server {
listen 80;
server_name your_server_name;
access_log /var/log/nginx/access.log;
location / {
proxy_pass http://localhost:1880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.