This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on https://fedoramagazine.org/hibernation-in-fedora-36-workstation/ | |
set -eo pipefail | |
ZRAM_KBYTES=$(cat /proc/swaps | grep zram0 | sed -E 's/\s+/\t/g' | cut -f 3) | |
TOTAL_RAM=$(free -k | egrep ^Mem: | sed -E "s/ +/\t/g" | cut -f2) | |
TOTAL_ZRAM=0 | |
UNCOMPRESSED_RAM=${TOTAL_RAM} | |
for ZRAM in ${ZRAM_KBYTES}; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Spotify song recorder. Records songs played back with Spotify to ~/Music, as MP3 files with correct-ish ID3 tags. | |
# Songs are organized by album, one directory per album. | |
# Only works on Linux with pulseaudio (or pipewire). | |
# | |
# For Ubuntu users: apt install sox libsox-fmt-mp3 id3 | |
# TODO: record into playlist directory instead of album | |
LAST_FILENAME="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Filename: update-hosts.sh | |
# | |
# Author: George Lesica <george@lesica.com> | |
# Enhanced by Eliastik ( eliastiksofts.com/contact ) | |
# Version 1.3 (22 april 2021) - Eliastik | |
# | |
# Description: Replaces the HOSTS file with hosts lists from Internet, | |
# creating a backup of the old file. Can be used as an update script. |