Skip to content

Instantly share code, notes, and snippets.

View runlevel5's full-sized avatar

Trung Lê runlevel5

View GitHub Profile
@runlevel5
runlevel5 / instructions.md
Last active September 12, 2025 09:36
How to replace GNU coreutils with Rust uutils/coreutils locally in your user account in Fedora?

Run following bash script:

#!/bin/bash

# For binaries
SRC_BIN_DIR="/usr/bin"
DEST_BIN_DIR="$HOME/.local/uubin"

# Ensure destination directory exists
commit 3b6664a217eaea1ddb00dd978a5326b14ca57fa4
Author: Trung Lê <8@tle.id.au>
Date: Tue Aug 12 11:27:43 2025 +1000
new version 2.3.8
diff --git a/.gitignore b/.gitignore
index 8a39d88..d6d11eb 100644
--- a/.gitignore
+++ b/.gitignore
@runlevel5
runlevel5 / cde-9f0f015c4daf7d3eacb21c19b4f3912cac56e68e-f43.log
Created August 11, 2025 23:03
CDE sha-9f0f015c4daf7d3eacb21c19b4f3912cac56e68e compilation error on Fedora 43
$ export CC='gcc -std=c90'
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether sleep supports fractional seconds... yes
checking filesystem timestamp resolution... 0.1
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
@runlevel5
runlevel5 / gcc15_fix_issort_compfunc.patch
Last active March 31, 2025 01:34
Common Desktop Environment: Fix Issort compare function definition
diff --git a/cde/lib/tt/mini_isam/isam_impl.h b/cde/lib/tt/mini_isam/isam_impl.h
index 8172077da..c11ac7820 100644
--- a/cde/lib/tt/mini_isam/isam_impl.h
+++ b/cde/lib/tt/mini_isam/isam_impl.h
@@ -381,7 +381,7 @@ typedef struct issort {
/* many records */
int ist_nrecs; /* number of records inserted */
int ist_currec; /* current position */
- int (*ist_compf) (); /* comparison function */
+ int (*ist_compf) (const void *, const void *); /* comparison function */
@runlevel5
runlevel5 / example.ign
Created March 24, 2025 13:36
Fedora coreos test ignition file
{
"ignition": {
"version": "3.5.0"
},
"passwd": {
"users": [
{
"name": "core",
"sshAuthorizedKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCgyvCeNY1X7DmUPzLgpYoyIglrFT5YO40DIYoL9WuHFwdiXU0m8S+dnc2aGQ78XU6SJCUaOmg2uUnTqjYwf8JmwFmTp9iil4qmw+opudUFZw+Yh6MFQt9aC68YWxa3b+NxbHK4ouNFO4ODTgPcHdmK5ENX1TNvb8xxMlPAxpgfiQKHiJL4ItcZZiVDmx9sMJRNqJ4REV4ZyyzotRRXAsThjm4rVSg95jbfl4UEnTfd23K8k5zhAuwPf84NlhlEdwuCxpWmGmSJ0QgMh6076bSC1+d9nMKU8xY9oX4NiVvdaJHL2dLdrhLh7CZ9efUeOVcJ4spKM1wJCW4Btt8Sj trung.le@ruby-journal.com"
@runlevel5
runlevel5 / org.lwjgl3.json
Last active June 20, 2024 14:38
Minecraft 1.21 LWJGL3 config for Linux PPC64LE (for PrismLauncher)
{
"formatVersion": 1,
"libraries": [
{
"downloads": {
"artifact": {
"sha1": "a9479c9d1daa4061e2052ca02c937dcad5edeac3",
"size": 451935,
"url": "https://raw.githubusercontent.com/runlevel5/lwjgl3-ppc64le-release/main/3.3.3/lwjgl-freetype-3.3.3.jar"
}
@runlevel5
runlevel5 / 6600xt_benchmarking.md
Last active June 15, 2024 02:35
AMD Radeon RX 6600 XT Linux 6.8.11 benchmarking
$ vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x1002
    Device ID:      0x73FF
    Device Name:    AMD Radeon RX 6600 XT (RADV NAVI23)
    Driver Version: 100667393
    Device UUID:    71ea6a78fd227b69198285fd621ab941
@runlevel5
runlevel5 / list_all_versions_grouped_by_package.bash
Last active November 22, 2022 22:50
Just a quick script to create a JSON of which key is the NPM package name and value is the array of all versions
#!/bin/bash
set -euo pipefail
PACKAGE="null"
packages_filepath="packages"
detailed_packages_filepath="detailed_packages"
username="shortlyster"
CLEANUP="false"
main() {
From ea8c5e8b91938abafd79da1ca79b4fdd9ae4635d Mon Sep 17 00:00:00 2001
From: Trung LE <8@tle.id.au>
Date: Mon, 21 Nov 2022 21:41:42 +1100
Subject: [PATCH] Update to version 0.25.0
---
.gitignore | 1 +
changelog | 3 +++
crossterm-fix-metadata.diff | 16 ++++++++++------
rust-crossterm.spec | 2 +-
@runlevel5
runlevel5 / fedora35-uuid-static-rpm.patch
Created November 17, 2022 06:33
This the patch to build RPM with static .a files
Date: Thu, 17 Nov 2022 17:10:48 +1100
Subject: [PATCH] Build static
---
uuid.spec | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/uuid.spec b/uuid.spec
index c99d307..8f39927 100644
--- a/uuid.spec