Skip to content

Instantly share code, notes, and snippets.

View RobinBoers's full-sized avatar
curious

Robin RobinBoers

curious
View GitHub Profile
@RobinBoers
RobinBoers / som-auth.ts
Created July 24, 2024 20:42
Script for obtaining Somtoday access token.
#!/usr/bin/env -S bun
import crypto from "node:crypto";
import puppeteer from "puppeteer";
const RANDOM_BYTES = 32;
const CLIENT_ID = "D50E0C06-32D1-4B41-A137-A9A850C892C2";
const SCOPE = "openid";
const APP = "somtodayleerling"
const ENDPOINT = "https://inloggen.somtoday.nl/oauth2";
@RobinBoers
RobinBoers / fastasfuck.js
Created March 13, 2025 14:22
Tampermonkey script that disables wait time on wiskunde-examens.nl
// ==UserScript==
// @name Fast as fuck
// @namespace http://tampermonkey.net/
// @version 2025-03-13
// @description Disables wait time on wiskunde-examens.nl
// @author Robijntje
// @match https://www.wiskunde-examens.nl/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=wiskunde-examens.nl
// @grant none
// ==/UserScript==
@RobinBoers
RobinBoers / pong.py
Created March 15, 2025 13:58
Pong in 85 lines of Python :)
#!/usr/bin/python3
import pygame
s = 80
v = 5
w = 50
h = 300
d = 40
@RobinBoers
RobinBoers / elementary OS config.md
Last active January 30, 2025 17:28
My way of configuring and customizing Elementary OS (linux)

Elementary OS config

This is a simple guide for myself about how to replicate my current eOS setup if I ever need to. These are my themes, customazations and tweaks to the OS, categorized and clearly written down for future me if he ever needs it.

Install software

Install updates

Always update when installing an new OS.

@RobinBoers
RobinBoers / package.json
Last active December 5, 2024 11:25
Script to authenticate with the Somtoday API via SSO, by intercepting the redirect to the app.
{
"dependencies": {
"axios": "^1.4.0"
}
}
@RobinBoers
RobinBoers / aws2bunny.sh
Created August 2, 2023 19:25
Simple script to migrate the contents of an AWS S3 bucket to a bunny.net Storage Zone.
#!/bin/sh
# Script to copy files from GCS bucket to Bunny(.net) Storage.
# This script assumes you're logged into the `gcloud` cli, and
# that all the files are at the top-level of the bucket and/or zone.
# Usage:
# ./copy.sh <BUCKET> <ZONE> <PASSWORD> [FLAGS]
# Arguments:
# $1: S3 bucket ID
@RobinBoers
RobinBoers / rplace.php
Last active September 8, 2024 20:43
r/place in ~200 lines of PHP.
<?php
#
# r/place clone written in a single PHP file.
# Written by Axcelott--Unlicensed.
#
define('DIMENSIONS', 20);
define('CANVAS_COLOR', "#ffffff");
define('PENCIL_COLOR', "#000000");
@RobinBoers
RobinBoers / v2.css
Last active August 24, 2024 20:31
Custom CSS to make Miniflux v1.x look like v2 :)
@import url("/assets/css/app.min.css");
:root {
--font-family:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--body-color:#333;
--body-background:#fff;
--hr-border-color:#ccc;
--title-color:#333;
--link-color:#3366CC;
--link-focus-color:red;
--link-hover-color:#333;
@RobinBoers
RobinBoers / spotlight.rule.json
Created August 12, 2024 08:23
Karabinder rule to make option launch Spotlight, ala Windows.
{
"description": "Option launches Spotlight",
"manipulators": [
{
"from": {
"key_code": "left_option",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_option" }],
"to_if_alone": [
@RobinBoers
RobinBoers / sql.php
Created August 11, 2024 11:35
PHP SQL builder primitives
<?php
function in($query, $column, $list) {
[$sql, $params] = $query;
$placeholders = implode(',', array_fill(0, count($list), '?'));
return ["SELECT * FROM ($sql) WHERE `$column` IN $placeholders", array_merge($params, $list)];
}
function where($query, $column, $value) {
[$sql, $params] = $query;