Skip to content

Instantly share code, notes, and snippets.

View stylefish's full-sized avatar

stylefish

View GitHub Profile
@stylefish
stylefish / virshautomem.sh
Last active February 7, 2024 16:01
automatic memory for kvm balooning guests using virsh
#!/bin/bash
# can be intsalled as a systemd service via
# sudo systemctl edit --full --force virshautomem
#
# [Unit]
# Description=virsh auto memory allocation for ballooning vms
#
# [Service]
# ExecStart=/usr/local/bin/virshautomem.sh -d
sudo pacman -Syu
sudo pacman -S git htop micro nano remmina rustup smbclient telegram-desktop thefuck virt-manager gnome-boxes yay chromium mosquitto dotnet-runtime gnome-shell-extension-vitals-git code
sudo pamac install ttf-windows ttf-selawik geforcenow-electron tidal-hifi networkmanager-wireguard-git
rustup install stable
# install authy, rocket-chat from flatpak
# install Flat-Remix icon pack to ~/.local/share/icons
@stylefish
stylefish / debianupgrade.sh
Last active October 27, 2021 12:06
"full-upgrade" a debian to "bullseye"
#!/bin/bash
# many thanks to waja, parts taken from this gist: https://gist.github.com/waja/92947229661b2d07545adb29b992957e
dpkg-reconfigure locales
# are there 3rd party packages installed? (https://www.debian.org/releases/bullseye/amd64/release-notes/ch-upgrading.de.html#system-status)
echo "check for 3rd party packages..."
apt search '~i(!~ODebian)'
@stylefish
stylefish / cputemp.ps1
Last active January 4, 2018 17:20
OneLine PowerShell Script to Output Processor Core Temperatures in Celsius
# must be run as administrator, will fail if unsupported by bios
Get-WmiObject MSAcpi_ThermalZoneTemperature -namespace "root/wmi" | % { "Temp $($_.InstanceName.Replace('ACPI\ThermalZone\', '')): $(($_.CurrentTemperature * 10 - 27315) / 100)°C" }
# sample output:
# Temp TZ00_0: 27.85C
# Temp TZ01_0: 29.85C
@stylefish
stylefish / wpad.js
Last active December 27, 2017 15:58
A slightly more complex example of a proxy pac (wpad.dat) script file with multiple internal hosts and networks
function FindProxyForURL(url, host) {
// SETTINGS
// your proxy hostname (myproxy.mynetwork.local)
var proxyHostname = "${asg_hostname}";
var proxyPort = 8080;
// regex patterns to exclude from proxy (put your internal networks here)
var directRegexPatterns = [
"*.local/*",
"*.lan/*",

Keybase proof

I hereby claim:

  • I am stylefish on github.
  • I am stylefish (https://keybase.io/stylefish) on keybase.
  • I have a public key whose fingerprint is F786 2178 8BF8 6E12 8103 50DE BBDD C939 5747 057A

To claim this, I am signing this object: