Skip to content

Instantly share code, notes, and snippets.

View tkon99's full-sized avatar
⌨️
Obsessing over macros

Thomas Konings tkon99

⌨️
Obsessing over macros
View GitHub Profile
@tkon99
tkon99 / parser.js
Created November 9, 2019 19:49
RDR2 Hashes (from photos)
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
tkon99 / maketiles.py
Created April 7, 2020 08:08
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
tkon99 / lse_moodle.user.js
Last active October 3, 2021 16:08
LSE Moodle automated login (stop clicking the same buttons every day)
// ==UserScript==
// @name LSE Moodle automation
// @namespace http://tkon.nl
// @version 0.1
// @description Automate tedious LSE moodle login stuff
// @author You
// @match https://moodle.lse.ac.uk/*
// @icon https://moodle.lse.ac.uk/theme/image.php/synergycustom/theme/1633074455/favicon
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @grant none
@tkon99
tkon99 / ImageComponent.astro
Created October 6, 2021 16:21
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.
---
/* 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
scores.
My usecase: using Notion as my CMS and saving thumbnails
@tkon99
tkon99 / scrollbarfix.user.css
Last active January 17, 2022 22:27
Xbox Cloud Gaming Fullscreen Scrollbar Fix
/* ==UserStyle==
@name Xcloud Scrollbar Fix - 1/17/2022, 10:14:28 PM
@namespace github.com/openstyles/stylus
@version 1.0.1
@description Fixes the fullscreen vertical scrollbar bug on Xbox Cloud Gaming
@author tkon.nl
==/UserStyle== */
@-moz-document regexp("https://www.xbox.com/(.+)/play/(.+)") {
html.fullscreen {
overflow: hidden !important;
@tkon99
tkon99 / crawl_public.js
Last active February 28, 2022 14:20
Littlefield Game Crawler (Supply Chain Management)
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. https://op.responsive.net/lt/lse/ --> lse)
@tkon99
tkon99 / index.mjs
Created August 9, 2022 17:34
WP-JSON to RSS proxy
import express from 'express';
import rateLimit from 'express-rate-limit';
import isValidDomain from 'is-valid-domain';
import fetch from 'node-fetch';
import Feed from 'pfeed';
const app = express();
const port = 2847;
/* Rate limiter */
@tkon99
tkon99 / client.html
Created August 25, 2022 12:18
Browsy - A proof of concept for a highly compressed web browser that can be used over any connection
<!DOCTYPE html>
<html>
<head>
<title>Browsy</title>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io();
// var viewer = document.getElementById("viewer");