Skip to content

Instantly share code, notes, and snippets.

@marco79cgn
marco79cgn / check-tc-certificates.sh
Last active December 29, 2024 11:00
Teddycloud certificates checker
certs_path="/teddycloud/certs"
echo "-----------------------------------"
echo "Checking teddyCloud certificates..."
echo "-----------------------------------"
# check server certificates
files=( "ca.der" "ca-key.pem" "ca-root.pem" "ca-root.srl" "teddy-cert.pem" "teddy-key.csr" "teddy-key.pem" )
echo -e "\nServer:"
echo "-------"
for file in "${files[@]}"
@hfs
hfs / LICENSE.md
Last active July 15, 2024 14:59
OpenStreetMap landuse areas in Germany which don’t contain any buildings, but are expected to. Data from: 2021-01-30.

This data is derived from OpenStreetMap.

Ⓒ OpenStreetMap contributors

The data is published under the terms of the Open Database License.


ODC Open Database License (ODbL)

@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active May 11, 2026 03:37
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@ThomasLeister
ThomasLeister / delete-ejabberd-accounts-list.sh
Created May 9, 2020 20:41
Delete Ejabberd accounts by JID list
##
## Create a "spammers.txt" file with all the JIDs (Jabber IDs) to delete. One in each line:
## user1@server.tld
## user2@server.tld
## user3@server.tld
## ...
## then run this command:
cat spammers.txt | xargs -L1 -i bash -c 'jid={}; name=${jid%@*}; domain=${jid##*@}; ejabberdctl unregister $name $domain; echo "deleted $jid"'
@ThomasLeister
ThomasLeister / auto-start-tmux-ssh.txt
Last active October 2, 2025 18:22
Put this into your .bashrc to auto-start a tmux session after SSH login
Put these lines into your server's .bashrc:
##
## TMUX auto attach
##
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then # if this is an SSH session
if which tmux >/dev/null 2>&1; then # check if tmux is installed
if [[ -z "$TMUX" ]] ;then # do not allow "tmux in tmux"
ID="$( tmux ls | grep -vm1 attached | cut -d: -f1 )" # get the id of a deattached session
if [[ -z "$ID" ]] ;then # if not available create a new one
tmux new-session
@ThomasLeister
ThomasLeister / mastodon-tootctl-media-purge.txt
Created February 21, 2019 19:07
How to automatically remove cached media files older that 7 days from your Mastodon instance
This is how to automatically delete cached image previews from your Mastodon instance if they are older than 7 days.
Log in as your "mastodon" User or log in as root and then change to the "mastodon" user, who runs Mastodon:
# su - mastodon
Open crontab:
$ crontab -e
... and add these lines to your crontab:
@brannow
brannow / TempSensor.cs
Created January 22, 2018 15:05
C# USB Temperature Sensor Tester Interface for DS18B20
// see: https://github.com/mikeobrien/HidLibrary/tree/master/src/HidLibrary
using HidLibrary;
using System;
using System.Linq;
using System.Runtime.InteropServices;
namespace Environment.HardwareData.SensorData
{
class TempSensor
{
@thies23
thies23 / wifionice.py
Last active March 3, 2019 01:08
wifionice
import urllib.request
import subprocess
import psutil
import time
import socket
class BahnWifi:
def __init__(self):
self.loginUrl = 'http://www.wifionice.de/?login'
self.logoutUrl = 'http://www.wifionice.de/?logout'
@mipapo
mipapo / runalyzequeue.service
Created March 19, 2017 11:13
Runalyze Queue
[Unit]
Description=RUNALYZE queue
After=network.target
[Service]
Type=simple
User=www-data #adjust the user
WorkingDirectory=/var/www/example.runalyze.com/htdocs/
ExecStart=/usr/bin/php /var/www/example.runalyze.com/htdocs/bin/console runalyze:queue:consume --env=prod
Restart=always
@bep
bep / hugo-on-android.md
Last active March 30, 2026 21:01
Run Hugo on an Android phone

First install Termux

Then there are two options:

Build from source

Open the Termux terminal on your Android device and copy-and-paste the commands listed below and hit ENTER: