Skip to content

Instantly share code, notes, and snippets.

View jhunt's full-sized avatar
🎧
codin'

James Hunt jhunt

🎧
codin'
View GitHub Profile
diff -u -Naur zeromq-4.0.5/tests/test_security_curve.cpp zeromq-4.0.5.patch/tests/test_security_curve.cpp
--- zeromq-4.0.5/tests/test_security_curve.cpp 2014-10-14 04:06:40.000000000 -0400
+++ zeromq-4.0.5.patch/tests/test_security_curve.cpp 2015-05-20 11:01:18.002004000 -0400
@@ -20,10 +20,10 @@
#include "testutil.hpp"
// We'll generate random test keys at startup
-static char client_public [40];
-static char client_secret [40];
-static char server_public [40];
@jhunt
jhunt / .cpanimal.overrides
Created June 17, 2015 20:41
~/.cpanimal.overrides Configuration
* skip requires perl(Win32) /^perl(Win32::.*)$/;
* skip requires perl(Win32API) /^perl(Win32API::.*)$/;
* skip requires perl(Mac) /^perl(Mac::.*)$/;
# Apache1 is EOL'd
* skip requires /^perl(Apache::.*)$/;
* skip build_requires /^perl(Apache::.*)$/;
# JSON::backportPP isn't real...
* skip requires /JSON::backportPP/;
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <poll.h>
#include <sys/time.h>
#include <sys/resource.h>
int open_files(unsigned long *soft, unsigned long *hard, unsigned long *current);
int main(int argc, char **argv)

Keybase proof

I hereby claim:

  • I am filefrog on github.
  • I am jrhunt (https://keybase.io/jrhunt) on keybase.
  • I have a public key whose fingerprint is 5AB1 819A B57F 76C5 C629 507D 7871 552D F7B1 BF49

To claim this, I am signing this object:

@jhunt
jhunt / brawlers-puzzler.pl
Created May 5, 2012 03:03
Working solution in O(n) time and constant space for Canz' "Brawler's Puzzler"
#!/usr/bin/perl
sub fisher_yates_shuffle
{
my $array = shift;
my $i;
for ($i = @$array; --$i; ) {
my $j = int rand ($i+2);
next if $i == $j;
@$array[$i,$j] = @$array[$j,$i];
@jhunt
jhunt / keybase.md
Created January 18, 2016 01:25
keybase.md

Keybase proof

I hereby claim:

  • I am jhunt on github.
  • I am jhunt (https://keybase.io/jhunt) on keybase.
  • I have a public key whose fingerprint is FFD6 6A31 7306 9668 4FD5 7C54 3692 E9FD 8E3E 8B9F

To claim this, I am signing this object:

@jhunt
jhunt / gist:96bb6ac786071e7cef005e2766c7ce1f
Created May 8, 2016 02:15
Timelines for Pipelined BOSH deploys
T0 change to global/ (ref abcde)
T1 ci: check out repo (run `poke` job)
T2 propagate alpha sandbox/alpha # cp -R global/ sandbox/alpha/.global
T3 detect change to sandbox/alpha
T4 ci: checkout repo (run `sandbox` job)
T5 deploy sandbox/alpha and SUCCESS!
T6 propagate beta sandbox/alpha som/staging # cp -R sandbox/alpha/.global som/staging/.global
T7 git commit and exit
#!/bin/bash
declare -a argv
argv=${@:0}
while (( $# != 0 )); do
echo "1) arg = [$1]"
shift
done
echo
package main
import (
"os"
"fmt"
"net/http"
"github.com/pivotal-cf/brokerapi"
"github.com/pivotal-golang/lager"
)
# TICK-TOCK. THIS FILE MANAGED BY CLOCKWORK.
colors: # {{{
darkblue: 003366
blue: 004c99
lightblue: 66b2ff
darkred: 660000
red: 990000
lightred: ff6666