Skip to content

Instantly share code, notes, and snippets.

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)
#
@henri
henri / rsync_wrapper_vanished_files.bash
Last active October 24, 2025 08:24
rsync vanished files removal wrapper
#!/bin/bash
rsync "$@" 2> >(grep -v vanished)
ret=$?
((ret==24)) && exit 0 || exit $ret
@henri
henri / convert_mkv_tree.bash
Last active October 24, 2025 08:32
convert mkv files into mp4 files (probably into lower quaility)
#!/bin/bash
#(C) Henri Shustak 2000
# Released Under the GNU GPLv3 or later
# https://www.gnu.org/licenses/gpl.html
# This script will batch process mkv files (or something else if you modify) and use handbreak (or something else)
# in order to reduce the quaility or convert the format. It will work on these files sequentially and
# keep tabs. If you need to carry on beyond restarts, then it would pay to alter the log file location
# so it is not deleted between reboots.
@henri
henri / 0001.crontab-dump.bash
Created August 5, 2025 02:29
crontab cheat sheet
#!/bin/bash
#
# (C)2020 Henri Shustak
# Released Under the MIT Licence
# https://mit-license.org/
#
# dump the crontab
user_name=$(whoami)
host_name=$(hostname)
@henri
henri / 000.tar_cheat_sheet.txt
Last active April 7, 2026 22:21
tar cheatsheet
# create a compressed archive from a number of sources
tar -czf compressed-archive.tar.gz /srv/source1 /srv/source2 # ...
# create a compressed archive from current directory and and preserve permissions (more important for expansion)
tar -czpf compressed-archive.tar.gz .
# list top level items for an archive which was compressed using the . as the driectory
tar -tf compressed_archive.tar.gz | awk -F "/" '{print $1 "/" $2}'| uniq
# list all .txt files in archive (better if you are hunting into large archives)