Skip to content

Instantly share code, notes, and snippets.

View kaldaf's full-sized avatar
😵
to už jsou 4 ráno?

FILIP KALOUSEK kaldaf

😵
to už jsou 4 ráno?
View GitHub Profile
@kaldaf
kaldaf / index.js
Created March 6, 2024 13:18
office form autofill
// Autofill checkboxes + radio buttons
const questions = document.querySelectorAll('[data-automation-id="questionItem"]');
questions.forEach((question) => {
const options = question.querySelectorAll('[data-automation-id="choiceItem"]');
let isRadio = question.innerHTML.includes('radiogroup');
if (isRadio) {
const randomIndex = Math.floor(Math.random() * options.length);
@kaldaf
kaldaf / 🥝.ts
Last active May 1, 2023 22:13
Deno KV
import { serve } from "https://deno.land/std@0.177.0/http/server.ts";
const db = await Deno.openKv();
interface RouteHandler {
[key: string]: (url: URL) => Promise<{ body: string; status?: number }>;
}
const template = `\n\rtry /reset or /set?value=[your value]`
@kaldaf
kaldaf / domain-finder.py
Last active March 11, 2023 23:25
Find avaiable domains
# INSTALL:
#whois
#requests
#dnspythhon
#inquirer
#python-whois
import socket
import time
import whois
@kaldaf
kaldaf / wsl-win10pro.md
Created February 7, 2023 16:16
Jak nainstalovat WSL na WIN10PRO

PowerShell jako Administrátor

KROK 1: Povolení Windows Subsystem pro Linux: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

KROK 2: Minimální požadavky pro WSL 2 x64: verze 1903 nebo vyšší (build 18362 nebo vyšší) ARM64: verze 2004 nebo vyšší (build 19041 nebo vyšší)

KROK 3: Povolení funkce Virtual Machine

@kaldaf
kaldaf / keys-dictionary.ts
Created December 24, 2022 13:48
All siblings of the keys on the English keyboard
const keysDictionary = [
{ key: "a", siblings: ["q", "w", "s", "z", "x"] },
{ key: "b", siblings: ["v", "g", "h", "n"] },
{ key: "c", siblings: ["x", "d", "f", "v"] },
{ key: "d", siblings: ["s", "e", "r", "f", "c", "x"] },
{ key: "e", siblings: ["w", "s", "d", "r"] },
{ key: "f", siblings: ["d", "r", "t", "g", "v", "c"] },
{ key: "g", siblings: ["f", "t", "y", "h", "b", "v"] },
{ key: "h", siblings: ["g", "y", "u", "j", "n", "b"] },
{ key: "i", siblings: ["u", "j", "k", "o"] },