Take a snapshot of the zpool you wish to backup
zfs snapshot tank@backup-jan-2020| #!/bin/bash | |
| while :; do | |
| verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1) | |
| pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1) | |
| ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))") | |
| # ------------------------------------------------ | |
| # Config files are located in /etc/wireguard/wg0 | |
| # ------------------------------------------------ | |
| # ---------- Server Config ---------- | |
| [Interface] | |
| Address = 10.10.0.1/24 # IPV4 CIDR | |
| Address = fd86:ea04:1111::1/64 # IPV6 CIDR | |
| PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started | |
| PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown |
| #=============================================================================== | |
| # 2019-07-19-- ikashnitsky.github.io | |
| # Reproduce Figure 2 from http://doi.org/10.1007/s10708-018-9953-5 | |
| # Ilya Kashnitsky, [email protected] | |
| #=============================================================================== | |
| library(tidyverse) | |
| library(hrbrthemes); import_roboto_condensed() | |
| # the data as tribble |
| This gist I write, because I couldn't find step by step instructions | |
| how to install and start postgresql locally (using conda within a conda environment - with the result | |
| that you can run it without sudo/admin rights on your machine!) | |
| and not globally in the operating system (which requires sudo/admin rights on that machine). | |
| I hope, this will help especially people new to postgresql (and those who don't have sudo/admin rights on a specific machine but want | |
| to run postgresql there)! | |
| #################################### | |
| # create conda environment |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <!-- | |
| Noto Mono + Color Emoji Font Configuration. | |
| Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole. | |
| Usage: | |
| 0. Ensure that the Noto fonts are installed on your machine. | |
| 1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf |
| Backup: | |
| docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
| Restore: | |
| cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
| Byobu is a suite of enhancements to tmux, as a command line | |
| tool providing live system status, dynamic window management, | |
| and some convenient keybindings: | |
| F1 * Used by X11 * | |
| Shift-F1 Display this help | |
| F2 Create a new window | |
| Shift-F2 Create a horizontal split | |
| Ctrl-F2 Create a vertical split | |
| Ctrl-Shift-F2 Create a new session |
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.