Monthly Archives: July 2016

Go: Pointer to methods

Go: Pointer to methods Sometimes I need a pointer to a method that is not bound to an explicit object. Method pointers are just function pointers where the first argument is the type. Imagine we have a Pet type with … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Getting timestamp from v1 uuid

Getting timestamp from v1 uuid Translated from J.B. Langston’s Converting TimeUUID Strings to Dates Java version to Python: import arrow import fileinput import uuid def main(): for line in fileinput.input(): line = line.rstrip() value = uuid.UUID(line) epoch_millis = (value.time – … Continue reading

Posted in Uncategorized | Leave a comment