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set -e
EVENT_NAME="$1"
[ "$EVENT_NAME" = "live-updated" ] || exit 42
CT_LOGS="https://ct.googleapis.com/pilot https://ctlog.api.venafi.com"
CT_UMASK="0022"
[ -e "/etc/default/acme-ct" ] && . /etc/default/acme-ct
[ -e "/etc/conf.d/acme-ct" ] && . /etc/conf.d/acme-ct

Keybase proof

I hereby claim:

  • I am grahamedgecombe on github.
  • I am grahamedgecombe (https://keybase.io/grahamedgecombe) on keybase.
  • I have a public key whose fingerprint is D2B4 98F5 C237 5320 1BC7 A020 808A 6AE4 B9B4 4894

To claim this, I am signing this object:

@grahamedgecombe
grahamedgecombe / gist:450435
Created June 23, 2010 19:40
Bit packing methods for Netty.
// ****************************************
// READING
// ****************************************
/**
* Switches this builder's mode to the byte access mode.
* @throws IllegalStateException if the builder is already in byte access
* mode.
*/
public void switchToByteAccess() {
@grahamedgecombe
grahamedgecombe / uci.c
Created June 11, 2010 19:24
Unique Candidate Identifier check digit calculator.
// ============================================================================
// Copyright (c) 2010-2011 Graham Edgecombe. All Rights Reserved.
// Unique Candidate Identifier Check Digit Calculator
// ============================================================================
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#define CENTRE_LEN 5
@grahamedgecombe
grahamedgecombe / LineCounter.java
Created June 11, 2010 10:37
A line counter utility, written in Java, to demonstrate the new NIO file API.
/*
* Copyright (C) 2010 Graham Edgecombe.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@grahamedgecombe
grahamedgecombe / nginx upstart script
Created May 22, 2010 16:19
upstart configuration file for nginx.
# nginx - web server
description "nginx web server"
author "Graham Edgecombe <grahamedgecombe@gmail.com>"
start on runlevel [2345]
stop on runlevel [016]
expect fork
respawn
@grahamedgecombe
grahamedgecombe / gist:395123
Created May 9, 2010 12:22
Haskell code which multiplies two numbers using addition and bit operations only.
import Data.Bits
-- checks if x is divisble by y
divisible :: Int -> Int -> Bool
divisible x y | y == 2 = not (testBit x 0)
| otherwise = mod x y == 0
-- multiplies x and y by manipulating bits and performing addition only
mult :: Int -> Int -> Int
mult x y | x == 0 = 0