Skip to content

Instantly share code, notes, and snippets.

View jumoog's full-sized avatar

Kilian von Pflugk jumoog

View GitHub Profile
@jumoog
jumoog / Dockerfile
Created February 13, 2025 21:00
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.mv3.zip"
# Create a working directory
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)
@jumoog
jumoog / how to
Last active March 1, 2025 18:37
install hetzner Server with encrypted NVME
create: (files are below)
/tmp/setup.conf
/tmp/authorized_keys (ssh-keygen -t rsa -b 4096)
/tmp/post-install.sh
execute
chmod +x /tmp/post-install.sh
installimage -a -c /tmp/setup.conf -x /tmp/post-install.sh
const phin = require('phin');
const _ = require('underscore');
async function getLatestChromeVersion() {
let res = await phin({
url: 'https://omahaproxy.appspot.com/all.json',
parse: 'json'
});
if (res.statusCode === 200) {
let cros_os = _.find(res.body, {