Skip to content

Instantly share code, notes, and snippets.

View csrutil's full-sized avatar
🏠
Working from home

TSAO csrutil

🏠
Working from home
View GitHub Profile
@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()
while true; do cat /proc/interrupts | grep 'CPU\|eth'; sleep 1; clear; done
curl 'http://dns.weixin.qq.com/cgi-bin/micromsg-bin/newgetdns' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/jxl,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Cookie: pgv_pvid=3065483806' \
-H 'DNT: 1' \
-H 'Pragma: no-cache' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' \