Skip to content

Instantly share code, notes, and snippets.

View Hoekstraa's full-sized avatar

Zonoia Hoekstraa

View GitHub Profile
@Hoekstraa
Hoekstraa / theme.css
Created November 14, 2023 13:52
Minimal CSS theme
/*
Massively extended version of
https://gist.github.com/JoeyBurzynski/617fb6201335779f8424ad9528b72c41
*/
:root {
--background: #1a1a1a;
--foreground: #dadada;
--dim: #9a9a9a;
font-family: sans-serif;
@Hoekstraa
Hoekstraa / game.json
Created January 27, 2022 15:33
Simple multiple choice game definition in json
{"start":["Welcome to this little game!",{"Thank you!":"goto"}],"goto":["Where would you like to go?",{"The airport":"airprt","The trainstation":"tsttn","A busstop nearby":"busstop"}],"airprt":["You arrive at the airport, what plane are you taking?",{"None, screw you!":"truelove","Germany":"de"}],"tsttn":["You arrive at the trainstation, in what direction are you gonna take a train?",{"Germany":"de","Nevermind, I'd rather go by plane.":"airprt"}],"busstop":["You go towards a busstop you see in the distance.",{"Continue walking":"busstop2","Fuck it, go back!":"goto"}],"truelove":["You find your true love, you go live with them in the bahamas.",{}],"busstop2":["You stand at the busstop for a while..",{"Wait..":"truelove","You walk away from your now past live":"truelove"}],"de":["You live the rest of your life, alone but satisfied, in Germany.",{}]}
@Hoekstraa
Hoekstraa / dual-function-keys.yaml
Last active August 21, 2023 13:17
Same as ctrl.ahk, but for Linux (interception-tools + dual-function-keys)
TIMING:
TAP_MILLISEC: 200
DOUBLE_TAP_MILLISEC: 150
MAPPINGS:
- KEY: KEY_CAPSLOCK
TAP: KEY_ESC
HOLD: KEY_LEFTCTRL
- KEY: KEY_ENTER
TAP: KEY_ENTER
@Hoekstraa
Hoekstraa / ctrl.ahk
Created August 24, 2021 10:07
Holding Caps and Return acts like Ctrl
*CapsLock::
Send {Blind}{Ctrl Down}
cDown := A_TickCount
Return
*CapsLock up::
If ((A_TickCount-cDown)<400) ; Modify press time as needed (milliseconds)
Send {Blind}{Ctrl Up}{CapsLock}
Else
Send {Blind}{Ctrl Up}
@Hoekstraa
Hoekstraa / main.cpp
Last active August 30, 2021 20:47
Simple implementation of tavianator's branchless aabb->segment collision algo with SFML vectors
#include <cmath>
#include <SFML/Graphics.hpp>
struct AABB
{
sf::Vector2f origin;
sf::Vector2f size;
};
struct Segment