Skip to content

Instantly share code, notes, and snippets.

View macfreek's full-sized avatar

Freek Dijkstra macfreek

View GitHub Profile
@macfreek
macfreek / keybase.md
Created July 8, 2014 14:17
Keybase certification

Keybase proof

I hereby claim:

  • I am macfreek on github.
  • I am macfreek (https://keybase.io/macfreek) on keybase.
  • I have a public key whose fingerprint is 1062 DBF1 AFBE 51B6 A293 F7BA 5F14 E385 D0EE 5BEA

To claim this, I am signing this object:

@macfreek
macfreek / test.cc
Last active August 29, 2015 14:17
Test C++ open() of a file or directory
// Test how open() or ifstream() behave when reading a directory, file or stream.
// Written 2015 by Freek Dijkstra
// Contributed to public domain
// See http://stackoverflow.com/questions/29310166/check-if-a-fstream-is-either-a-file-or-directory
#include <iostream>
#include <fstream>
#include <cerrno>
#include <cstring>
@macfreek
macfreek / README
Last active January 21, 2017 16:35 — forked from T4erg/README
Export Mac OS X keychain to CSV
These two files should help you to export passwords from a Mac OS X keychain for import into 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they