Skip to content

Instantly share code, notes, and snippets.

View mlauronen's full-sized avatar

mlauronen

  • Finland
View GitHub Profile
@mlauronen
mlauronen / luks
Last active September 27, 2025 04:57
A script to create, mount and unmount an encrypted directory. Uses secret-tool for passwords.
#!/bin/bash
set -e
NAME="$1"
ACTION="$2"
SIZE_MB="${3:-500}" # default 500MB if not provided
if [[ -z "$NAME" || -z "$ACTION" ]]; then
echo "Usage: $0 <name> <create|mount|unmount> [size_in_MB]"
@mlauronen
mlauronen / setw
Last active September 6, 2025 05:49
Tile and set X Windows in Linux
#!/bin/bash
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the