Skip to content

Instantly share code, notes, and snippets.

View bradrydzewski's full-sized avatar

Brad Rydzewski bradrydzewski

View GitHub Profile
@caffeineflo
caffeineflo / Readme.md
Last active August 29, 2015 14:03
Autoboot Boot2Docker on System Startup

I came across this when I found several solutions that didn't work for me. They all had there very own problems, they either had a debug option in it (which I found guilty of not starting my job after several hours of debugging) or other unnecessary keys.

To make this plist work, you should may create the corresponding log files before and give them the necessary permissions (770 worked for me, though it's maybe too much).

  1. Create the plist under ~/Library/LaunchAgents/com.user.boot2docker.plist
  2. run launchctl load ~/Library/LaunchAgents/com.user.boot2docker.plist
@the42
the42 / gist:1956518
Created March 2, 2012 07:34
GZip encoding for GO V1 using custom responsewriter
package main
import (
"compress/gzip"
"io"
"net/http"
"strings"
)
type gzipResponseWriter struct {
@joestump
joestump / gist:938824
Created April 23, 2011 17:48
An example of a python-oauth2 provider
class BaseRequestHandler(tornado.web.RequestHandler):
"""Base class for all SimpleGeo request handlers."""
def _handle_request_exception(self, e):
status_code = getattr(e, 'status_code', 500)
self.set_status(status_code)
error = {
'code' : status_code,
'message' : str(e)