Skip to content

Instantly share code, notes, and snippets.

@riyad
riyad / zrepl-run-and-wait-for-job-with-progress.sh
Last active December 26, 2022 19:07
Run a zrepl job and block/wait until it's finished.
#!/bin/bash
#
# Author: Riyad Preukschas <riyad@informatik.uni-bremen.de>
# License: Mozilla Public License 2.0
#
# Run a zrepl job and block/wait until it's finished (with progress indication).
#
# Note: this is basically a hack until there's a properly integrated solution for this.
# see https://github.com/zrepl/zrepl/issues/427
@andsens
andsens / bootstrap_homeshick.sh
Last active December 27, 2023 12:47
Script that can set up an entire user account with homeshick automatically
#!/bin/bash -ex
# Paste this into ssh
# curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex
# When forking, you can get the URL from the raw (<>) button.
### Set some command variables depending on whether we are root or not ###
# This assumes you use a debian derivate, replace with yum, pacman etc.
aptget='sudo apt-get'
chsh='sudo chsh'
@riyad
riyad / firewall.npt6
Last active April 25, 2024 14:56
OpenWRT firewall script to configure network prefix translation for IPv6
#!/bin/sh
#
# Author: Riyad Preukschas <riyad@informatik.uni-bremen.de>
# License: Mozilla Public License 2.0
# SPDX-License-Identifier: MPL-2.0
#
# OpenWRT firewall script for configuring NPTv6 (network prefix translation).
#
# # Installation
#