Skip to content

Instantly share code, notes, and snippets.

View rxw1's full-sized avatar
☠️

rxw1

☠️
  • Upper Silesia, Germany
View GitHub Profile
@rxw1
rxw1 / acroform_font_size.py
Created August 23, 2023 16:26
Bulk change PDF AcroForm text field annotation font sizes
from sys import argv
from pikepdf import Name, Pdf
def render(input: str, output: str) -> None:
with Pdf.open(input) as pdf:
for page in pdf.pages:
annots = page.get("/Annots")
if annots is not None:
@rxw1
rxw1 / EnableLUA.md
Created June 30, 2023 12:23
Fix Windows 11 explorer.exe not seeing mounted files in WSL2

Fri Jun 30 02:21:11 PM CEST 2023


Fix Windows 11 explorer.exe not seeing mounted files in WSL2

Problem

  • Windows 11 explorer.exe (and any other application running on Windows) is not being able to browse additionally mounted WSL2 directories.
@rxw1
rxw1 / wsl-mount.ps1
Last active May 6, 2023 23:12
Mount Windows Drives to WSL
# Author: https://github.com/rxw1 <[email protected]>
# Last edit: Sun May 7 01:10:50 AM CEST 2023
# https://gist.github.com/rxw1/2ddb64ab95dbb1c005f4ce688bef303f
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
$admin = $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (!$admin) {
Write-Output("Script must be run as Administrator")
exit 1
}
@rxw1
rxw1 / tarkov-12-12-30-patch-notes.md
Created June 29, 2022 13:27
Escape From Tarkov 12.12.30 patch notes

Escape From Tarkov 12.12.30 patch notes

Ergänzungen

  • Neue Kartenerweiterung "Leuchtturm", die es den Spielern ermöglicht, den Bereich des Leuchtturms zu betreten, der zuvor von einer Wache geschützt war.
  • Drei neue Escape From Tarkov-Bosse in Form von Ex-USEC-Schurken wurden zu den Karten Leuchtturm, Küste, Wälder und Zoll hinzugefügt: Knight, Birdeye und Big Pipe.
  • Es wurde ein kooperativer Offline-Spielmodus hinzugefügt, der nur für Spieler mit der Edge of Darkness-Edition des Spiels zugänglich ist.
  • Neue überarbeitete Bewegungsanimationen, einschließlich Sprinten, Atmen, Springen und Drehen.
<script>
import { onMount } from 'svelte';
import * as d3 from 'd3';
$: width = 0;
$: height = 0;
$: barGaps = 20;
$: barHeight = 20;
let margin = {top: 50, right: 50, bottom: 50, left: 50};
@rxw1
rxw1 / spotify-playlist-json.bm.js
Last active August 10, 2021 02:35
Spotify Playlist to JSON (Bookmarklet)
javascript:!function(){const o=document.querySelector("#main > div > div.Root__top-container > div.Root__main-view > main > div.os-host.os-host-foreign.os-theme-spotify.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden.main-view-container__scroll-node.os-host-transition.os-host-overflow.os-host-overflow-y > div.os-padding > div > div > div.main-view-container__scroll-node-child > section > div.contentSpacing._4c3b6e4e88112fc8ef88512cbe7521ed-scss.da51a6e223c7200d373a2fd0614d7c33-scss > div.faffb409617fd7cf35017fde898cf860-scss > div > div > a").textContent.replace(/[^A-Za-z]/g,""),e=document.querySelector("#main > div > div.Root__top-container > div.Root__main-view > main > div.os-host.os-host-foreign.os-theme-spotify.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden.main-view-container__scroll-node.os-host-transition.os-host-overflow.os-host-overflow-y > div.os-padding > div > div > div.main-view-container__scroll-node-child > section > div.contentSpacing._4c3b6e4e88112fc8ef88512cbe7521ed
import Data.List
import Data.Ord
main = interact $ (=<<) (\x -> show (length x) ++ " " ++ head x ++ "\n")
. sortBy (flip $ comparing length)
. group . sort
. words
@rxw1
rxw1 / init.vim
Last active September 11, 2020 23:15
" vimrc
" [email protected]
" Sat Sep 12 01:04:02 AM CEST 2020
let g:tex_flavor = "latex"
call plug#begin() " {{{
" Completion
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'mattn/emmet-vim'
#!/usr/bin/python3.8
import sys
import math
import unicodedata
table = [
["A", "ALEF", "ALPHA"], # 001 Α α א
["B", "BET", "BETA"], # 002 Β β ב
["C", "GIMEL", "GAMMA"], # 003 Γ γ ג