Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Doing awesome stuff

Filip Troníček filiptronicek

🐢
Doing awesome stuff
View GitHub Profile
@filiptronicek
filiptronicek / download-list.sh
Created May 8, 2023 21:19
Instagram automated story downloader
View download-list.sh
wget --content-disposition --trust-server-names -i urls.txt
@filiptronicek
filiptronicek / main.js
Created November 25, 2022 19:31
Sort by surname
View main.js
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
View rename.js
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
View extensionHoarder.js
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
View index.js
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
View marketplace.json
{
"malicious": [
"ms-python.python"
],
"deprecated": {},
"migrateToPreRelease": {}
}
@filiptronicek
filiptronicek / pr.md
Last active October 7, 2022 08:44
VS Code Insiders PR for Gitpod
View pr.md

Description

Update code to 1.x.x

How to test

  • Switch to VS Code Insiders in settings.
  • Start a workspace.
  • Test following:
    • terminals are preserved and resized properly between window reloads
  • WebViews are working
@filiptronicek
filiptronicek / 3n+1.py
Created October 8, 2021 07:55
💀🤌🔥
View 3n+1.py
ns = []
def compt(n):
ns.append(n)
if n == 1:
return
if n % 2 == 0:
n = n/2
else:
n = (3*n)+1
compt(n)
@filiptronicek
filiptronicek / index.php
Created October 3, 2021 11:07
Check if a link is accessible via IPFS in PHP
View index.php
<?php
/**
* Checks if a given `$url` is hosted on IPFS
*
* @param string $url
* @return bool
*/
function checkIPFS($url)
{
@filiptronicek
filiptronicek / colors.json
Created August 16, 2021 21:47
Awesome VS Code colors (don't try at home)
View colors.json
{
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#ffffff",
"debugConsole.errorForeground": "#ffffff",
"titleBar.activeForeground": "#ffffff",
"sideBar.background": "#ffffff",
"editor.background": "#ffffff",
"window.zoomLevel": 20,
"editor.foreground": "#ffffff",
"sideBar.foreground": "#ffffff",