I hereby claim:
- I am simonbru on github.
- I am simonbru (https://keybase.io/simonbru) on keybase.
- I have a public key whose fingerprint is D671 15C4 621A 5826 0F3C 181B 4151 AA35 EEEE 1E46
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python3 | |
| """ | |
| Sort todo.txt file according to multiple critera. | |
| Depends on todotxt-machine | |
| """ | |
| import argparse | |
| import datetime |
We have a web server on a box without direct access from the internet (e.g. behind a CGNAT). We want to use a box with a public IP address (such as a cheap VPS) as a gateway that will redirect HTTP traffic to the web server. We will setup a Wireguard VPN to enable bidirectional traffic between both boxes, as well as a few routing/NAT rules to redirect HTTP traffic.
Install Wireguard and wg-quick on both boxes: https://www.wireguard.com/install/
| { | |
| "log": { | |
| "version": "1.2", | |
| "creator": { | |
| "name": "Firefox", | |
| "version": "72.0" | |
| }, | |
| "browser": { | |
| "name": "Firefox", | |
| "version": "72.0" |
| import contextlib | |
| from django.utils import translation | |
| from django.utils.safestring import SafeData, SafeText | |
| def prefix_decorator(function): | |
| def prefix_wrapper(*args, **kwargs): | |
| result = function(*args, **kwargs) | |
| wrapped_result = "[[ " + result + " ]]" | |
| # if isinstance(result, SafeData): |
| import sys | |
| from django.conf import settings | |
| settings.configure( | |
| DEBUG=True, | |
| SECRET_KEY="thisisthesecretkey", | |
| ROOT_URLCONF=__name__, | |
| MIDDLEWARE_CLASSES=( | |
| "django.middleware.common.CommonMiddleware", |
| #!/bin/sh | |
| # CLI wrapper that works around a bug with Spotify's handling of URIs. | |
| # See https://community.spotify.com/t5/Desktop-Linux/Linux-Spotify-URI-only-opens-start-page/m-p/1675578#M1812 | |
| uri="$1" | |
| echo "Trying to play: \"$uri\"" | |
| if ! qdbus org.mpris.MediaPlayer2.spotify \ | |
| /org/mpris/MediaPlayer2 \ | |
| org.mpris.MediaPlayer2.Player.OpenUri \ |