Skip to content

Instantly share code, notes, and snippets.

substitutions:
device_name: fensterled
esphome:
name: ${device_name}
esp8266:
board: esp01_1m
# Enable logging
esphome:
name: minidisplay
platform: ESP32
board: nodemcu-32s
wifi:
id: WiFi1
ssid: !secret wifi_ssid
password: !secret wifi_password
use_address: 192.168.0.166
@mikezter
mikezter / cameo.yml
Created April 2, 2022 13:42
esp32 camera settings
substitutions:
dname: cameo
dip: 192.168.0.224
esphome:
name: $dname
esp32:
board: esp32dev
framework:
@mikezter
mikezter / wuudi.yaml
Created December 22, 2021 19:22
BlitzWolf BW-SHP2 Power Monitoring Plug ESPHOME
# https://www.esphome-devices.com/devices/BlitzWolf-BW-SHP2-Power-Monitoring-Plug
# Blitzwolf, Wuudi, Gosun
substitutions:
devicename: blitzwolf_bw_shp2_plug_1
friendly_name: BlitzWolf BW-SHP2 Plug 1
device_description: BlitzWolf BW-SHP2 Power Monitoring Plug with button, Red and Blue led.
current_res: "0.00221" # Random value. Requires power monitoring calibration
voltage_div: "955" # Random value. Requires power monitoring calibration
esphome:
name: qs-wifi-ds02-2c
platform: ESP8266
board: esp01_1m
wifi:
ssid: "MyWiFi_SSID"
password: "MyWiFi_pw"
# Enable fallback hotspot (captive portal) in case wifi connection fails
@mikezter
mikezter / smart-caps-lock.md
Created October 20, 2020 20:21 — forked from tanyuan/smart-caps-lock.md
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@mikezter
mikezter / DisplayPercentageM73.py
Last active March 19, 2020 22:33
Custom menu for Klipper firmware on Creality Ender 3
# Author: @mikezter
# Date: 2020-03-18
# Description: This plugin uses Cura TIME and TIME_ELAPSED estimations
# to calculate build percentage and time remaining.
# It can insert M73 P<percentage> and M117 <time remaining> gcodes.
from ..Script import Script
import re
class DisplayPercentageM73(Script):
pnputil /enum-drivers > ./driveroutput.txt
Get-Content .\driveroutput.txt | Select-String -Pattern "Published Name" | %{$_.Line.Split(" ")} | Select-String -Pattern ".inf" | Where { $_ } | Set-Content .\oems.txt
foreach($line in Get-Content .\oems.txt) {
pnputil.exe /delete-driver $line
}
@mikezter
mikezter / microdao.abi
Created June 19, 2017 10:13 — forked from zoernert/microdao.abi
Micro DAO to create an EVU in Germany
[ { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string", "value": "MicroDAO" } ], "type": "function" }, { "constant": false, "inputs": [], "name": "executeSpendingRequests", "outputs": [], "type": "function" }, { "constant": false, "inputs": [ { "name": "number_of_days", "type": "uint256" }, { "name": "requiredShares", "type": "uint256" } ], "name": "setDirectorLock", "outputs": [], "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "bookings", "outputs": [ { "name": "time", "type": "uint256" }, { "name": "funding", "type": "uint256" }, { "name": "spending", "type": "uint256" }, { "name": "counterpart", "type": "address" }, { "name": "text", "type": "string" } ], "type": "function" }, { "constant": false, "inputs": [], "name": "closeFunding", "outputs": [], "type": "function" }, { "constant": false, "inputs": [ { "name": "node", "type": "string" } ], "name": "setDirectorNode", "outputs": [], "type": "function" }, { "consta
@mikezter
mikezter / bfs.go
Created August 24, 2016 20:44
read a buffer, make a tree, calculate distance of all other nodes from start-node
package main
import (
"bytes"
"fmt"
"io"
"os"
)
var sample = []byte(`2