Skip to content

Instantly share code, notes, and snippets.

@jonasfroeller
jonasfroeller / remove_watermark.bat
Last active July 1, 2024 16:15
The path mapping to linux style is not working, if emojis are in the filename. Does not work well, if the watermark is white and the background is almost the same color.
@ECHO OFF
REM Set the path to WSL executable
SET WSL_EXECUTABLE=C:\Windows\System32\wsl.exe
REM Get the input and output file paths
SET "INPUT_FILE=%~1"
SET "OUTPUT_FILE=%~1_no_watermark"
REM Debugging output
@jonasfroeller
jonasfroeller / ytdlBest.bat
Last active July 1, 2024 16:14
The best ytdl config I have.
@ECHO OFF
color 0A
REM dependencies of the watermark remover
REM python -m pip install numpy scipy imageio
REM apt install python3-scipy python3-numpy python3-imageio
REM set paths
SET YOUTUBE_DL_PATH=A:\VideoDownloader\youtube-dl-nightly.exe
SET FFMPEG_PATH=C:\ProgramData\chocolatey\lib\ffmpeg\tools\ffmpeg\bin\ffmpeg.exe
{
"compilerOptions": {
"incremental": true,
"target": "ES2020",
"module": "es2020",
"allowJs": true,
"checkJs": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
@jonasfroeller
jonasfroeller / checkHealthAndMoveVideos.py
Created January 14, 2024 10:58
Loops through directories, checks the health of the videos, and if they are healthy, moves them to another directory.
import os
import shutil
import uuid
import ffmpeg
# Dependencies:
# sudo apt install ffmpeg
# pip install python-ffmpeg
def is_video(file_path):
@jonasfroeller
jonasfroeller / cicd.yml
Last active January 19, 2024 13:55
CICD Pipeline example (Quarkus backend, Webpack frontend, OracleCloud hosting)
name: CICD Pipeline (Quarkus, Webpack, OracleCloud)
on: [push]
jobs:
test-and-build-frontend:
# permissions: write-all
runs-on: ubuntu-22.04
steps:
@jonasfroeller
jonasfroeller / .drive_global_blacklist.filter
Last active July 19, 2024 17:40 — forked from drkdelaney/.drive_global_blacklist.filter
A blacklist for Synology folders and files.
[Version]
major = 1
minor = 1
[Common]
max_length = 0
max_path = 0
[File]
black_suffix = ".lnk", ".pst", ".swp", ".temp", ".tmp"
@jonasfroeller
jonasfroeller / even-columns.css
Created November 25, 2023 18:47
perfectly even columns
.even-columns {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 1fr;
}
@jonasfroeller
jonasfroeller / cloudflare-i18n-ai-worker.js
Last active December 8, 2023 20:42
cloudflare i18n worker
import { Ai } from './vendor/@cloudflare/ai.js';
export default {
async fetch(request, env) {
const ai = new Ai(env.AI);
const url = new URL(request.url);
const textParam = url.searchParams.get('text');
const inputs = {
@jonasfroeller
jonasfroeller / delete-temp_data.sh
Created June 28, 2023 16:32
deletes temporary data on the system (Linux)
#!/bin/bash
# changing to temp dir
cd /tmp
# deleting temporary files and directories
rm -rf *
read -p "Press Enter to exit..."
@jonasfroeller
jonasfroeller / delete-temp_data.bat
Created June 28, 2023 16:32
deletes temporary data on the system (Windows)
@echo off
REM setting temp path
set tmp_dir=%localappdata%\Temp
REM changing to temp dir
cd /d %tmp_dir%
REM deleting temporary files and directories
del /q /f /s *