Skip to content

Instantly share code, notes, and snippets.

@tftio
tftio / # ghc - 2018-10-25_11-29-32.txt
Created October 25, 2018 20:43
ghc on macOS 10.14 - Homebrew build logs
Homebrew build logs for ghc on macOS 10.14
Build date: 2018-10-25 11:29:32

Keybase proof

I hereby claim:

  • I am tftio on github.
  • I am tftio (https://keybase.io/tftio) on keybase.
  • I have a public key ASCYJdefo7QJl8v7HhsuPj7zPvuEoRhRCnt3CELOlB5gAQo

To claim this, I am signing this object:

@tftio
tftio / random.cpp
Created September 15, 2015 20:15
Random number in [0:1)
#include <random>
#include <iostream>
// c++ -Wall -Werror -Wpedantic --std=c++11 -o ~/bin/random random.cpp
int main () {
std::random_device rd;
std::mt19937 mt(rd());
std::uniform_real_distribution<double> dist(0, 1);
std::cout << dist(mt) << std::endl;
@tftio
tftio / realpath.c
Created February 8, 2015 17:00
realpath
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
/* cc -Wall -Wextra -pedantic -Werror -o realpath realpath.c */
/* or */
/* gcc -std=gnu99 -Wall -Wextra -pedantic -Werror -o realpath realpath.c */
int usage (char * path, int rv) {

Keybase proof

I hereby claim:

  • I am jfb on github.
  • I am tftio (https://keybase.io/tftio) on keybase.
  • I have a public key whose fingerprint is 3429 49BC B9C7 F33D 65DD A049 0257 255F 2817 718C

To claim this, I am signing this object:

#include <stdio.h>
#include <string.h>
#include <uuid/uuid.h>
#include <stdlib.h>
#include <libgen.h>
// cc -Wall -pedantic -Werror -o uuid uuid.c
// AND!
// ln uuid uuidt
// for uuid_generate_time() based uuids.