Website: mau.fi
Matrix: @tulir:maunium.net
Email: tulir@maunium.net
PGP key: 05838CAF9C817F234245D948BBA0F996FDDCE9AE
Old key: 27B368B425431BDA851B1D4C513CB62B324C2F47
GitHub: tulir
GitLab: mau.dev
Telegram: @tulir
Twitter: @tulir293
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 | |
if [[ -z "$HOMESERVER" ]]; then | |
echo "Please set the HOMESERVER environment variable to the C-S API URL (e.g. https://matrix.org)" | |
exit 1 | |
elif [[ -z "$ACCESS_TOKEN" ]]; then | |
echo "Please set the ACCESS_TOKEN environment variable to your access token" | |
exit 1 | |
elif [[ -z "$1" ]]; then | |
echo "Usage: $0 <alias without #>" | |
exit 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 | |
cd /var/www | |
old_version="v$(cat riot/version)" | |
version="latest" | |
if [[ ! -z "$1" ]]; then | |
version="tags/$1" | |
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 | |
if [ -z "$MATRIX_HOMESERVER" ]; then | |
read -p "Enter homeserver URL: " MATRIX_HOMESERVER | |
fi | |
base_url="$MATRIX_HOMESERVER/_matrix/client/r0" | |
if [ -z "$MATRIX_ACCESS_TOKEN" ]; then | |
read -p "Enter access token: " MATRIX_ACCESS_TOKEN | |
fi | |
auth="Authorization: Bearer $MATRIX_ACCESS_TOKEN" | |
resp=$(curl -s -H "$auth" "$base_url/account/whoami") |
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
u2f_keys: | |
- Output of `pamu2fcfg` without the username prefix | |
- Supports multiple entries (add a colon after each entry except the last) | |
u2f_rules_path: https://raw.githubusercontent.com/Yubico/libu2f-host/master/70-u2f.rules | |
u2f_rules_checksum: sha256:c9998bb23f4c87d1469e5754f321138ad164e67d734dcb6a3ff2520f8f683448 |
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
#!/usr/bin/python | |
from ansible.module_utils.basic import * | |
def _set_value(module, path, value): | |
val = module.run_command(["dconf", "write", path, value])[1].strip() | |
def _get_value(module, path): |
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
#!/usr/bin/python | |
import subprocess | |
from ansible.module_utils.basic import * | |
def get_installed(links=False): | |
packages = {} | |
output = subprocess.check_output([ |
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 | |
# Git checker - A script to recursively find and check the status of Git repositories | |
# Copyright (C) 2016-2018 Tulir Asokan | |
# 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 program is distributed in the hope that it will be useful, |