Skip to content

Instantly share code, notes, and snippets.

View wyattjoh's full-sized avatar
🏳️‍🌈

Wyatt Johnson wyattjoh

🏳️‍🌈
View GitHub Profile
# Copyright 2011 Wyatt Johnson
# All Rights Reserved.
#
# 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
<VirtualHost *:80>
DocumentRoot /var/www/html/web/
<Directory /var/www/html/web/>
Options FollowSymLinks ExecCGI
AddHandler cgi-script .py
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
global
maxconn 2048
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
[
{
"id": "123",
"name": "Blue"
},
{
"id": "234",
"name": "Red"
}
]
@wyattjoh
wyattjoh / keybase.md
Created April 14, 2015 15:40
keybase.md

Keybase proof

I hereby claim:

  • I am wyattjoh on github.
  • I am wyattjoh (https://keybase.io/wyattjoh) on keybase.
  • I have a public key whose fingerprint is FC11 AA24 1AED 0767 4501 40F1 37FC 0A49 FC15 5AD4

To claim this, I am signing this object:

package main
import (
"bufio"
"fmt"
"io"
"log"
"net"
"os"
"strings"
package main
import (
"log"
"github.com/jinzhu/gorm"
_ "github.com/mattn/go-sqlite3"
)
type Image struct {
@wyattjoh
wyattjoh / docs.sh
Last active January 20, 2016 17:56
#!/bin/bash
# list all the packges, trim out the vendor directory and any main packages,
# then strip off the package name
PACKAGES="$(go list -f "{{.Name}}:{{.ImportPath}}" ./... | grep -v -E "main:|vendor/" | cut -d ":" -f 2)"
# loop over all packages generating all their documentation
for PACKAGE in $PACKAGES
do
#!/bin/sh
# Copyright 2012 The Go Authors, 2015 Wyatt Johnson. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# git gofmt pre-commit hook
#
# To use, store as .git/hooks/pre-commit inside your repository and make sure
# it has execute permissions.
#
@wyattjoh
wyattjoh / caddy.conf
Last active April 18, 2018 12:39
Caddy Supervisord Setup
[program:caddy]
command=/usr/bin/caddy -conf="/etc/caddy/Caddyfile"
autostart=true
autorestart=true
startsecs=10
stdout_logfile=/var/log/caddy.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile=/var/log/caddy_error.log