Skip to content

Instantly share code, notes, and snippets.

View RobinBoers's full-sized avatar
curious

Robin RobinBoers

curious
View GitHub Profile
defmodule Model do
@doc """
A function that given the current value calculates the
difference between the current and next value.
"""
@type t :: (value() -> dvalue())
@doc """
The value the model will mutate.
"""
@RobinBoers
RobinBoers / hangman.c64
Last active February 11, 2024 19:13
Hangman in Commodore 64 BASIC v2 :)
5 gosub 3000
10 input "pick word"; wo$
15 gosub 3000
20 gu$=""
30 wrng$=""
40 li%=10
50 rem initial value for guess.
60 for i = 1 to len(wo$)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Axcelott</title>
<style>
:root {
@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);
@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 / 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 / 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 / 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 / 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 / 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,