Skip to content

Instantly share code, notes, and snippets.

View Askill's full-sized avatar
🏠
Working from home

Patrice Matz Askill

🏠
Working from home
View GitHub Profile
@Askill
Askill / Readme.md
Created May 30, 2025 07:40
Run Jellyfin on Windows with single start file. (Uses Docker Desktop)

Prerequisits

Usage

You can use the Jellyfin mmart TV app, your smartphone or PC, as long as they are on the same network.

Start

@Askill
Askill / make_printable.py
Created December 31, 2024 09:59
a short script to format a bitwarden export from json to a printable txt (ChatGPT, but tested)
import json
# Function to format notes for printable output
def format_notes(notes, width=50):
formatted_notes = ""
for i in range(0, len(notes), width):
formatted_notes += notes[i:i+width] + "\n"
return formatted_notes
# Read the Bitwarden JSON export and create a printable TXT file
@Askill
Askill / unpack.py
Last active January 19, 2025 08:42
# chatgpt generated
# but verified
import os
import shutil
import zipfile
import tarfile
from pathlib import Path
def decompress_files():
@Askill
Askill / Caddyfile
Last active October 2, 2024 06:23
super simple self-hosted excalidraw server with collaboration
# make sure your dns is setup to forward your domain, in this case excalidraw.my-custom-domain.com to the server you're hosting this on
excalidraw.my-custom-domain.com {
reverse_proxy http://excalidraw {
header_up Host {http.request.host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
}
}
func get_events(account_count int, event_count int) []Event {
events := make([]Event, 0, account_count*event_count)
event_counter := make(map[string]int)
for i := 0; i < account_count*event_count; i++ {
keyA := string(97 + rand.Intn(account_count-1))
keyB := string(97 + rand.Intn(account_count-1))
for {
if keyA != keyB {
break
}
@Askill
Askill / mirror.py
Created March 5, 2024 18:28
mirror all starred git repos to your private git server
import os
import subprocess
import requests
# Replace with your GitHub token
GITHUB_TOKEN = ''
# Replace with your private Git server's HTTPS URL
PRIVATE_GIT_SERVER = 'https://user_name:pat@domain/user_name/'
GIT_SERVER_USERNAME = 'john'
@Askill
Askill / logg_stress.py
Created November 3, 2023 08:59
stress test for logging
#!/bin/python
import argparse
import asyncio
import datetime
from multiprocessing import Pool
async def write(i):
while True:
print(f"{i} {str(datetime.datetime.now())}")
function OpenSections() {
console.log('Opening Sections...');
var index = 0;
var sectionPush = document.querySelectorAll('.js-panel-toggler')
var sectionHidden = document.querySelectorAll('.panel--content-wrapper--1g5eE')
sectionHidden.forEach((item) => {
const hidden = item.getAttribute('aria-hidden');
if (hidden == "true") {
sectionPush[index].click();
}
#! /bin/bash
fileName="/home/john/speed-log/speed_log.txt"
echo "$(speedtest-cli --csv --csv-delimiter ';')" >> $fileName
@Askill
Askill / format_json.py
Last active April 13, 2022 21:03
format large json files
import json
inp = ""
out = ""
with open(inp, "r", encoding="utf-8") as f:
with open(out, "w", encoding="utf-8") as f2:
json.dump(json.load(f), f2, indent=2, ensure_ascii=False)