Skip to content

Instantly share code, notes, and snippets.

#!/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'
@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 / kubectl-rsync
Last active August 27, 2025 10:18 — forked from tzing/kubectl-rsync
rsync over kubectl
#! /bin/bash
# This script is inspired by following scripts:
# * https://serverfault.com/a/887402
# * https://github.com/dmrub/kube-utils/blob/master/kube-rsync
set -euo pipefail
: "${KUBECTL_RSYNC_RSH:=}"
: "${KUBE_CONTEXT:=}"
: "${POD_NAMESPACE:=}"
@avoidik
avoidik / README.md
Created May 26, 2025 14:07
AWS CloudShell API

Create environment

$ jq --arg env_name 'vscode-aws-cloudshell' --arg vpc_id 'vpc-XYZ' --arg sg_id 'sg-123' --arg subnet_id 'subnet-ABC' -n \
    '.EnvironmentName = $env_name | .VpcConfig.VpcId = $vpc_id | .VpcConfig.SecurityGroupIds = [$sg_id] | .VpcConfig.SubnetIds = [$subnet_id]' | \
    curl -s --location --request POST 'https://cloudshell.eu-central-1.amazonaws.com/createEnvironment' \
    --header 'Content-Type: application/json' \
    --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \
    -H "x-amz-security-token: $AWS_SESSION_TOKEN" \
    --aws-sigv4 "aws:amz" \
@avoidik
avoidik / README.md
Last active May 26, 2025 18:22
Reviving 2 years old Kubernetes cluster

Scenario

  1. etcdadm managed etcd cluster
  2. kubeadm managed kubernetes cluster
  3. all etcd certificates have been expired (self-signed CA is okay)
  4. all kubernetes certificates have been expired

Recovery

Note: Do not forget to make backup before changing any files.

@avoidik
avoidik / Gemfile
Last active May 10, 2025 19:13
hyperfine benchmark s3 transfer
source 'https://rubygems.org'
gem 'fog-aws', '~> 3.26'
@avoidik
avoidik / script.js
Created September 23, 2024 13:54
Tampermonkey script to deal with the Amazon Q annoyances
// ==UserScript==
// @name Tame AmazonQ
// @namespace http://tampermonkey.net/
// @version 2024-09-23
// @description Tampermonkey script to suppress Amazon Q annoyances
// @author Anonymous
// @match https://docs.aws.amazon.com/*
// @match https://aws.amazon.com/*
// @grant none
// ==/UserScript==
@avoidik
avoidik / README.md
Last active January 9, 2025 17:52
QuickStart - SonarQube in Docker

Run SonarQube

$ git clone https://github.com/SonarSource/docker-sonarqube
$ cd docker-sonarqube
$ docker build -t sonarqube:9.9.4.87374 --build-arg SONARQUBE_VERSION=9.9.4.87374 -f 9/community/Dockerfile 9/community/
$ docker network create sonarqube
$ docker run --rm -i -t --name sonarqube -p 9000:9000 \
    --security-opt seccomp=unconfined --security-opt apparmor=unconfined \
    -e SONAR_SEARCH_JAVAADDITIONALOPTS='-Dbootstrap.system_call_filter=false' \
@avoidik
avoidik / policies.json
Last active August 12, 2025 11:59
Firefox policies
{
"policies": {
"DisableTelemetry": true,
"DisableFirefoxStudies": true,
"ManualAppUpdateOnly": true,
"AutofillAddressEnabled": false,
"AutofillCreditCardEnabled": false,
"DisableFormHistory": true,
"NetworkPrediction": false,
"OfferToSaveLogins": false,
@avoidik
avoidik / 1-termux-adb.md
Last active September 7, 2025 06:04 — forked from kairusds/1-termux-adb.md
Instructions for connecting Termux's android-tools adb to the current device via Wireless debugging and fixing phantom process killing

Install android-tools if you haven't already:

$ pkg update ; pkg upgrade
$ pkg install android-tools

Pair with remote or local ADB