Skip to content

Instantly share code, notes, and snippets.

View joshdk's full-sized avatar
Caffeinating

Josh Komoroske joshdk

Caffeinating
View GitHub Profile
@joshdk
joshdk / render.go
Created December 7, 2017 03:14
Contents of package github.com/joshdk/example
// Package example is fully qualified as "github.com/joshdk/example"
package example
import (
"github.com/dave/jennifer/jen"
"fmt"
)
type Person struct {
Name string
@joshdk
joshdk / Step 1 - Initial apply
Last active April 25, 2017 08:21
Terraform debug output for
2017/04/25 01:18:33 [INFO] Terraform version: 0.9.3 1601af7a076fd03fe940455db7fd01dfa747c795
2017/04/25 01:18:33 [INFO] Go runtime version: go1.8
2017/04/25 01:18:33 [INFO] CLI args: []string{"/Users/joshdk/.bin/terraform", "apply", "-no-color"}
2017/04/25 01:18:33 [INFO] CLI command args: []string{"apply", "-no-color"}
2017/04/25 01:18:33 [INFO] command: backend initialized: <nil>
2017/04/25 01:18:33 [INFO] command: backend <nil> is not enhanced, wrapping in local
2017/04/25 01:18:33 [INFO] backend/local: starting Apply operation
2017/04/25 01:18:33 [INFO] terraform: building graph: GraphTypeInput
2017/04/25 01:18:33 [INFO] terraform: building graph: GraphTypeValidate
2017/04/25 01:18:33 [INFO] backend/local: apply calling Refresh
@joshdk
joshdk / exception_tests.py
Last active April 4, 2017 18:47
Nose style tests for highlighting issues with returning custom exception from pool.map callbacks
from nose.plugins.skip import SkipTest
from nose.tools import assert_raises
from multiprocess import Pool
def skip(func):
def wrapper(*args, **kwargs):
raise SkipTest("Test %s is skipped" % func.__name__)
wrapper.__name__ = func.__name__
return wrapper
@joshdk
joshdk / bandcamp.py
Last active December 16, 2015 22:08
import json
import urllib2
import sys
from threading import Thread
class BandCamp(object):
def __init__(self, url):
self.album_id = self.get_id(url)
self.album_data = self.get_json()
@joshdk
joshdk / briefcase.conf
Created April 5, 2013 01:35
Nginx configuration file for a Briefcase instance
listen 80;
server_name localhost
access_log /var/log/nginx/search.access.log;
error_log /var/log/nginx/search.error.log;
location /static/accounts/ {
alias /etc/webapps/briefcase/briefcase/core/accounts/static/accounts/;
expires 30d;