Skip to content

Instantly share code, notes, and snippets.

@solariz
solariz / photos.css
Created January 9, 2026 21:53
hugo photos based on pixelfed CSS File
/* Photos page styles */
.post-description a {
color: var(--primary);
text-decoration: none;
border-bottom: 1px solid var(--primary);
transition: border-color 0.2s;
}
.post-description a:hover {
@solariz
solariz / scmap-embed.htm
Created December 26, 2024 14:06
sc-map embed
<div style="position:relative;width:100%;height:100vh;overflow:hidden;">
<iframe src="https://citizen-history.com/scmap-live/" width="100%" height="100%" style="position:absolute;top:0;left:0;border:none;overflow:hidden;margin:0;padding:0;opacity:1;max-height:840px;" allowfullscreen loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
import os
import subprocess
import tempfile
from pathlib import Path
import shutil
import re
import json
import math # For formatting duration
# Function to check if ffmpeg/ffprobe is installed
@solariz
solariz / rescreen.cs
Last active October 21, 2025 18:52
tiny tool to move all Windows to the main Screen
/* tiny tool to move all Windows to the main Screen
* https://tcpip.wtf/en/rescreen-tool-to-move-all-windows-to-your-win-main-screen.htm
*/
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace rescreen
{
class Program
@solariz
solariz / RkLunch.sh.patch
Created April 28, 2025 17:44
JetKVM MAC Addr fix option
--- RkLunch.sh 2025-04-28 19:17:20.025086093 +0200
+++ RkLunch-fix.sh 2025-04-28 19:39:21.829015245 +0200
@@ -41,27 +41,35 @@
echo "$mac"
}
+create_new_mac() {
+ # Generates a locally administered MAC: 02:XX:XX:XX:XX:XX
+ octets=$(hexdump -n5 -e '5/1 "%02X "' /dev/urandom)
+ set -- $octets
@solariz
solariz / winboot.sh
Created October 28, 2023 17:54
Boot from Windows
#!/bin/bash
# Tiny little helper script to automatically grab the boot ID
# from grub.cfg and force to boot into windows next booth then reboot.
# https://tcpip.wtf
# Request sudo access
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
sudo "$0"
#!/usr/bin/python
## License: CC0
## Author: Marco Goetze
## Web: http://solariz.de
## Version: 1.2
## DIZ:
## Little Helper Script for Linux to make my KeePass Copy and Paste cooperate again with
## Chrome Browser.
## You need to have the latest keepass version and XSEL installed.
## Tested with:
@solariz
solariz / droplist.sh
Last active May 6, 2022 08:43
iptables droplist;
#!/bin/sh
# based on this version http://www.timokorthals.de/?p=334
# adapted by Stéphane T.
# update Marco Goetze see: https://solariz.de/en/preventive-blocking-of-bad-ips-using-iptables.htm
_ipt=/sbin/iptables # Location of iptables (might be correct)
_input=badips.db # Name of database (will be downloaded with this name)
_pub_if=eth0 # Device which is connected to the internet (ex. $ifconfig for that)
_droplist=droplist # Name of chain in iptables (Only change this if you have already a chain with this name)
_level=2 # Blog level: not so bad/false report (0) over confirmed bad (3) to quite aggressive (5) (see www.badips.com for that)
@solariz
solariz / postfix-sasl.conf
Created March 27, 2019 19:51
Fail2Ban filter for postfix authentication failures, SASL Strict
# Fail2Ban filter for postfix authentication failures
# more strict version of SASL Filter
# EXAMPLE:
# Mar 27 20:16:40 cc postfix/smtpd[959]: warning: unknown[123.123.123.123]: SASL PLAIN authentication failed:
#
[INCLUDES]
before = common.conf
[Definition]
_daemon = postfix/(submission/)?smtp(d|s)
@solariz
solariz / alexa_skill_example.php
Last active November 9, 2019 00:30
Amazon Echo / Alexa Intent example in PHP with Security validation
<?php
/* This is a simple PHP example to host your own Amazon Alexa Skill written in PHP.
In my Case it connects to my smarthome Raspberry pi Cat Feeder with two intents;
1: Dispense Food to the cats.
2: When did the Feeder last time feed the cats? Return a spoken time / date
This Script contains neccessary calls and security to give you a easy to use DIY example.
v2016.12.29
Details in my Blogpost: https://solariz.de/de/amazon-echo-alexa-meets-catfeeder.htm
*/