Skip to content

Instantly share code, notes, and snippets.

View mbohun's full-sized avatar
🙃
How do you do?

Martin Bohun Hormann mbohun

🙃
How do you do?
  • Canberra, ACT, Australia
View GitHub Profile
@mbohun
mbohun / NOTES.md
Last active February 1, 2025 06:21
fungi taxonomy gbif uniprot REST JSON
@mbohun
mbohun / NOTES.md
Last active December 29, 2024 23:19
xmllint XPath

Creating the "main" photo gallery screen

  • From each gallery (subdir) index.html "main" thumbnail
    • encoded at (XPath):
      /html/head/meta[@property="og:image"]/@content
      
  • By extracting each gallery thumbnail with xmllint --xpath as shown here:
mbohun@mamlas:~/pCloudDrive/Public Folder/fungi> find . -name "index.html"
    | xargs xmllint --xpath 'string(/html/head/meta[@property="og:image"]/@content)'
@mbohun
mbohun / NOTES.md
Created December 7, 2024 15:38
AXAGON USB-C_to_eth

AXAGON USB-C_to_eth

[mbohun@danctnix ~]$ sudo dmesg -T
...

[Sat Dec  7 16:19:49 2024] usb 2-1: new SuperSpeed USB device number 8 using xhci-hcd
[Sat Dec  7 16:19:49 2024] usb 2-1: New USB device found, idVendor=0bda, idProduct=8153, bcdDevice=30.00
[Sat Dec  7 16:19:49 2024] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[Sat Dec  7 16:19:49 2024] usb 2-1: Product: USB 10/100/1000 LAN
[Sat Dec 7 16:19:49 2024] usb 2-1: Manufacturer: Realtek
@mbohun
mbohun / NOTES.md
Last active December 1, 2024 06:08
GIS Leaflet JavaScript GeoJSON
@mbohun
mbohun / NOTES.md
Last active December 13, 2024 09:09
Xiaomi Redmi Note 13 Pro cam_app GPS TEST

Redmi Note 13 Pro cam_app GPS TEST

  • TODO
for jpg_photo in `ls *.jpg`; do
    raw_lat=$(identify -format '%[exif:GPSLatitude]' ${jpg_photo})
    raw_lon=$(identify -format '%[exif:GPSLongitude]' ${jpg_photo})
    
    lat=$(echo "$raw_lat" | while IFS="," read -r deg min sec; do echo "scale=6;$deg + $min /60 + $sec / 3600"| bc; done)
    lon=$(echo "$raw_lon" | while IFS="," read -r deg min sec; do echo "scale=6;$deg + $min /60 + $sec / 3600"| bc; done)
[Sun Oct 22 12:38:56 2023] audit: type=1334 audit(1697938752.675:104268): prog-id=41634 op=LOAD
[Sun Oct 22 12:38:56 2023] audit: type=1334 audit(1697938752.885:104269): prog-id=41632 op=UNLOAD
[Sun Oct 22 12:38:56 2023] audit: type=1334 audit(1697938752.885:104270): prog-id=41631 op=UNLOAD
[Sun Oct 22 12:39:57 2023] do_trap: 2 callbacks suppressed
[Sun Oct 22 12:39:57 2023] pmdaroot[1694537]: unhandled signal 11 code 0x1 at 0x000000000019db49 in libc.so.6[3fb32c3000+11a000]
[Sun Oct 22 12:39:57 2023] CPU: 1 PID: 1694537 Comm: pmdaroot Tainted: G C O 5.15.131 #1
[Sun Oct 22 12:39:57 2023] Hardware name: Pine64 PineTabV (DT)
[Sun Oct 22 12:39:57 2023] epc : 0000003fb333a4f0 ra : 0000003fb3317474 sp : 0000003fe4dca550
[Sun Oct 22 12:39:57 2023] gp : 0000002ab5a04fc8 tp : 0000003fb303a280 t0 : 0000000000000020
[Sun Oct 22 12:39:57 2023] t1 : 0000000000000000 t2 : 00000000000003ff s0 : 0000003fe4dcaea0
@mbohun
mbohun / 2023-10-18_PBP_dmesg.txt
Last active October 18, 2023 03:59
PineBookPro dmesg missing bluetooth firmware patch-file?
[Mon Oct 16 18:24:10 2023] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[Mon Oct 16 18:24:10 2023] Linux version 6.5.3-1-MANJARO-ARM (builduser@Mnjro-BldSrvr-M2) (gcc (GCC) 12.1.0, GNU ld (GNU Binutils) 2.38) #1 SMP PREEMPT Fri Sep 15 12:28:28 UTC 2023
[Mon Oct 16 18:24:10 2023] Machine model: Pine64 Pinebook Pro
[Mon Oct 16 18:24:10 2023] efi: UEFI not found.
[Mon Oct 16 18:24:10 2023] Zone ranges:
[Mon Oct 16 18:24:10 2023] DMA [mem 0x0000000000200000-0x00000000f7ffffff]
[Mon Oct 16 18:24:10 2023] DMA32 empty
[Mon Oct 16 18:24:10 2023] Normal empty
[Mon Oct 16 18:24:10 2023] Movable zone start for each node
[Mon Oct 16 18:24:10 2023] Early memory node ranges
@mbohun
mbohun / NOTES.md
Last active October 16, 2023 08:22
PineBookPro nvme
[mbohun@mbohunpinebookpro ~]$ neofetch
██████████████████  ████████   mbohun@mbohunpinebookpro
██████████████████  ████████   ------------------------
██████████████████  ████████   OS: Manjaro ARM Linux aarch64
██████████████████  ████████   Host: Pine64 Pinebook Pro
████████            ████████   Kernel: 6.5.3-1-MANJARO-ARM
████████  ████████  ████████   Uptime: 30 mins
████████  ████████  ████████   Packages: 1079 (pacman), 8 (flatpak)
████████ ████████ ████████ Shell: bash 5.1.16
@mbohun
mbohun / NOTES.md
Created October 15, 2023 03:44
Okular certutils digital_sign
  1. create a new certificate with certutil command:
    certutil -S \
    -s "CN=[ your full name ],O= [ Business or School ],OU=[ Deparment or position ],L= [ Location ],ST=[ State ],C= [ Country code ],E= [ your email ]" \
    -g 2048 \
    -d sql:$HOME/.pki/nssdb \
    -n [ new name of certificate ] \
    -x \
    

-t "Cu,Cu,Cu" \