Skip to content

Instantly share code, notes, and snippets.

@henri
henri / dict_setup_cheat_sheet.txt
Last active November 17, 2025 19:58
dictonary setup cheatsheet linux
# install on debian dirivitve (commdn line program)
sudo apt install dict dictd dict-gcide dict-wn
# look up english word
dict "word"
# lookup word just int he collabrative internation dictonary of Ensligh
dict -d gcide "hello"
@henri
henri / txt-2-speech-english-local.bash
Last active December 8, 2025 04:16
elevenlabs.io and localai.io API scripts
#!/bin/bash
#
# (C)Copyright 2025
# Henri Shustak
# Released Under the MIT licence
#
# Script which takes text via standard in and generates an audio file and then plays that audio file.
# Text to speach is processed via LocalAI API. You will require a API Key to get a valid response
# You will also need to setup LocalAI and specify your the host and port number (within the URL varable).
# Learn more about LocalAI : https://localai.io/
@henri
henri / parecord_cheatsheet.txt
Created October 24, 2025 01:06
parecord cheatsheet (record and play audio)
# list audio soruces # look for .minitor
pactl list short sources
# record in flac
parecord --channels=2 --file-format=flac --device=your.monitor output.flac
# play back flac
parecord -play output.flac
# play back with play
@henri
henri / ssh_tunnel_cheatsheet.txt
Last active October 23, 2025 09:31
ssh tunnel cheatsheet
#
# ssh using the -N falg for establishing a tunnel is great.... but somtimes it is difficult to know if authentication has
# been successful (especially if you have any kind of extended login delays setup on a remote system) and you are
# authenticating with a password (did I type that correctly).
#
# this approach requires little additional setup and prevents lots of verbosity regarding the login.
#
# recive notification that authentication succeeded - bash
ssh -v <user>@<remote-host> -p <port> -L <localport>:<tunnel-host>:<remoteport> -N 2> >(grep Authenticated >&2)

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@henri
henri / 010.hyperland_cheatsheet.txt
Last active October 16, 2025 09:11
hyperland cheatsheet
# reload hyperland configuration
hyprctl reload
@henri
henri / port_status.bash
Last active March 31, 2026 00:53
email port status change
#!/usr/bin/env bash
PATH=/bin:/usr/bin
#
# (C)Copyright 2025 Henri Shustak
#
# Licence : GNU GPLv3 or later
# https://www.gnu.org/licenses/gpl-3.0.html
#
#
# About : Check if a specific port is up or down on a specific host
@henri
henri / ruby-negative-space.ruby
Created October 1, 2025 21:25
negative space programming example snippits
def calculate_area(width, height)
raise TypeError, "Width must be a number" unless width.is_a?(Numeric)
raise TypeError, "Height must be a number" unless height.is_a?(Numeric)
raise ArgumentError, "Width must be positive" unless width > 0
raise ArgumentError, "Height must be positive" unless height > 0
width * height
end
@henri
henri / 001.browsers_cheatsheet.md
Last active March 26, 2026 20:56
browsers cheatsheet (many different browsers)

Browser Cheatsheets

This set of cheat sheets is designed to assist you with using various browsers. Little tips and trickes may not know and which I will not remember. Leave a comment or start a discussion if you have something good to add to the list.

Links

@henri
henri / memory_monitor.bash
Last active December 14, 2025 22:19
memory_monitor.bash
#!/usr/bin/env bash
#
# memory monitor script
# Henri Shustak
# (C) 2022 GNU GPL v3 or later
#
#
# version 1.0 initial release
# version 1.1 report once every 12 hours (unless the state changes back to normal)
#