Skip to content

Instantly share code, notes, and snippets.

View ddnomad's full-sized avatar
🇺🇦
https://u24.gov.ua

ddnomad ddnomad

🇺🇦
https://u24.gov.ua
View GitHub Profile
@ddnomad
ddnomad / scrape_fakku_authors.sh
Created January 13, 2024 18:20
Scrape a list of Fakku authors who have works tagged with a specific tag
#!/usr/bin/env bash
set -euo pipefail
readonly BASE_URL_TPL='https://www.fakku.net/tags/@tag/page/@page_num'
readonly TAGS_URL='https://www.fakku.net/tags'
readonly USER_AGENT='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0'
readonly SCRIPT_USAGE="$(cat <<EOF
Usage: $0 (--print-all-tags) TAG
@ddnomad
ddnomad / automate_obsidian_plugins_and_themes_installation.md
Last active June 11, 2023 03:06
A collection of quick and dirty scripts for automating installation of plugins and themes for Obsidian.md editor

Expected directory structure for getting utility scripts properly sourced:

.
├── install_obsidian_community_plugins.sh
├── install_obsidian_themes.sh
└── utils
    ├── check_has_commands.sh
    └── print.sh
@ddnomad
ddnomad / NiftyETWProviders.json
Created March 30, 2023 14:17 — forked from mattifestation/NiftyETWProviders.json
ETW providers you never knew existed...
[
{
"ProviderGUID": "72d164bf-fd64-4b2b-87a0-62dbcec9ae2a",
"ProviderName": "AccEventTool",
"ProviderGroupGUID": "4f50731a-89cf-4782-b3e0-dce8c90476ba",
"AssociatedFilenames": [
"accevent.exe",
"inspect.exe",
"narrator.exe",
"srh.dll"
@ddnomad
ddnomad / ghetto_fan_control.sh
Last active May 22, 2024 09:46
Ghetto fan control script for Dell PowerEdge servers
#!/usr/bin/env bash
set -euo pipefail
# NOTE: Based on this: https://github.com/NoLooseEnds/Scripts/blob/master/R710-IPMI-TEMP/R710-IPMITemp.sh
# NOTE: Read more: https://www.spxlabs.com/blog/2019/3/16/silence-your-dell-poweredge-server
readonly IPMI_HOST=127.0.0.1
readonly IPMI_USER=root
readonly IPMI_PASSWORD=calvin
readonly IPMI_ENCRYPTION_KEY=0000000000000000000000000000000000000000
@ddnomad
ddnomad / ghiblidl.sh
Created October 29, 2020 16:35
Download official Ghibli wallpapers from their website without clicking things till the end of days
#!/usr/bin/env bash
# Download official Ghibli wallpapers for a given movie from their website.
# https://soranews24.com/2020/09/20/studio-ghibli-releases-400-images-from-eight-movies-free-to-download-online/
#
# Movie names:
# - marnie (When Marnie Was There)
# - kaguyahime (The Tale of The Princess Kaguya)
# - kazetachinu (The Wind Rises)
# - kokurikozaka (From Up on Poppy Hill)
# - karigurashi (Arrietty)
@ddnomad
ddnomad / pdf2docx.sh
Created July 20, 2020 11:31
Convert PDF documents to DOCX on MacOS
#!/usr/bin/env bash
set -euo pipefail
readonly LIBRE_OFFICE_EXEC=/Applications/LibreOffice.app/Contents/MacOS/soffice
function main {
if test "$(uname)" != 'Darwin'; then
echo "[X] This script is compatible only with MacOS"
exit 1
fi
@ddnomad
ddnomad / disktemp.sh
Last active October 29, 2020 16:36
Ghetto script to get temperatures of ZFS pool on Solaris 11
#!/usr/bin/env bash
set -euo pipefail
readonly DISK_TEMP_RE='.*\s([0-9]+ \(Min/Max [0-9]+/[0-9]+\))'
readonly ZPOOL_RE='^\s+NAME\s+STATE\s+.*$\n\s+(\w+)\s+ONLINE.*$\n.*\n(^\s+(\w+)\s+ONLINE.*$\n)+^$'
readonly SMARTCTL_CMD=/opt/csw/sbin/smartctl
readonly TABLE_FORMAT='%-10s %-20s %-8s %-25s\n'
readonly HIGH_TEMP_THRESH=41
readonly CRIT_TEMP_THRESH=50
@ddnomad
ddnomad / luks_on_lvm_arch_linux_guide.sh
Last active April 11, 2023 19:34
Arch Linux installation with a full-disk encryption (LUKS on LVM)
###############################################################################
# Author: ddnomad
# Version: 1.1.3
# Last Update: 2020-07-06
#
# External contributors:
# - u/momasf (https://www.reddit.com/user/momasf) - an excellent
# tip to use 'reflector' to speed up downloads during the base
# installation
# - eXhumer (https://github.com/eXhumer) - Fixes for things that