Skip to content

Instantly share code, notes, and snippets.

@smmr0
smmr0 / do-app-update
Last active October 4, 2021 00:26
do-app-update
#!/usr/bin/env sh
set -e
app_name="$1"
app_id="$(doctl apps list --format 'Spec.Name,ID' | tail -n +2 | awk -v "app_name=$app_name" '$1 = $app_name { print $2 }')"
tempfile="$(mktemp --tmpdir "do-$app_name-XXXXXXXXXX.yaml")"
trap 'rm -f "$tempfile"' EXIT
@smmr0
smmr0 / betterbird
Last active July 23, 2023 19:01
Firefox Developer Edition/Betterbird: Desktop friendlier
#!/usr/bin/env sh
# Prerequisites:
# - flatpak override --filesystem=~/.thunderbird eu.betterbird.Betterbird
# - flatpak override --filesystem=~/.local/bin/betterbird:ro --share=network com.ulduzsoft.Birdtray
unset $(env | cut -d '=' -f 1 | grep -E '^SNAP(_|$)')
if command -v flatpak-spawn > /dev/null 2>&1; then
exec /usr/bin/flatpak-spawn --host "$0" "$@"
@smmr0
smmr0 / userChrome.css
Last active July 23, 2023 19:02
Firefox: User chrome
/* Moved to https://gist.github.com/smmr0/2463f83c858f7af7ba018a19e8fa07df#file-userchrome-css */
@smmr0
smmr0 / .gitconfig-organization.local
Last active May 24, 2023 23:27
Git: Organization config
[user]
name = …
email = …
signingkey =
@smmr0
smmr0 / logid.cfg
Last active May 24, 2023 23:17
logiops config
devices: (
{
name: "Wireless Mouse MX Master 3";
hiresscroll: {
hires: true;
invert: false;
target: false;
};
buttons: (
{
@smmr0
smmr0 / README.md
Last active June 8, 2024 22:57
Ubuntu: Custom locale
  1. sudo mv /usr/share/i18n/locales/en_US{,@old}
  2. sudo cp en_US /usr/share/i18n/locales/
  3. sudo dpkg-reconfigure locales
  4. Reboot
@smmr0
smmr0 / analog-output.conf.common.patch
Last active October 30, 2022 20:15
ASUS ZenBook 3 Deluxe UX490UA: Ubuntu: Volume controls
# https://askubuntu.com/a/917257
--- analog-output.conf.common 2021-11-07 18:13:46.834763904 -0600
+++ analog-output.new.conf.common 2021-11-07 18:14:54.876504851 -0600
@@ -134,12 +134,23 @@
; # numbering schemes, so we can't hardcode the full jack name in our configuration
; # files.
+[Element Master]
+switch = mute
+volume = ignore
@smmr0
smmr0 / addons_extensions_plugins_and_themes.md
Last active July 30, 2023 18:27
Addons, extensions, plugins, and themes
@smmr0
smmr0 / .gitignore
Last active June 8, 2024 22:59
GNOME Desktop: Custom Locale
/gnome-desktop-3.0.mo
@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`)