Skip to content

Instantly share code, notes, and snippets.

View thibaultmol's full-sized avatar

Thibault Molleman thibaultmol

View GitHub Profile
@thibaultmol
thibaultmol / Billit enhancer
Last active December 30, 2024 09:14
Breex Snelle invoer chatgpt api
//see other scripts. This is purely here for the name at the top
@thibaultmol
thibaultmol / design.css
Created December 11, 2024 09:40
Bad kagi custom css for brutalist design
/* Brutalist Kagi Terminal Theme */
:root {
--bg-color: #1E1E1E;
--text-color: #E0E0E0;
--link-color: #6EA4FF;
--index-color: #6EA4FF;
--border-color: #333333;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thibaultmol
thibaultmol / comparevids.html
Created October 17, 2024 14:19
Simple HTML page to compare two subtitle files
<link href="https://vjs.zencdn.net/7.20.3/video-js.css" rel="stylesheet" />
<script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
<!-- Display text above each video -->
<p>The Largev3 Subs Video:</p>
<video
id="my-video"
class="video-js"
controls
preload="auto"
@thibaultmol
thibaultmol / dmca-domain-block-list.csv
Last active October 9, 2024 21:15
Domains we've suspended on en.osm.town because of the oct 2024 'dmca' spam wave
#domain #severity #reject_media #reject_reports #public_comment #obfuscate
misskey.suzuri.jp suspend false false 'DMCA' spam wave false
kitsui.life suspend false false 'DMCA' spam wave false
wb.zhtlovelp.homes suspend false false 'DMCA' spam wave false
piclub.social suspend false false 'DMCA' spam wave false
morale.ch suspend false false 'DMCA' spam wave false
mk.hoshisaki-h.com suspend false false 'DMCA' spam wave false
misskey.pepabo.com suspend false false 'DMCA' spam wave false
comingto.org suspend false false 'DMCA' spam wave false
catcore.life suspend false false 'DMCA' spam wave false
@thibaultmol
thibaultmol / PDFpagedelete.sh
Last active August 3, 2023 16:04
Bash script to remove all empty pages from any pdf in the current directory
#!/bin/bash
# Ensure the required tools are installed
command -v pdfimages >/dev/null 2>&1 || { echo >&2 "pdfimages (poppler-utils) is required but it's not installed. Exiting."; exit 1; }
command -v convert >/dev/null 2>&1 || { echo >&2 "convert (ImageMagick) is required but it's not installed. Exiting."; exit 1; }
command -v tesseract >/dev/null 2>&1 || { echo >&2 "tesseract is required but it's not installed. Exiting."; exit 1; }
command -v pdftk >/dev/null 2>&1 || { echo >&2 "pdftk is required but it's not installed. Exiting."; exit 1; }
count_letters() {
echo "$1" | grep -o -i '[a-z]' | wc -l
@thibaultmol
thibaultmol / Open magazine.js
Created June 24, 2023 06:43
Solution for opening a magazine on a Lemmy/Kbin from a different instance
javascript:(function(){let prefix='https://kbin.social/m/';let url=window.location.href;let parts=url.split('/');let finalPart=parts[parts.length-1];let host=parts[2];let newURL=prefix+finalPart+'@'+host;window.open(newURL,'_blank');})();
@thibaultmol
thibaultmol / obsidian-remote reddit user help.sh
Created March 15, 2023 17:26
reply to Reddit user rergarding obsidian remote
#!/bin/bash -x
# This is a reply to https://www.reddit.com/r/ObsidianMD/comments/11rw50n/comment/jcagzq4/?utm_source=reddit&utm_medium=web2x&context=3
echo "Updating the package list and installing Docker..."
sudo apt-get update
sudo apt-get install -y docker.io
echo "Installing Nginx Proxy Manager (NPM) in a Docker container..."
sudo docker run -d --name npm -p 81:81 -p 443:443 -v npmdata:/data --restart always jlesage/nginx-proxy-manager
echo "Waiting for NPM to start up before proceeding..."
@thibaultmol
thibaultmol / trimvideo.ps1
Created January 18, 2023 10:36
Trim video without re-encode
function Download-FFmpeg {
# Download FFmpeg from the official website
$url = "https://ffmpeg.org/releases/ffmpeg-latest-win64-static.zip"
$output = "$env:TEMP\ffmpeg.zip"
Invoke-WebRequest -Uri $url -OutFile $output
# Extract the files
Expand-Archive -Path $output -DestinationPath $env:TEMP
# Add FFmpeg to the system PATH
@thibaultmol
thibaultmol / split-geojson-grid.py
Created January 4, 2023 20:23
Python script to split output from geojson-grid to seperate files
import json
from shapely.geometry import Polygon
# Generate geojson grid https://cityofaustin.github.io/geojson-grid/ and save it as grid.json
# Load the input file
with open("grid.json", "r") as f:
data = json.load(f)
# Iterate through the features