Skip to content

Instantly share code, notes, and snippets.

substitutions:
# device/name is significant for Lunar.app
# Sensors: TSL2561 (light), BME280 (hum/temp), sgp30 (tvoc)
device: lunarsensor
name: Lunar Sensor
reboot_timeout: 1h
update_interval: 60s
i2c_sda: GPIO33
i2c_scl: GPIO32
board: nodemcu-32s # https://docs.ai-thinker.com/_media/esp32/docs/nodemcu-32s_product_specification.pdf
#!/usr/bin/env python3
# This script generates a wled mapping for the Hackbow LED sculpture at NYC Resistor.
import json
import pandas as pd
number_bars = 18
number_leds = 60
height = 100
Using '/dev/cu.usbserial-140' as serial port.
Showing logs:
[18:39:00]ets Jun 8 2016 00:22:57
[18:39:00]
[18:39:00]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[18:39:00]configsip: 0, SPIWP:0xee
[18:39:00]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:39:00]mode:DIO, clock div:2
[18:39:00]load:0x3fff0018,len:4
[18:39:00]load:0x3fff001c,len:6416
@grischard
grischard / WoHumi_V20.bin
Created February 3, 2023 20:52
Running strings on WoHumi_V20.bin, debug version
WoHumi
12:34:27
May 11 2022
v4.0.3-215-gbe7df8bce9-dirty
=o6r
esp_task_wdt_init(CONFIG_ESP_TASK_WDT_TIMEOUT_S, false)
/mnt/e/ESPSDK/ESP_Humidifier/test/esp-idf/components/esp32/cpu_start.c
esp_task_wdt_add(idle_0)
esp_task_wdt_add(idle_1)
err == ESP_OK && "Failed to init pthread module!"
# tcpdump -i eth0 ether host a4:cf:12:b8:84:55
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
16:13:34.120803 a4:cf:12:b8:84:55 (oui Unknown) > Broadcast Null Unnumbered, xid, Flags [Response], length 6: 01 00
16:13:35.253674 a4:cf:12:b8:84:55 (oui Unknown) > Broadcast Null Unnumbered, xid, Flags [Response], length 6: 01 00
16:13:36.381936 a4:cf:12:b8:84:55 (oui Unknown) > Broadcast Null Unnumbered, xid, Flags [Response], length 6: 01 00
16:13:37.513463 a4:cf:12:b8:84:55 (oui Unknown) > Broadcast Null Unnumbered, xid, Flags [Response], length 6: 01 00
16:13:38.642256 a4:cf:12:b8:84:55 (oui Unknown) > Broadcast Null Unnumbered, xid, Flags [Response], length 6: 01 00
16:13:39.770387 a4:cf:12:b8:84:55 (oui Unknown) > Broadcast Null Unnumbered, xid, Flags [Response], length 6: 01 00
16:13:40.898507 a4:cf:12:b8:84:55 (oui Unknown) > Broadcast Null Unnumbered, xid, Flags [Response], length 6: 01 00
#!/bin/bash
set -Eeuo pipefail
# This script fetches various Prometheus exporters from GitHub.
# It checks if the latest release has already been downloaded for each repository
# in the list. If there is a new release, it downloads it, and performs standard
# steps like compilation or copying, depending on the options specified.
#!/usr/bin/env python
"""
Optimise JPEGs in a mapproxy cache with mozjpeg.
Remembers processed files so they are only processed once.
Find -mtime wouldn't work because optimising the files changes the mtime.
"""
Wikipedia
https://en.wikipedia.org/w/index.php?search={name}&fulltext=Search
Wikipedia RU
http://osm.mapki.com/history/{#type}.php?id={#id}
Who Dit It?
http://simon04.dev.openstreetmap.org/whodidit/?zoom=12&lat={#lat}&lon={#lon}&layers=BTT
Keep Right validator
http://keepright.ipax.at/report_map.php?zoom=14&lat={#lat}&lon={#lon}&layers=B0T
Element history [demo, =Ctrl-Shift-H]
https://www.openstreetmap.org/{#type}/{#id}/history
#!/usr/bin/env python
import xmlrpc.client
from datetime import date
import regex
# today = date.today()
today = date(2022, 10, 2)
server = xmlrpc.client.ServerProxy(
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.