Skip to content

Instantly share code, notes, and snippets.

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

Csrutil csrutil

🏠
Working from home
  • N/A
  • Follow the white rabbit.
View GitHub Profile
@csrutil
csrutil / wr30u.md
Last active May 21, 2023 02:34
wr30u unlock

Enable ssh access from https://github.com/PatriciaLee3/wr30u_ssh

40656/A2TJ27296 / https://miwifi.dev/ssh

pswd: a912c4a4

mtd write /tmp/crash_unlock.img crash # enable debug mode
mtd erase crash # disable debug mode
@csrutil
csrutil / gist:e0f435f1cd3d52559014a03df97bbb1f
Created March 29, 2023 01:15
Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
xcrun -sdk iphoneos --show-sdk-path
https://stackoverflow.com/questions/71320584/flutter-build-ios-got-error-requested-but-did-not-find-extension-point-with-ide
@csrutil
csrutil / gist:31b30ea4fa54a45924ec4e1548df4ef8
Created March 29, 2023 00:38
Remove Duplicate Apps from Open With
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
killall Finder
@csrutil
csrutil / psqlfix.txt
Created March 13, 2023 03:54 — forked from jyr/psqlfix.txt
Change postgres default template0 to UTF8 encoding
http://blog.desgrange.net/2012/06/05/caldav-carddav-debian-davical-ios-ical.html
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
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.