Skip to content

Instantly share code, notes, and snippets.

View csrutil's full-sized avatar

TSAO csrutil

View GitHub Profile
apt-get install musl-tools
git clone --depth 1 https://github.com/Macchina-CLI/macchina -b v6.1.8
rustup target add x86_64-unknown-linux-musl
cargo build --target x86_64-unknown-linux-musl --release
TARGET_CC=x86_64-linux-musl-gcc cargo build --release --target x86_64-unknown-linux-musl
@csrutil
csrutil / remove old kernels
Created February 25, 2023 14:02
remove old kernels
dpkg --list| grep 'pve-kernel-.*-pve' | awk '{print $2}' | sort -V
dpkg --list| grep 'linux-image' | awk '{print $2}' | sort -V
apt purge -y linux-image-5.10.0-19-amd64
@csrutil
csrutil / disable_cpu.sh
Last active February 25, 2023 11:56
disable_cpu
disable_cpu() {
cpuid=$1
flag=$2
echo $flag > "/sys/devices/system/cpu/cpu$cpuid/online"
}
disable_cpu 6 1
disable_cpu 7 1
disable_cpu 8 1
disable_cpu 9 1
@csrutil
csrutil / powersave
Created February 7, 2023 12:56
scaling_governor
echo powersave > /tmp/scaling_governor
/etc/cron.hourly/scaling_governor
# after the virtual disk has already been expanded (e.g. in proxmox)
apk add --no-cache cfdisk e2fsprogs-extra openssh-client
# choose partition then "Resize" > "Write" (to finalize)
cfdisk
# replace * with partition you are resizing
resize2fs /dev/*
@csrutil
csrutil / Update Kernel parameters
Created February 5, 2023 08:57
Update Kernel parameters alpine
Update Kernel parameters[edit | edit source]
Edit /etc/update-extlinux.conf, and change the value at default_kernel_opts.
Run update-extlinux to update grub.
@csrutil
csrutil / AMD Ryzen 5 3600 6-Core Processor.txt
Last active February 25, 2023 11:27
AMD Ryzen 5 3600 6-Core Processor 7z
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,12 CPUs AMD Ryzen 5 3600 6-Core Processor (870F10),ASM,AES-NI)
AMD Ryzen 5 3600 6-Core Processor (870F10)
CPU Freq: - - - - - - - - -
RAM size: 15929 MB, # CPU hardware threads: 12
RAM usage: 2647 MB, # Benchmark threads: 12
Compressing | Decompressing
app_episodes-index-config.yaml
COPY (
select
json_build_object(
'episode_id', id,
'title', REPLACE(
REPLACE(title, '"', ''),
'\n',''
),
/home/deck/.local/share/Steam/steamapps/compatdata/1174180/pfx/drive_c/users/steamuser/Documents/Rockstar Games/Red Dead Redemption 2/Profiles
@csrutil
csrutil / parse.rb
Created December 20, 2022 11:55
tld
require 'open-uri'
require 'nokogiri'
# https://tld-list.com/tlds-from-a-z
doc = Nokogiri::HTML.parse File.read("tlds-from-a-z")
File.open("tld.txt", "w+") do |f|
doc.css(".list-az a").each do |a_tag|
f.puts a_tag.text()