Skip to content

Instantly share code, notes, and snippets.

@kwikwag
kwikwag / node-engine-strict.js
Created April 29, 2025 09:31
A script that ensures your project runs with a Node.js version that satisfies the `engines.node` field in your `package.json`, using either NVM or the system-installed Node.js.
/*
# `node-engine-strict.js`
A script that ensures your project runs with a Node.js version that satisfies
the `engines.node` field in your `package.json`.
It works by checking for a compatible version installed via **NVM** (Node
Version Manager), and will fall back to the system-installed Node.js if it's
compatible. If neither is suitable, the script exits with an error.
@palashmon
palashmon / Readme.md
Last active July 10, 2025 03:15
Creating JSDoc `@types` for Different Data Types in JavaScript
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Created October 31, 2022 12:31
Simple bash script to create a Bootable ISO from macOS Ventura Install Image from Mac App Store
#!/usr/bin/env bash
#===========================================================================
# Works only with the official image available in the Mac App Store.
# Make sure you download the official installer before running this script.
#===========================================================================
# Change this at your desire. Sometimes this works out of the box, sometimes not.
# Default size: ~16 GB
DISK_SIZE="15361m"
@matiasba
matiasba / cloudflare-ddns.sh
Created June 8, 2022 19:00
Bash script for DDNS using cloudflare DNS service, with options for enabling https proxy
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service from anywhere
# DNS redord needs to be pre-created on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Last active July 30, 2025 14:42 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6. Forked from @fabianoriccardi

Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Last active June 18, 2023 08:11
Simple bash script to create a Bootable ISO from macOS Big Sur Install Image from Mac App Store
#!/usr/bin/env bash
#===========================================================================
# Works only with the official image available in the Mac App Store.
# Make sure you download the official installer before running this script.
#===========================================================================
# Change this at your desire. Sometimes this works out of the box, sometimes not.
# Default size: ~13.5 GB
DISK_SIZE="13000m"
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Last active October 17, 2024 08:46
Simple bash script to create a Bootable ISO from macOS Catalina Install Image from Mac App Store
#!/usr/bin/env bash
#===========================================================================
# Works only with the official image available in the Mac App Store.
# Make sure you download the official installer before running this script.
#===========================================================================
hdiutil create -o /tmp/Catalina.cdr -size 9000m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Catalina.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build --nointeraction
hdiutil detach "/Volumes/Install macOS Catalina"
@fffonion
fffonion / setup-dashbutton.py
Created September 28, 2019 22:32
Setting up dash button without Amazon App
import requests
import re
import sys
# Initial work from: https://mpetroff.net/2016/07/new-amazon-dash-button-teardown-jk29lp/
h = requests.Session()
BASE_URL = "http://192.168.0.1"
@oischinger
oischinger / vicare_temperature_sensors.yaml
Created September 19, 2019 18:11
Vicare temperature sensors
vicare_outside_temperature:
friendly_name: "Aussentemperatur"
unit_of_measurement: '°C'
value_template: "{{ state_attr('climate.vicare_heating', 'outside_temperature') }}"
vicare_desired_temperature:
friendly_name: "Zieltemperatur"
unit_of_measurement: '°C'
value_template: "{{ state_attr('climate.vicare_heating', 'temperature') }}"
@blippy
blippy / voicer.ino
Created June 26, 2019 20:39
Streaming audio on an ESP32 with a blinkt
#include <Arduino.h>
#include <WiFi.h>
#include <driver/dac.h>
const int dataPin = 4; // Blinkt pin 16
const int clockPin = 5; // blinkt pin 18
const int numLEDs = 8;
uint8_t pixels[numLEDs * 3];
void spi_out(uint8_t n) {