Skip to content

Instantly share code, notes, and snippets.

@rigomate
rigomate / set-cinnamon.sh
Created February 10, 2026 23:30
Cinnamon optimal settings for left taskbar
#!/bin/bash
# Set Cinnamon panel icon sizes and panel height.
# Restart Cinnamon (Alt+F2 → cinnamon --replace) after running.
# Fullcolor (app/window icons): 22px
gsettings set org.cinnamon panel-zone-icon-sizes '[{"left":30,"center":30,"right":30,"panelId":1}]'
# Symbolic (tray/system icons): 16px
gsettings set org.cinnamon panel-zone-symbolic-icon-sizes '[{"left":20,"center":20,"right":20,"panelId":1}]'
@rigomate
rigomate / delete_non_ufw_443.sh
Last active December 13, 2024 08:12
Makes a NAT Forward rule from TCP port 443 to DEST_IP:443
#!/bin/bash
# Create a random temporary file
TEMP_FILE=$(mktemp /tmp/forward_rules.XXXXXX)
# List all rules in the FORWARD chain with line numbers
iptables -L FORWARD -n --line-numbers | grep "dpt:443" | grep -v "ufw" > "$TEMP_FILE"
# Check if any rules were found
if [[ ! -s "$TEMP_FILE" ]]; then
# Depends on
# * Python
# * Pillow (https://pypi.python.org/pypi/Pillow/3.4.2#downloads)
#
# Execute with
# http://superuser.com/questions/276154/automating-the-scanning-of-graphics-files-for-corruption
#
# Source
# http://superuser.com/questions/276154/automating-the-scanning-of-graphics-files-for-corruption
# --------------------
diskspd.exe -c10M -d360 -r -w40 -t8 -o32 -b4k -Sh -L testfile.dat