Skip to content

Instantly share code, notes, and snippets.

const unsigned char shmtable[6][12]={
{11,10,10,9,9,9,8,9,9,10,11,9},
{20,20,21,21,22,22,22,22,21,21,20,19},
{11,10,10,9,9,9,8,9,9,10,11,10},
{20,20,21,21,22,22,22,22,21,21,20,19},
{12,11,11,10,10,10,9,10,10,11,12,10},
{19,19,20,20,21,21,21,21,20,20,19,18}};
const unsigned char miltable[6][12]={
{20,19,19,19,20,20,21,21,21,21,20,20},
@gmag11
gmag11 / mqtt_ssl_idf.ino
Last active January 11, 2025 08:10
Secure MQTT connection to broker with ESP32 and internal IDF mqtt client library
#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
@andreasbotsikas
andreasbotsikas / Vob2Mp4.bat
Last active August 2, 2024 13:56
Convert DVD to mp4 using ffmpeg
REM Download ffmpeg from https://www.ffmpeg.org/download.html.
REM Place ffmpeg.exe in the folder with the vob files
REM Merge all vob files into one
REM VTS_01_0.VOB is usually the menu which you may not want
if exist VTS_01_7.VOB (
copy /b VTS_01_1.VOB+VTS_01_2.VOB+VTS_01_3.VOB+VTS_01_4.VOB+VTS_01_5.VOB+VTS_01_6.VOB+VTS_01_7.VOB ConCat.vob
) else if exist VTS_01_6.VOB (
copy /b VTS_01_1.VOB+VTS_01_2.VOB+VTS_01_3.VOB+VTS_01_4.VOB+VTS_01_5.VOB+VTS_01_6.VOB ConCat.vob
) else if exist VTS_01_5.VOB (
Windows Registry Editor Version 5.00
; Windows terminal
; Sets up the "Windows Terminal" top level item
[HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminal]
"MUIVerb"="Windows Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_0.10.781.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuWindowsTerminal"
@erikcorry
erikcorry / mbedtls-errors.txt
Created October 23, 2020 14:35
Mbed TLS error codes
High level error codes
0x1080 PEM - No PEM header or footer found
0x1100 PEM - PEM string is not as expected
0x1180 PEM - Failed to allocate memory
0x1200 PEM - RSA IV is not in hex-format
0x1280 PEM - Unsupported key encryption algorithm
0x1300 PEM - Private key password can't be empty
0x1380 PEM - Given private key password does not allow for correct decryption
0x1400 PEM - Unavailable feature, e.g. hashing/encryption combination