Skip to content

Instantly share code, notes, and snippets.

Obsessing over macros

Thomas Konings tkon99

Obsessing over macros
View GitHub Profile
tkon99 / crawl_public.js
Last active Feb 28, 2022
Littlefield Game Crawler (Supply Chain Management)
View crawl_public.js
import got from "got";
import {CookieJar} from "tough-cookie";
import {writeFile} from 'fs/promises';
let cookieJar = new CookieJar();
let client = got.extend({ cookieJar });
// Enter details here
const settings = {
insitution: "", // This is part of your login url (e.g. --> lse)
tkon99 / scrollbarfix.user.css
Last active Jan 17, 2022
Xbox Cloud Gaming Fullscreen Scrollbar Fix
View scrollbarfix.user.css
/* ==UserStyle==
@name Xcloud Scrollbar Fix - 1/17/2022, 10:14:28 PM
@version 1.0.1
@description Fixes the fullscreen vertical scrollbar bug on Xbox Cloud Gaming
==/UserStyle== */
@-moz-document regexp("") {
html.fullscreen {
overflow: hidden !important;
tkon99 / ImageComponent.astro
Created Oct 6, 2021
An example implementation of an Astro image component that retrieves an image from a given url, stores it locally and generates an img tag referring to the local copy.
View ImageComponent.astro
/* Demo implementation of an Astro image component that
fetches a remote image and stores it locally, so it is
hosted on the same platform.
Can be expanded to generate srcset images for different
screen sizes and/or compress images for good Lighthouse
My usecase: using Notion as my CMS and saving thumbnails
tkon99 / lse_moodle.user.js
Last active Oct 3, 2021
LSE Moodle automated login (stop clicking the same buttons every day)
View lse_moodle.user.js
// ==UserScript==
// @name LSE Moodle automation
// @namespace
// @version 0.1
// @description Automate tedious LSE moodle login stuff
// @author You
// @match*
// @icon
// @require
// @grant none
tkon99 /
Created Apr 7, 2020
RDR2 Map Tile Creator
import glob
import math
import numpy
from pathlib import Path
from PIL import Image
Image.MAX_IMAGE_PIXELS = 933120000
zoomdir = "C:/Users/tkon9/Desktop/RDR2MapStream/content/maps/sat" # Essentially the output directory
tkon99 / parser.js
Created Nov 9, 2019
RDR2 Hashes (from photos)
View parser.js
var cheerio = require('cheerio');
var fs = require('fs');
var parseurl = require('parseurl');
var queryString = require('querystring');
var path = require('path');
let files = fs.readdirSync('htmls');
let toAnalyze = [];
for(x in files){
tkon99 / bocconi_rooms.json
Created Sep 9, 2019
Bocconi University Buildings and Rooms used in
View bocconi_rooms.json
"building": "Sarfatti 25",
"floors": {
"basement": ["INFOU01"],
"ground": [1,2,3,4,"A","B","C","D","E","F","Norari","Zappa","INFO6"],
"1st": [11,12,13,14,15,16,101,"Manfredini","Perego"],
"2nd": [21,22,23,24,25,26,201,202,203,204,205,206,"Maggiore","ES2M"],
"3rd": [31,32,33,34,34,35,36,301,302],
"4th": [41,42,43,44,"4a","4b","4c"]
tkon99 /
Last active Feb 17, 2021
Use Mosh on Windows from the Command Prompt

Hi all. After wanting true color support in Mosh (to use, I also wanted to integrate it more tightly with Windows. Since I reckon more people will be wanting to accomplish this, here is a guide.

  1. Install Linux Subsystem for Windows if you haven't already ( (I use Ubuntu)
  2. Make sure you can execute bash from a CMD prompt.
  3. Go into the bash environment by executing bash ~ in CMD prompt
  4. Install Mosh-dev (for up-to-date version) from by doing sudo add-apt-repository ppa:keithw/mosh-dev then sudo apt-get update
  5. Create a new mosh.bat file on your Desktop with the following contents
@echo off
tkon99 / index.html
Created Jul 10, 2015
Coding Tutorial - Chap. 3 - Using Frameworks
View index.html
<title>Using Frameworks!</title>
<!-- This is where the magic happens. We include the bootstrap files from their server. !-->
<link rel="stylesheet" href="">
<script src=""></script>
<h1>Your content goes here.</h1>
tkon99 / schools.json
Created Jun 15, 2015
All gepro-osi schools
View schools.json