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 | |
initfile_name="rclonesync-init.txt" | |
watch=0 | |
watch_interval=-1 | |
watch_timeout=30 | |
cmd="" | |
remote="" |
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
[Unit] | |
Description=rclone sync (dropbox-maddy) | |
Documentation=http://rclone.org/docs/ | |
After=network-online.target | |
[Service] | |
ExecStart=rclonesync-daemon -r dropbox-maddy:/Documents -s /home/maddy/Dropbox -w -t 30 -i 120 -u maddy sync | |
Restart=on-failure | |
RestartSec=5 |
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 | |
declare sway_lsof_f="/dev/null" | |
declare -i sleep_duration=1 | |
declare -i sway_pid | |
sway_pid="$(pgrep -x sway)" || { | |
echo "sway process not found" >&2 | |
return 1 | |
} |
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 | |
mlnew="/etc/pacman.d/mirrorlist.pacnew" | |
mldest="/etc/pacman.d/mirrorlist" | |
if [[ ! -f "$mlnew" ]]; then | |
echo "mirrorlist is up-to-date" >&2 | |
exit | |
fi |
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 | |
n="${1:-1}" | |
output="$( | |
curl -s "https://www.archlinux.org/feeds/news/" \ | |
| xmlstarlet sel -T -t -m /rss/channel/item -v "concat(pubDate,': ',title)" -n \ | |
| head -n "$n" | |
)" | |
echo -e "\e[1;31mhttps://www.archlinux.org/" | |
echo "$output" | |
echo -en "\e[0m" |
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
server { | |
listen 8000; | |
# user to redirect to if none is passed in the URL | |
# set to the empty string ("") to disable | |
set $default_user maddy; | |
# Private user directories, e.g. localhost:8000/~user/private/secrets.txt | |
location ~ ^/~(.+?)/private(/.*)?$ { | |
auth_basic "Private directory for ~$1"; |
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 | |
# Helper for yglu to assist with importing yaml files into the document | |
# root. | |
# | |
# Depends: yglu - https://github.com/lbovet/yglu/ | |
# | |
# Copyright (c) 2020 Maddison Hellstrom (github.com/b0o) | |
# | |
# This program is free software: you can redistribute it and/or modify |
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 | |
# iqalc = fzf + qalc ^ love | |
# | |
# (c) 2020 Maddison Hellstrom (github.com/b0o) | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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 | |
# | |
# ag with logical AND of multiple searches | |
# | |
# Copyright (C) 2020 Maddison Hellstrom <https://github.com/b0o> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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
module { | |
name: "neuron-autoindex", | |
version: "0.1.0", | |
description: "generate hierarchical indices for neuron notes", | |
authors: ["Maddison Hellstrom <[email protected]>"], | |
license: "GPL-3", | |
}; | |
def invert_tags: | |
. |