| 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 |
This file contains hidden or 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
| # reload hyperland configuration | |
| hyprctl reload | |
This file contains hidden or 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
| #!/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 |
This file contains hidden or 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
| 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 |
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.
This file contains hidden or 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
| #!/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) | |
| # |
This file contains hidden or 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 | |
| rsync "$@" 2> >(grep -v vanished) | |
| ret=$? | |
| ((ret==24)) && exit 0 || exit $ret |
This file contains hidden or 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 | |
| #(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. |
This file contains hidden or 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 | |
| # | |
| # (C)2020 Henri Shustak | |
| # Released Under the MIT Licence | |
| # https://mit-license.org/ | |
| # | |
| # dump the crontab | |
| user_name=$(whoami) | |
| host_name=$(hostname) |
This file contains hidden or 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
| # 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) |