Skip to content

Instantly share code, notes, and snippets.

View dgwynne's full-sized avatar

David Gwynne dgwynne

  • Brisbane, Australia
View GitHub Profile
@dgwynne
dgwynne / Log.pm
Last active July 12, 2016 05:14
bunyan output for apache
package EAIT::Log;
use strict;
use warnings;
use mod_perl;
use Apache::Constants;
use Sys::Hostname;
use POSIX qw(strftime);
use Fcntl qw(:flock);
@dgwynne
dgwynne / bunyan.lua
Created July 12, 2016 05:08
lua bunyan
local logfile = require("logfile")
local P = require("posix")
local cjson = require("cjson")
local cookies = require("http_cookies")
local _M = {
fatal = 60,
error = 50,
warn = 40,
@dgwynne
dgwynne / test2.c
Created February 7, 2012 01:30
tests for joyent/http-parser http_parser_parse_url()
/*
* Copyright (c) 2012 David Gwynne <loki@animata.net>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR