Skip to content

Instantly share code, notes, and snippets.

View filiptronicek's full-sized avatar
🐢
Doing awesome stuff

Filip Troníček filiptronicek

🐢
Doing awesome stuff
View GitHub Profile
@filiptronicek
filiptronicek / test.js
Created February 11, 2024 20:30
Test autofix script
const { register } = require("./update-lang-python");
const fixers = [[]];
await register(fixers);
console.log(fixers);
@filiptronicek
filiptronicek / fix.sh
Created December 22, 2023 10:12
GNU cp for leeway on macOS
brew install coreutils
sudo ln -sf /opt/homebrew/bin/gcp /usr/local/bin/cp
@filiptronicek
filiptronicek / ech-enabled-100_000.txt
Last active March 6, 2024 10:04
Encrypted ClientHello-enabled domains from the Top Domains of Cloudflare's Radar (10/1/2023)
004307.com
0123movie.net
057.ua
079301eaff0975107716716fd1cb0dcd.com
0af2a962b0102942d9a7df351b20be55.com
0betweb.com
0c.gay
0ebz217dw04q.com
0magnet.co
0rd.net
@filiptronicek
filiptronicek / dh.py
Created September 28, 2023 19:42
Sample diffie-helman implementation in Python
# Importing necessary libraries
import random
# Function to compute the modular exponentiation (a^b mod p)
def mod_exp(a, b, p):
return pow(a, b, p)
def diffie_hellman(p, g):
# Alice chooses a private key
a = random.randint(1, p - 1)
@filiptronicek
filiptronicek / download-list.sh
Created May 8, 2023 21:19
Instagram automated story downloader
wget --content-disposition --trust-server-names -i urls.txt
@filiptronicek
filiptronicek / main.js
Created November 25, 2022 19:31
Sort by surname
namesDelimitedByNewline.split("\n").sort((a, b) => a.split(" ")[1].localeCompare(b.split(" ")[1])).join("\n")
@filiptronicek
filiptronicek / rename.js
Created October 12, 2022 20:08
The old changelog format migrator
import fs from "fs";
// for every file in the directory, make a folder with the same name and move the file into it, renaming it to index.md
const dir = "./src/lib/contents/changelog";
fs.readdirSync(dir).forEach((file) => {
const fileDir = `${dir}/${file}`;
const newDir = `${dir}/${file.split(".")[0]}`;
fs.mkdirSync(newDir);
@filiptronicek
filiptronicek / extensionHoarder.js
Last active November 24, 2022 18:06
open-vsx.org extension hoarder - a script for downloading a lot of extensions
const fs = require("fs/promises");
const execSync = require("child_process").execSync;
const toDownload = 100;
const downloadFolder = "downloaded";
const getExtensions = async () => {
const openVsxResponse = await fetch(
`https://open-vsx.org/api/-/search?size=${toDownload}&sortBy=downloadCount&sortOrder=desc`
);
@filiptronicek
filiptronicek / index.js
Created September 26, 2022 13:37
Release notes parser - tailored to the new proposed Gitpod Changelog process
import { readFile } from "fs/promises";
import { unified } from "unified/lib/index.js";
import remarkParse from "remark-parse";
const file = await readFile("files/file.md", "utf8");
const data = unified().use(remarkParse).parse(file);
const releaseNotesStart = data.children.find(
@filiptronicek
filiptronicek / marketplace.json
Last active July 12, 2022 16:12
Malicious test
{
"malicious": [
"ms-python.python"
],
"deprecated": {},
"migrateToPreRelease": {}
}