This file contains 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
# Ansible managed | |
[Unit] | |
After=network-online.target | |
[Container] | |
ContainerName=backup | |
Image=docker.io/mazzolino/restic | |
HostName=xxx | |
Environment="RUN_ON_STARTUP=true" |
This file contains 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 | |
set -euo pipefail | |
REPO=sftp:[email protected]:restic-home/ | |
export RESTIC_CACHE_DIR=/var/cache/restic | |
restic -r $REPO --password-file=/etc/restic.key unlock |
This file contains 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
(defun debounce (time fn) | |
(let ((ready t)) | |
(lambda () | |
(interactive) | |
(when ready | |
(funcall fn) | |
(setq ready nil) | |
(run-at-time time nil (lambda () (setq ready t))))))) | |
(global-set-key (kbd "<triple-wheel-right>") (debounce "0.25 sec" #'previous-buffer)) |
This file contains 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 | |
set -euo pipefail | |
i2c_from_output() { | |
dir=$(ls -d /sys/bus/pci/devices/0000:03:00.0/drm/card*/card*-"$1"/i2c*) | |
dev=$(basename "$dir") | |
echo "/dev/$dev" | |
} |
This file contains 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
# Bazarr downloads subtitles | |
version: "3.4" | |
services: | |
bazarr: | |
image: linuxserver/bazarr:1.0.5-development | |
container_name: bazarr | |
restart: unless-stopped | |
environment: | |
- TZ=Europe/London |
This file contains 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 | |
# | |
# Requires: wg-quick from wireguard-tools package. | |
# | |
# How to configure: go on your Mullvad account page and download the | |
# Wireguard configuration for all countries. | |
# Unpack the archive at $HOME/.config/mullvad/ | |
# | |
# Then run `mullvad.sh up <2-char country code>` | |
# and `mullvad.sh down` to tear it down. |
This file contains 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 | |
set -euo pipefail | |
base_dir=$(realpath $HOME/.var/app --relative-to=$(pwd)) | |
comm -13 <(flatpak list --columns=application | sort) <(ls -1 $HOME/.var/app/ | sort) \ | |
| sed "s#^#$base_dir/#" | tr '\n' '\0' | du -sch --files0-from=- |
This file contains 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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#IfWinActive, SquadGame | |
; 0=walk, 1=hold sprint, 2=toggle sprint | |
mode := 0 |
This file contains 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
/* Hey there! Thanks for buying Cascadea. | |
Since it looks like this is your first custom style, | |
here's a few tips to get you started. | |
First, you need to write some CSS code for the site | |
you'd like to customize. That's what this handy | |
editor is for! I recommend using Safari's Web | |
Inspector to check out the layout and stylesheet | |
of the website you'd like to modify, so you can | |
figure out what you need to customize. |
This file contains 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
// ==UserScript== | |
// @name Dark mode HN | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://news.ycombinator.com/* | |
// @grant GM_addStyle | |
// ==/UserScript== | |
(function() { |
NewerOlder