Skip to content

Instantly share code, notes, and snippets.

View jumoog's full-sized avatar
🎯
Focusing

Kilian von Pflugk jumoog

🎯
Focusing
View GitHub Profile
@jumoog
jumoog / move.ps1
Last active September 26, 2025 15:42
move extracted signal files in folder YEAR\MONTH\DAY
# Set the source directory
$SourceDir = "C:\path\to\your\files"
# Set the destination root directory
$DestRoot = "C:\path\to\organized"
# Process all files in the source directory
Get-ChildItem -Path $SourceDir -File | ForEach-Object {
$file = $_
@jumoog
jumoog / block.ps1
Created September 15, 2025 10:56
block all exe files in a folder recursive
Get-ChildItem -Path "C:\Path\" -Filter *.exe -Recurse |
Select-Object Name, FullName |
ForEach-Object {
New-NetFirewallRule -DisplayName "Block $($_.Name) Inbound" -Direction Inbound -Program "$($_.FullName)" -Action Block
New-NetFirewallRule -DisplayName "Block $($_.Name) Outbound" -Direction Outbound -Program "$($_.FullName)" -Action Block
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
using MediaBrowser.Controller.Entities; // For BaseItem
using MediaBrowser.Controller.Providers; // For MetadataProvider
namespace IntroSkipper.Api.Models
{
public class SeasonExportData
@jumoog
jumoog / Dockerfile
Last active September 6, 2025 19:25
uBO Lite (uBOL) Layer for puppeteer with full permissions and no setup screen
FROM alpine:latest AS ublock
# Install required tools: curl, jq, and unzip
RUN apk --no-cache add curl jq unzip
# Set environment variables
ENV REPO_API "https://api.github.com/repos/uBlockOrigin/uBOL-home/releases/latest"
ENV FILE_PATTERN "chromium.zip"
# Create a working directory
@jumoog
jumoog / gist:2418fcc60fb1b8c28f05ae4f910dd0b1
Last active September 6, 2025 19:29
regex for put lines into an string array
(.+)(\r\n)
"\1",
func (app *application) checkExpirationDate() {
// Read the certificate file
certPEM, err := os.ReadFile(app.ssl.crt)
if err != nil {
app.logger.Fatal("failed to read certificate file", zap.Error(err))
}
// Decode the PEM encoded certificate
block, _ := pem.Decode(certPEM)
if block == nil || block.Type != "CERTIFICATE" {
@jumoog
jumoog / rename_files.go
Last active August 1, 2024 22:59
rename all files in folder; split "_" the filename and remove the last part
// go build rename_files.go
package main
import (
"fmt"
"os"
"path/filepath"
"strings"
)
@jumoog
jumoog / rclone_move.go
Created March 8, 2024 13:00
rclone move srcPath destPath --ignore-checksum --delete-empty-src-dirs --ignore-existing --quiet
package main
import (
"context"
// add the backend that you need
_ "github.com/rclone/rclone/backend/local"
"github.com/rclone/rclone/cmd"
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/sync"
@jumoog
jumoog / getAdmin.ts
Created December 28, 2023 11:39
gain admin rights from a running bot that has admin rights
import { Client, GatewayIntentBits } from 'discord.js';
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages] });
client.on('ready', async () => {
// Replace 'YOUR_GUILD_ID' with your actual guild ID
const guildId = 'YOUR_GUILD_ID';
// Replace 'YOUR_ROLE_ID' with your actual role ID
@jumoog
jumoog / app.cs
Last active October 11, 2024 11:31
aes256Decrypt in different languages
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace ConsoleApp
{
internal class Program
{
static void Main(string[] args)