Skip to content

Instantly share code, notes, and snippets.

@autumnjolitz
autumnjolitz / citrusleaf_2.1.11_osx.patch
Created August 20, 2013 20:31
A patch to make Aerospike 2.1.11 client for Python and Perl compile and be usable on MacOSX Lion. Wrote the missing kqueue handling code.
diff -Naur citrusleaf_client_swig_2.1.11/include/citrusleaf/cf_byte_order.h citrusleaf_client_swig_2.1.11-macosx/include/citrusleaf/cf_byte_order.h
--- citrusleaf_client_swig_2.1.11/include/citrusleaf/cf_byte_order.h 2013-03-27 10:12:05.000000000 -0700
+++ citrusleaf_client_swig_2.1.11-macosx/include/citrusleaf/cf_byte_order.h 2013-07-11 17:17:40.000000000 -0700
@@ -12,8 +12,7 @@
#include <libkern/OSByteOrder.h>
-#define cf_byteswap64p(_p) (OSSwapBigToHostInt64(*(_p)))
-
+#define cf_byteswap64p(_p) (OSSwapBigToHostInt64( *(uint64_t *) _p ))
@dvinciguerra
dvinciguerra / mojo-jwt.pl
Created August 1, 2017 15:04
Mojolicious REST API example using JWT for authentication
use utf8;
use Mojolicious::Lite;
use Mojo::JWT;
use 5.20.0;
use experimental 'signatures';
my $payload = {id => 1, api_key => '1a2b3c4d5e6f7a8b9c'};