Skip to content

Instantly share code, notes, and snippets.

adb shell pm list packages -3 > wear-os-packages-out.txt
mkdir ~/wear-os-backup
#!/bin/zsh
set -x
BACKUP_DIR=~/wear-os-backup
PACKAGE_LIST_FILE=~/wear-os-packages-out.txt
@nutrino
nutrino / Rocky-Vault-8.10.repo
Created January 24, 2025 09:35
/etc/yum.repos.d/Rocky-Vault-8.10.repo
[baseos-8.10]
name=Rocky Linux 8.10 - BaseOS
baseurl=http://dl.rockylinux.org/pub/rocky/8.10/BaseOS/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
[appstream-8.10]
name=Rocky Linux 8.10 - AppStream
baseurl=http://dl.rockylinux.org/pub/rocky/8.10/AppStream/$basearch/os/
@nutrino
nutrino / networked pulseaudio.md
Created January 17, 2025 06:30 — forked from xarinatan/networked pulseaudio.md
How to set up PulseAudio over Network

How to set up PulseAudio over Network

PulseAudio actually has great networking capabilities. Especially when combined with Avahi/Zeroconf it is especially easy to set up, though technically it should also be possible without.

Setting up the server

  • Open /etc/pulseaudio/default.pa
  • At the end of the file, add load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.254.0/24 auth-anonymous=1 to activate networked audio from 192.168.254.0-255 without needing authentication.
  • Kill pulseaudio, it should be auto-restarted, or restart your login session to activate the changes. You should now be able to set PULSE_SERVER=192.168.254.XXX and have the remote audio working! If not check the firewall settings, PulseAudio seems to open a random port by default.

Setting up automatic configuration and discovery

  • On both the server and client, install pulseaudio-module-zeroconf and avahi, then after installing make sure Avahi always runs by running systemctl enable --now avahi-daemon
@nutrino
nutrino / contemplative-llms.txt
Created January 10, 2025 02:26 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@nutrino
nutrino / yumdown_86.sh
Created January 8, 2025 10:59
yum (dnf) downloader for offline installation
#!/bin/bash
set -x #echo on
PKG=$1 # NAME OF THE PACKAGE TO INSTALL ON OFFLINE MACHINE
rm /tmp/modules-$PKG.yaml
rm -rf /tmp/$PKG
rm -rf /tmp/$PKG-installroot
mkdir /tmp/$PKG
mkdir /tmp/$PKG-installroot
yum install -y --downloadonly --installroot=/tmp/$PKG-installroot --releasever=8.6 --downloaddir=/tmp/$PKG $PKG
@nutrino
nutrino / vcpkg_commands.sh
Last active March 3, 2024 23:36
vcpkg commands
# Initialize
./bootstrap-vcpkg.sh -disableMetrics
# Export (online PC)
./vcpkg export [pkg_names] --zip
# Import (vcpkg folder of offline PC)
unzip [zip_file_name]
# Remove all packages including 'boost'
@nutrino
nutrino / macos_scripts.sh
Created May 8, 2023 16:13
macOS useful scripts
# Network scripts
nslookup www.naver.com
nslookup www.naver.com 8.8.8.8
dig www.naver.com
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper
@nutrino
nutrino / network-monitor.sh
Last active March 22, 2023 23:45
Linux network usage monitoring
#https://www.tecmint.com/linux-network-bandwidth-monitoring-tools/
nload
sudo iftop
sudo nethogs
sudo iptraf
@nutrino
nutrino / fix_unmatched_cpu_affinity.sh
Created March 15, 2023 09:20
Set unmatched CPU affinity with the help of the ChatGPT
#!/bin/bash
# Use a while loop to read each line of output from ps
while read -r line; do
if [[ $line == *-cpu* ]]; then
#echo "$line"
pid=$(echo $line | awk '{print $1}')
no=$(echo $line | awk '{print $2}')
cmd=$(echo $line | awk '{$1=$2=""; print $0}')
cpu=$(echo $cmd | grep -oE '\-cpu [0-9]+' | awk '{print $2}')
@nutrino
nutrino / docker commands
Created March 4, 2023 14:01
Docker commands
docker exec -u 0 -it {ContainerName} bash