Skip to content

Instantly share code, notes, and snippets.

View RobinBoers's full-sized avatar
denial is a river in egypt

Robin RobinBoers

denial is a river in egypt
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 / connection.php
Created July 24, 2024 20:14
Function for establishing a MySQL database connection in PHP using PDO.
function establish_connection() {
$host = DB_HOST;
$user = DB_USER;
$pass = DB_PASS;
$name = DB_NAME;
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
@RobinBoers
RobinBoers / spacehey.css
Created July 15, 2024 20:08
Pink spacehey theme
body {background: antiquewhite !important}
.top {background: #d53e65 !important;}
nav .links {background: #eda7ab !important;}
nav .links a {text-shadow: 0 0 7px #e77b97 !important}
nav .links a:hover {color: #d53e65 !important;}
main {background: #fff5eb !important;}
.blog-preview {display:none}
.profile-pic img {border: 5px solid #d53e65; border-radius: 4px;}
footer {background: #f3e3ce !important;}
.profile .heading {background: #a32848 !important;color:white !important;}
@RobinBoers
RobinBoers / command-q.karabinder-thing
Created July 4, 2024 18:34
Option+Q to Command+Q
{
"description": "Option+Q to Command+Q",
"manipulators": [
{
"from": {
"key_code": "q",
"modifiers": {
"mandatory": [
"left_option"
],
@RobinBoers
RobinBoers / alacritty.karabinder-thing
Created July 4, 2024 18:34
Option+Return launches Alacritty
{
"description": "Option+Return launches Alacritty",
"manipulators": [
{
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": [
"left_option"
],
@RobinBoers
RobinBoers / cgit.css
Created June 9, 2024 09:45
Custom stylesheet for git.dupunkto.org
@import url("cgit.css");
@import url("https://roblog.nl/base.css");
/* Better fonts */
:root {
line-height: 1.6;
tab-size: 4;
}
div#cgit { font-family: monospace; }
@RobinBoers
RobinBoers / cryptobros.md
Last active May 11, 2024 20:36
Dit is een aangepaste versie van een verslag dat ik in samenwerking met mijn beste vriend voor een praktische opdracht van maatschappijleer geschreven heb.

Cryptobros

Geschreven door Robin Boers en Sean Ham

Inleiding

Dit is een verslag dat wij (Sean en Robin) hebben geschreven voor de vierde en (hopelijk) laatste PO van maatschappijleer. We gaan hierin een kijkje nemen in de wereld van cryptobros: mensen die cryptocurrencies zoals Bitcoin of Ethereum fantastisch vinden, denken dat de blockchain helemaal de toekomst is--ze zijn namelijk het bankenstelsel aan het revolutioneren!--en dit vaak op een vrij,

@RobinBoers
RobinBoers / sub.php
Last active March 31, 2024 20:45
Sub—a simple email subscription service for my blog.
<?php
#
# Sub—a simple email subscription service for my blog.
#
$API_HOST = "https://api.geheimesite.nl";
$API_ROOT = "/sub";
$TOKEN = "../token.txt";
$LIST = "../subscribers.csv";
@RobinBoers
RobinBoers / rplace.php
Last active March 17, 2024 08:46
r/place in ~200 lines of PHP.
<?php
#
# r/place clone written in a single PHP file.
# Written by Axcelott--Unlicensed.
#
$dimensions = 20;
$default_color = "#ffffff";
$store = "canvas.json";
@RobinBoers
RobinBoers / squares.js
Created February 24, 2024 12:00
p5js exercise
const STARTING_SIZE = getWidth();
const MIN_SIZE = 5;
const CENTER_X = getWidth()/2;
const CENTER_Y = getHeight()/2;
let parentSideLength;
function start() {
drawFigure(STARTING_SIZE, MIN_SIZE);