Skip to content

Instantly share code, notes, and snippets.

View rickythefox's full-sized avatar
🇸🇪
CET

rickythefox rickythefox

🇸🇪
CET
View GitHub Profile
@rickythefox
rickythefox / precise_time.c
Created July 11, 2019 08:55 — forked from eregon/precise_time.c
A variant of time(1) able to show real time in milliseconds and max RSS in MB.
#include <sys/time.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <spawn.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
@rickythefox
rickythefox / gist:53a1358812b330f75b79b82f55bb200f
Created September 13, 2017 10:57 — forked from forki/gist:1151080
A basic model for Poker in F#
type Rank = int
type Suit = | Spades | Hearts | Diamonds | Clubs
type Card = Rank * Suit
let value = fst
let suit = snd
let A,K,Q,J,T = 14,13,12,11,10
let allRanksInSuit suit = [2..A] |> List.map (fun rank -> rank,suit)
let completeDeck =