Skip to content

Instantly share code, notes, and snippets.

View niamtokik's full-sized avatar

Niamtokik niamtokik

View GitHub Profile
@Koura
Koura / relations.pl
Created February 2, 2021 10:09
Visualizing relations with Prolog
/*
Prerequite: graphviz, prolog
Install (ubuntu): apt install graphviz swi-prolog
Usage:
- launch `prolog` from the terminal in the same folder as this file
- consult(relations).
- tell('./relations.gv'), graph(relation),told.
- halt.
- dot -Tjpg relations.gv | display
@adamsteen
adamsteen / setup.sh
Last active April 7, 2019 11:12
OpenBSD Current: MirageOS
#!/bin/sh -e
# required packages
doas pkg_add ocaml opam
# setup opam and mirage
opam init
eval $(opam env)
# pins to fix for OpenBSD Current (mincore fixes and noretpoline)
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active April 26, 2024 04:52
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@augbog
augbog / Free O'Reilly Books.md
Last active April 24, 2024 10:37
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros