Skip to content

Instantly share code, notes, and snippets.

@stvhay
stvhay / vscode_gpg_sign.md
Created January 27, 2024 15:12
Configuring VSCode Dev-Containers to GPG Sign Commits into GitHub

Setting Up VSCode Git Signatures

These are instructions to create an ssh-format developer key for signing git commits, and configuring this key to be used by default, and specifying defaults to apply this signature to all git commits.

Along with specifying an identity agent in ~/.ssh/config and SSH_AUTH_SOCK environment variable, this will cause VSCode to pass along obtaining your key decryption password to the system's identity agent.

These instructions have been tested on MacOSX with 1Password set as the identity agent.

@stvhay
stvhay / flac2alac.sh
Last active June 23, 2023 20:17
FLAC 2 ALAC
#!/bin/bash
# get cover art using sacad. try only once.
function get_cover_art() {
local artist="$1"
local album="$2"
local dstdir="$3"
local albumdir="${dstdir}/${artist}/${album}"
local artfile="${albumdir}/${artist} - ${album}.png"
@stvhay
stvhay / gpt4.md
Last active April 7, 2023 00:38
GPT-4 Demo

Prompt

Describe a method in which one would use buildroot to create a multiarch root image supporting both ARM64 and ARMHF file execution. Explain in detail how one would use two toolchains within the same root device.

Response

Buildroot is a popular tool used for building embedded Linux systems via cross-compilation. To create a multiarch root image that supports both ARM64 (AArch64) and ARMHF (ARM Hard Float, 32-bit) file execution, you'll need to configure the system to use two separate toolchains and set up proper library paths to ensure smooth runtime execution. Here's a detailed explanation of how to achieve this:

Download and extract Buildroot:
@stvhay
stvhay / box.md
Last active March 15, 2023 22:31
Multiarch - Box86/Box64

BOX86/BOX64/WINEX86 TUTORIAL for ARM64 LINUX SYSTEMS by SALVADOR LIÈBANA (MICROLINUX)

Salvador Liébana

  • if you dont have armhf added by default like on armbian jammy, before installing the 32 bit armhf userspace libs you need to add armhf architecture first.
sudo dpkg --add-architecture armhf
sudo apt update
@stvhay
stvhay / indiedroid-nova_instructions.md
Last active February 23, 2023 18:05
Indiedroid-nova Ubuntu Image Instructions to Activate Graphics
@stvhay
stvhay / rockchip_default_bootcmd.md
Last active February 21, 2023 10:47
A messy analysis of U-boot's default_bootcmd for Rockchip SOCs

U-boot Environment

# Top Level boot command
bootcmd=run distro_bootcmd;boot_android ${devtype} ${devnum};boot_fit;bootrkp;

# Calls distro_bootcmd
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done

# Boot targets
@stvhay
stvhay / batocera_boot_image_dissection.md
Last active February 23, 2023 12:13
Dissecting the Batocera Boot Image

Batocera Boot Image Dissection (Rockchip rk3588)

Image format

Partition Layout

The Batocera image is a compressed disk image (.img) file with gzip (.gz). The file is mounted to /dev/loop0 with losetup -P --show -f $image and sfdisk -d /dev/loop0 shows the following:

@stvhay
stvhay / cvh.md
Last active January 13, 2023 12:47
Contabo vs Hetzner

Hentzer

CPX 41

  • 8 vCPU
  • 16 GB RAM
  • 240GB
| Lang-uage | Temp-lated | Check Time [us/fn] | Compile Time [us/fn] | Build Time [us/fn] | Run Time [us/fn] | Check RSS [kB/fn] | Build RSS [kB/fn] | Exec Version | Exec Path |
@stvhay
stvhay / build.sh
Created December 29, 2022 15:22
manual build script for rock5b kernel
#!/bin/bash
typeset -A overlay kernel bsp
defconfig="linux-defconfig-full.config"
overlay=(
[name]="overlay"
[repo]="https://github.com/radxa/overlays.git"
[commit]="main"
)
kernel=(