Skip to content

Instantly share code, notes, and snippets.

@danbst
danbst / home-etc.nix
Created December 27, 2019 15:17
Manage your /etc from home-manager (install home-manager as root)
{ config, pkgs, lib, ... }: {
imports = [
(import <nixpkgs/nixos/modules/system/etc/etc.nix>)
];
options.system.build.etc = lib.mkOption { type = lib.types.package; };
options.system.activationScripts.etc =
lib.mkOption { type = lib.types.unspecified; };
config = {
@anna328p
anna328p / aig4tb.md
Last active January 25, 2025 00:02
Arch Installation Guide for Total Beginners

Arch Installation Guide for Total Beginners

Guide by anna328p/alienpirate5.

This is meant as a companion for the official Arch install guide: https://wiki.archlinux.org/index.php/Installation_guide

This document is a guide for installing Arch Linux from the live system booted with the official installation image.

This document will walk you through the Arch Linux installation process based on the Arch Wiki installation guide. You will need to refer to the wiki for links; this guide just explains the steps in more detail. Keep in mind that this

#!/bin/bash
set -eu
usage() {
cat >&2 <<'EOF'
usage: ./difflog $out1 $out2
Compare two Nix build logs, normalizing out boring differences.
This can be useful to test the effect of a change to build scripts,
@SuperSandro2000
SuperSandro2000 / prepare-commit-msg.sh
Last active November 12, 2023 23:13
prepare commit message for nixpkgs. put into .git/hooks/prepare-commit-msg
#!/usr/bin/env bash
# shellcheck disable=SC2034
COMMIT_MSG_FILE=$1 # file which contains the commmit message
# shellcheck disable=SC2034
COMMIT_SOURCE=$2 # eg commit
# shellcheck disable=SC2034
SHA1=$3 # eg head
perl -i -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
@roberth
roberth / minimod.nix
Last active March 2, 2026 04:55
Simple and quick module system alternative + thoughts and tasks
/*
minimod: A stripped down module system
TODO Comparison:
- [ ] Come up with a benchmark "logic" using plain old functions and let bindings
- [ ] Write the benchmark for the module system
- [ ] Write the benchmark for POP?
- [ ] Qualitative comparison of extensibility in the context of composable
Nixpkgs packaging logic
TODO Fine-tuning:
@lyndsysimon
lyndsysimon / protonmail_archiver.js
Last active June 10, 2024 19:53 — forked from apazzy/protonmail_archiver.js
Protonmail inbox cleaner
/* Protonmail cleanup scripts
* Works with ProtonMail v4.0.14 as of 2022-01-23
*
* Based on Lyndsy's Protonmail mass archiver:
* https://gist.github.com/lyndsysimon/e6a4a1becaddf09fe02c503793b545d6
*
* Usage:
* - Navigate to your inbox (or another folder/label, presumably)
* - Open your browser's developer tools' Javascript console
* - Paste in this script
@LucaCorigliano
LucaCorigliano / selfrepair.md
Last active September 8, 2026 18:16
Samsung Self Repair Assistant on unsupported devices (Hall IC Calibration methodology on Galaxy Fold 4)

Samsung Self Repair Assistant on Unsupported Devices (Rootless Method)

Updated guide – no root required


Disclaimer

  • This guide is not a beginner step-by-step tutorial. Basic familiarity with ADB and Android system settings is assumed.
  • No root or bootloader unlocking is required for this updated method.
@peppergrayxyz
peppergrayxyz / qemu-vulkan-virtio.md
Last active August 22, 2026 20:47
QEMU with VirtIO GPU Vulkan Support

QEMU with VirtIO GPU Vulkan Support

With its latest reales qemu added the Venus patches so that virtio-gpu now support venus encapsulation for vulkan. This is one more piece to the puzzle towards full Vulkan support.

An outdated blog post on clollabora described in 2021 how to enable 3D acceleration of Vulkan applications in QEMU through the Venus experimental Vulkan driver for VirtIO-GPU with a local development environment. Following up on the outdated write up, this is how its done today.

Definitions

Let's start with the brief description of the projects mentioned in the post & extend them:

@hw0lff
hw0lff / change-splash-screen.md
Created January 21, 2025 19:41
Use Lenovo ShellFlash.efi to change boot image of Thinkpad
  1. Unpack lenovo BIOS update utility
  2. Copy Shellflash.efi to /boot/Flash/ShellFlash.efi
  3. Boot computer into uefi shell
fs0:
cd Flash
ShellFlash.efi /patch /logo logofile.gif