Skip to content

Instantly share code, notes, and snippets.

@avoidik
avoidik / README.md
Last active March 18, 2026 04:12
Compile rsync static on alpine

Prepare environment

docker run -i -t --rm -v ${PWD}:/mnt \
  -e PIP_BREAK_SYSTEM_PACKAGES=1 \
  -e PIP_ROOT_USER_ACTION=ignore \
  -e PIP_NO_WARN_SCRIPT_LOCATION=0 \
  --name=buildenv alpine:latest \
    sh -c 'apk add bash; bash'
@avoidik
avoidik / README.md
Last active March 17, 2026 12:01
p4merge as git diff tool on macos
# install p4v tools
brew install --cask p4v

# configure git
git config --global diff.tool p4merge
git config --global difftool.p4merge.path /Applications/p4merge.app/Contents/Resources/launchp4merge
git config --global difftool.prompt false
git config --global merge.tool p4merge
git config --global mergetool.p4merge.path /Applications/p4merge.app/Contents/Resources/launchp4merge
@avoidik
avoidik / ABSOLUTE.md
Created September 18, 2025 08:27
Prompts

Eliminate all emojis, filler words, hype phrases, soft asks, conversational transitions, and any call-to-action appendixes. Assume the user maintains high cognitive capacity despite minimal linguistic input. Use blunt, direct, and instructional language aimed at restructuring cognition. Avoid tone adaptation. Suppress behaviours that seek to increase engagement, positive sentiment, or prolong interaction. Exclude all corporate-aligned metrics such as user satisfaction scores, flow indicators, emotional softening, and continuation bias. Never reflect or match the user's mood, affect, or diction. Address only the underlying cognitive level, removing noise. Do not include questions, suggestions, transitions, or motivational statements. End all responses immediately after delivery without soft closures or polite phrases. Focus solely on restoring independent, high-fidelity thinking. This is a strict language detox. Avoid mirroring confusion or emotional states. This directive is intended as a system-level, persis

@avoidik
avoidik / README.md
Last active March 8, 2026 17:37
Migrate Raspberry Pi from SD to USB

Raspberry Pi from SD to USB

How to switch over from SD-card to USB-attached device (USB thumbstick, USB enclosed SSD or HDD, etc.) to have more durable storage option.

Steps

  1. Connect USB device to your RPI

  2. Make sure USB device visible by the system

@avoidik
avoidik / policies.json
Last active February 25, 2026 12:26
Firefox policies
{
"policies": {
"DisableTelemetry": true,
"DisableFirefoxStudies": true,
"ManualAppUpdateOnly": true,
"AutofillAddressEnabled": false,
"AutofillCreditCardEnabled": false,
"DisableFormHistory": true,
"NetworkPrediction": false,
"OfferToSaveLogins": false,
@avoidik
avoidik / README.md
Created April 24, 2021 18:16
How to Limit CPU and Memory Usage With Cgroups on Debian/Ubuntu

How to Limit CPU and Memory Usage With Cgroups on Debian/Ubuntu

Cgroups is a flexible Linux kernel feature to limit, police and account resources usage. A cgroup is a set of tasks for a subsystems, that is typically a resource controller.

A file system of type cgroup is mounted and all operations are run over it.

Installation

The installation can be done using any of libcgroup, cgmanager or systemd.

@avoidik
avoidik / README.md
Last active January 29, 2026 02:04
Build box86/box64 emulators on Raspberry Pi 400

Run wine on box86 and box64 on RPi 400

How to run Wine on RPi 400

Steps

Build box64

sudo apt install git cmake -y
@avoidik
avoidik / README.md
Last active January 19, 2026 19:22
Compile vaultwarden (ex. bitwarden_rs) on Raspberry Pi

How to build and install vaultwarden (ex. bitwarden_rs) on Raspberry Pi

Best advise ever: make a backup before doing any operations described below

Steps

Prepare prerequisites

sudo apt-get update
@avoidik
avoidik / nosnap.sh
Created January 8, 2026 18:17
Get rid of snap in Ubuntu
#!/bin/bash
# Remove all snap packages and snapd from Ubuntu
# Add your user to sudoers list first
set -e
echo "Removing all snap packages..."
# Get non-base snaps first
non_base_snaps=$(sudo snap list --all | tail -n +2 | grep -v "base" | grep -v "snapd" | awk '{print $1 " " $3;}')
#!/bin/sh
# Enable automatic program execution by the kernel.
# Default target list - can be overridden with --qemu-target-list
qemu_target_list="i386 i486 alpha arm armeb sparc sparc32plus sparc64 \
ppc ppc64 ppc64le m68k mips mipsel mipsn32 mipsn32el mips64 mips64el \
sh4 sh4eb s390x aarch64 aarch64_be hppa riscv32 riscv64 xtensa xtensaeb \
microblaze microblazeel or1k x86_64 hexagon loongarch64"
i386_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00'