Skip to content

Instantly share code, notes, and snippets.

View smmr0's full-sized avatar

Summer ☀️ smmr0

View GitHub Profile
@smmr0
smmr0 / mute
Last active June 19, 2026 22:35
mute
#!/usr/bin/env sh
set -euf
operation="$(basename "$0")"
if [ "$#" -ge 1 ]; then
simple_control="$1"
shift
else
simple_control='Master'
@smmr0
smmr0 / README.md
Last active June 9, 2026 17:13
OpenSearch description documents
@smmr0
smmr0 / sunmoji
Last active July 24, 2026 18:53
sunmoji
#!/usr/bin/env sh
set -euf
script_dir="$(dirname "$(readlink -e -- "$0")")" # https://stackoverflow.com/a/29835459/16330198
default_input_f="$script_dir/sunmoji.svg"
default_input_f_square="$script_dir/sunmoji-square.svg"
is_integer() {
string="$1"
@smmr0
smmr0 / subtitles
Last active April 11, 2025 05:14
ffmpeg subtitles
#!/usr/bin/env sh
input="$1"
output="$2"
subtitle_format="$3"
subcommand="$4"
start="$5"
end="$6"
extension() {
@smmr0
smmr0 / 10-brother-mfc-l3780cdw.conf
Last active February 28, 2025 03:55
Brother MFC-L3780CDW: OpenSSH config
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
# Run `update-crypto-policies --set DEFAULT:SHA1` <https://serverfault.com/a/1095899>
@smmr0
smmr0 / keepassxc-toggle
Last active November 13, 2024 04:47
Toggle KeePassXC window
#!/usr/bin/env sh
window_id="$(xdotool search --onlyvisible --class '^keepassxc$' | tail -1)"
if [ -n "$window_id" ]; then
xdotool windowminimize "$window_id"
else
keepassxc
fi
@smmr0
smmr0 / canon-bjnp
Last active February 15, 2024 17:36
UFW application profiles
[Canon BJNP]
title=Canon BJNP
description=BJNP is a custom LAN service discovery protocol used by Canon printers and scanners. Computer systems use this protocol to auto-discover Canon devices on the network.
ports=8610:8613/tcp|8610:8613/udp
@smmr0
smmr0 / input-empty.json
Last active November 11, 2023 17:49
EasyEffects configs
{
"input": {
"blocklist": [],
"plugins_order": []
}
}
@smmr0
smmr0 / filter_with_python3_as_python
Last active October 25, 2023 16:16
Todo.txt: Action helper: Filter with `python3` as `python`
#!/usr/bin/env sh
# Mainly for use with <https://github.com/FND/todo.txt-cli/blob/1bdbdf41464826cc85e84ae8c3c17336e24a2922/futureTasks>
# Installation:
# 1. `cd "$TODO_ACTIONS_DIR"`
# 2. `mkdir -p helpers`
# 3. `mkdir -p filters`
# 4. `ln -s /path/to/filter_with_python3_as_python helpers/` (where `/path/to/filter_with_python3_as_python` is this file)
# 5. `ln -s /path/to/filter_cmd filters/` (where `/path/to/filter_cmd` is to be used as `TODOTXT_FINAL_FILTER`)
@smmr0
smmr0 / .gitignore
Last active August 8, 2024 18:28
GNOME Desktop: Custom Locale
/gnome-desktop-3.0.mo