Skip to content

Instantly share code, notes, and snippets.

#include <mach/mach.h>
#include <mach/mach_time.h>
#include <sys/time.h>
#include <time.h>
static mach_timebase_info_data_t timebase_info;
int
clock_gettime_monotonic(struct timespec *tp) {
uint64_t mticks = mach_absolute_time();
@perj
perj / vpn.sh
Created February 16, 2016 21:20
#!/bin/bash
# Copyright 2016 Per Johansson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#