Skip to content

Instantly share code, notes, and snippets.

@sogaiu
sogaiu / a51-notes.md
Created May 25, 2026 12:33
alternative rom info for samsung galaxy a51
@sogaiu
sogaiu / android-notes.md
Last active May 25, 2026 09:49
android notes
@sogaiu
sogaiu / gist:1472985c7a7a83699ef836ab4fec75d4
Created May 24, 2026 08:02
heimdall print-pit output for samsung galaxy s8 (sm-g950f)
$ heimdall print-pit
Heimdall v2.0.2
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
https://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
#! /bin/sh

# adapted from:
#
#   https://www.baeldung.com/linux/qemu-from-terminal

# create .qcow2 file by:
#
#   qemu-img create -f qcow2 debian-13.0.0-amd64.qcow2 20G

Background

Wanted to get a basic firewall setup (like the default that gufw provides) but via nftables, which likely means using the nft command line tool [1]. Rather than just copy-paste some example (which needing locating first in any case) though, it seemed like a better idea to understand enough detail so that whatever was settled on could be maintained / modified over time.

There is an official wiki with plenty of information, but unfortunately, for me it wasn't a very useful resource for learning initially.

Simple Example

Here is a simple example:

  • goal: make own data small enough to fit on small usb memory / micro sdhc
  • why: see below

  • random
    • sometimes just backing up lists of things instead of the things themselves might be enough to reduce space (e.g. may be there's are books or other things that could be obtained in the future but storing the media could increase storage size)
@sogaiu
sogaiu / secure-boot-info.md
Last active May 22, 2026 10:22
secure boot info (including dell update info)

want to ensure certain secure boot related certificates are up to date before 2026-06-24

at present (2026-05), if one has a windows 11 installation, first:

  • go to: windows security app > device security > secure boot

  • check state - see the sort-of-table that has down arrow things to click to reveal. check the "fully updated" one first. if the message matches what is seen on the machine, nothing left to do. otherwise check the other ones below "fully updated"

    • on one lg 15 inch notebook, currently see: > Secure Boot is on, but your device is using an older boot trust configuration that should be updated. There is not yet enough data to classify your device for automatic update. Visit the link below for more information.
@sogaiu
sogaiu / issue-3-comment.md
Last active May 13, 2026 07:33
janet-ts-mode custom indentation

The latest approach is to try to get different behavior based on whether the indentation is line-related or region-related.

Emacs provides two variables that can be set to functions that handle each type of indentation:

  • indent-region-function, and
  • indent-line-function

The idea is to provide an appropriate function for each of these variables.

I've tried out the code below along with the following commands:

# https://github.com/sogaiu/jog
$ jog '{:dump true}' ~/src/janet/src/boot/boot.janet
[
["/home/user/src/janet/src/boot/boot.janet" 11 3 "def" "defn" nil "```\n (defn name & more)\n\n Define a function. Equivalent to `(def name (fn name [args] ...))`.\n ```"]
["/home/user/src/janet/src/boot/boot.janet" 47 3 "defn" "defmacro" "[name & more]" "\"Define a macro.\""]
["/home/user/src/janet/src/boot/boot.janet" 52 3 "defmacro" "as-macro" "[f & args]" "``Use a function or macro literal `f` as a macro. This lets\n any function be used as a macro. Inside a quasiquote, the\n idiom `(as-macro ,my-custom-macro arg1 arg2...)` can be used\n to avoid unwanted variable capture of `my-custom-macro`.``"]
["/home/user/src/janet/src/boot/boot.janet" 60 3 "defmacro" "defmacro-" "[name & more]" "\"Define a private macro that will not be exported.\""]
["/home/user/src/janet/src/boot/boot.janet" 65 3 "defmacro" "defn-" "[name & more]" "\"Define a private function that will not be exported.\""]
["/home/user/src/janet/src/boot/