Skip to content

Instantly share code, notes, and snippets.

@alexmi256
alexmi256 / uBlock Origin Filters.md
Created July 30, 2025 23:44
uBlock Origin Filters
@alexmi256
alexmi256 / Replace WebP Images with PNG.sh
Created July 28, 2025 12:29
Replace WebP Images with PNG
find . -name "*.webp" -exec sh -c 'dwebp -quiet -mt "$1" -o "${1%.*}.png" && rm "$1"' sh {} \;
@alexmi256
alexmi256 / ollama qwen2.5vl-7b image failure.json
Last active July 16, 2025 23:37
ollama qwen2.5vl-7b image failure
{
"model": "qwen2.5vl:7b",
"prompt": "DO NOT reply with \"The image shows\", \"The image depicts\", or something similar. Reply with the contents of this image and include any significant text in it if present. Do not start the response with The image photo picture shows or depicts. If no significant text exists then DO NOT make any reference to it whatsoever it in your response. Prioritize identifying the objects or people in the image and what they are doing instead of analyzing the image for visual or artistic significance. Remove text formatting and any meta-language or phrases referring to the image, photo, or picture itself.",
"images": [
"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAQ4BDgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0
@alexmi256
alexmi256 / Photoprism-Bulk-Update.md
Created June 17, 2025 14:41
Photoprism Bulk Update via MariaDB SQL

What

This is how you can bulk update photo content via for Photoprism by modify the database since at this time the UI nor the CLI support somwething like this.

Photoprism Tables

root@53ccebcdacf5:/# mariadb-show --password=insecure --user=photoprism photoprism
Database: photoprism
+---------------------+
|       Tables        |
+---------------------+
@alexmi256
alexmi256 / Shrink GeoJSON Arrtibute Properties.md
Created April 15, 2024 02:02
Shrink GeoJSON Arrtibute Properties

What

I wanted to extract buildings from OpenStreetMaps so I can display them on a map using Folium/Leaflet.

The first recommendation online was to use QGIS with the QuickOSM plugin.

While this was annoying to do via the QuickOSM GUI (I should've downloaded the files locally and used SQL) I was able to output a GeoJSON file of buildings.

Unfortunately, due to data quality issues and the format QGIS outputs, I had a ton of null feature properties that I wanted to get rid of.

How

@alexmi256
alexmi256 / mobula7 betaflight update issues.md
Last active June 15, 2023 15:39
mobula7 betaflight update issues

I'm running into similar issues trying to update my Mobula7 from Betaflight 4.3.1 to 4.4.2 also using a Radiomaster Zorro. My original diff all and after update diff all are quite different and restoring mostly complains about the following:

# resource PPM 1 A03
###ERROR IN resource: INVALID RESOURCE NAME: 'PPM'###
# resource PWM 1 A02
###ERROR IN resource: INVALID RESOURCE NAME: 'PWM'###
# resource PWM 2 A09
###ERROR IN resource: INVALID RESOURCE NAME: 'PWM'###
# resource PWM 3 A10
@alexmi256
alexmi256 / BTFL_cli_Mobula7_1S_DIFF.txt
Created June 15, 2023 13:34
Mobula7 Initial diff
diff
###WARNING: NO CUSTOM DEFAULTS FOUND###
# version
# Betaflight / STM32F411SX1280 (S4SX) 4.3.1 Jul 13 2022 / 03:33:32 (8d4f005) MSP API: 1.44
###ERROR IN diff: NO CONFIG FOUND###
# start the command batch
batch start
board_name CRAZYBEEF4SX1280
@alexmi256
alexmi256 / BTFL_cli_backup_20230614_223505_latest.txt
Created June 15, 2023 13:32
Mobula7 4.4.2 fresh install diff all
defaults nosave
# version
# Betaflight / STM32F411 (S411) 4.4.2 Jun 1 2023 / 02:20:34 (23d066d08) MSP API: 1.45
# config: YES
# start the command batch
batch start
defaults nosave
###WARNING: NO CUSTOM DEFAULTS FOUND###
# version
# Betaflight / STM32F411SX1280 (S4SX) 4.3.1 Jul 13 2022 / 03:33:32 (8d4f005) MSP API: 1.44
###ERROR IN diff: NO CONFIG FOUND###
# start the command batch
batch start
@alexmi256
alexmi256 / Xbox Series S SSD Info.md
Last active August 1, 2022 05:56
Xbox Series S SSD Info

Some basic info about my Series S internal SSD disk since I was stuck in an "unreachable" Xbox Live Update loop and the console is out of warranty.

  • With the wifi module
    • attatched the error given was usually 0x80072f8f
    • removed the error given was usually 0x87DD0003
  • Trying to use mobile app for setup gave above error code
  • Trying to setup without mobile app also failed
  • Offline update of OSU1 did not help
  • Console reset did not help
  • GParted does identify the first partition as XBFS
  • Trying to play around with network setting (i.e. DNS and such) made no difference