Skip to content

Instantly share code, notes, and snippets.

View shorts-redirect.user.js
// ==UserScript==
// @name Youtube shorts redirect
// @namespace Violentmonkey Scripts
// @match *://**
// @grant none
// @version 1.0
// @author belst
// @description 9/22/2022, 1:26:47 PM
// ==/UserScript==
belst / index.html
Last active February 6, 2019 16:30
Visualization of env data
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Weather API</title>
body {
margin: 0 auto;
#!/usr/bin/env bash
screen -dmS "$SERVERNAME" bash -c "cd $SERVERHOME; until ./$STARTSCRIPT; do echo 'Server crashed. Restarting...'; done;";
belst /
Last active November 15, 2023 15:12
Deploy Rocket in production

Deploy Rocket using Letsencrypt and nginx


This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.


You need to have nginx, certbot and rust installed.

belst /
Last active April 15, 2019 14:25
Incremental rsync backup script
#!/usr/bin/env bash
TARGET="backup:~/backup/home/belst/" # Trailing / is needed
TODAY=$(date +%Y-%m-%d)
ssh backup mkdir -p "${TARGET#*:}${TODAY}"
rsync -avR --delete "${SOURCE}" "${TARGET}${TODAY}/" --link-dest="${TARGET#*:}last"
ssh backup ln -nsf "${TARGET#*:}${TODAY}" "${TARGET#*:}last"
belst / monky.hs
Last active April 9, 2017 09:00
Config for
View monky.hs
{-# LANGUAGE OverloadedStrings #-}
import Monky
import Monky.Modules
import Monky.Examples.Sound.Alsa
import Monky.Examples.CPU
import Monky.Examples.Memory
import Monky.Examples.Time
import Monky.Examples.Battery
import Monky.Examples.Disk
View cratesreadme.user.js
// ==UserScript==
// @name Readme
// @namespace
// @version 0.1
// @description loads Readme files from github and displays them in the crate info area
// @author belst
// @match*
// @require
// @grant none
// ==/UserScript==
belst /
Last active February 13, 2018 14:53

Keybase proof

I hereby claim:

  • I am belst on github.
  • I am belst ( on keybase.
  • I have a public key ASAc2YKUIPP9fnR1aq3gaCE4giPzWlqBPLTHKX2Hb2LVMgo

To claim this, I am signing this object:

belst /
Created March 28, 2016 15:46
Inlines Cert and Key files into open vpn config
#!/usr/bin/env bash
IP=$(hostname -I | cut -f1 -d' ');
if [ -z "$1" ]; then
echo "usage: $0 <configname>";
exit 1;
echo 'Adding IP and creating config';