Skip to content

Instantly share code, notes, and snippets.

@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
@alexmi256
alexmi256 / Raspberry Pi Zero W Wireless USB Fingerprint.md
Last active November 23, 2021 19:47
Raspberry Pi Zero W Wireless USB Fingerprint.md

Goal

Use a cheap fingerprint sensor wirelessly so that I can auth to Windows Hello and other systems that use it in a cost effective manner.

Possible Solutions

Device URL Cost ($USD) Works With Windows Hello
Server (Pi Zero W) and Client Running USBIP Windows Client [USB/IP Server
@alexmi256
alexmi256 / imagemagick jpex xl failure
Created June 29, 2021 21:02
imagemagick jpex xl failure
   ~/workspace/ml-data-processing    main ⇡3 ?3  convert -debug ALL test.png test.jxl  1 ✘
2021-06-29T20:58:23+00:00 0:00.000 0.000u 7.1.0 Configure convert[449389]: utility.c/ExpandFilenames/969/Configure
Command line: convert {-debug} {ALL} {test.png} {test.jxl}
2021-06-29T20:58:23+00:00 0:00.000 0.000u 7.1.0 Policy convert[449389]: policy.c/IsRightsAuthorized/636/Policy
Domain: Module; rights=Read; pattern="PNG" ...
2021-06-29T20:58:23+00:00 0:00.000 0.000u 7.1.0 Module convert[449389]: module.c/OpenModule/1273/Module
Searching for module "PNG" using filename "png.la"
2021-06-29T20:58:23+00:00 0:00.000 0.000u 7.1.0 Module convert[449389]: module.c/GetMagickModulePath/546/Module
Searching for coder module file "png.la" ...
2021-06-29T20:58:23+00:00 0:00.000 0.000u 7.1.0 Module convert[449389]: module.c/OpenModule/1282/Module
@alexmi256
alexmi256 / Mail::RFC822::Address-0.4.test.pl
Created December 6, 2020 23:40
Mail::RFC822::Address-0.4.test.pl
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
######################### We start with some black magic to print on failure.
# Change 1..1 below to 1..last_test_to_print .
# (It may become useful if the test is moved to ./t subdirectory.)
BEGIN { $| = 1; print "1..82\n"; }
END {print "not ok 1\n" unless $loaded;}
/* eslint-disable */
import { Selector } from 'testcafe';
const TIER2 = { tier2: 'true' };
const SMOKE = { type: 'smoke' };
const OWNERS = { owner: 'team' };
fixture.meta(OWNERS)`All Passing Fixture`;
[...Array(2).keys()].forEach(testNumber => {
test.meta(SMOKE).meta(TIER2).meta({