Skip to content

Instantly share code, notes, and snippets.

View wbrady's full-sized avatar

Will Brady wbrady

  • Palantir
  • Washington, D.C.
View GitHub Profile
@wbrady
wbrady / postgres_headaches.txt
Created November 14, 2013 02:12
postgres headaches
uninstall current postgresql and postgis
brew tap homebrew/versions
brew install postgis20 (which will also install postgresql92)
startup postgresql
reinstall pg gem - not enough
reinstall activerecord pg adapter
ran into problem of having old server running - answer http://stackoverflow.com/questions/16264973/postgis-homebrew-installation-referencing-an-old-path
@wbrady
wbrady / Example.md
Last active August 29, 2015 14:07
Amazon SQS Example in Go

Amazon SQS Example in Go

Here is an example sending and receiving messages. The first commands sends two messages. The next receive command receives both messages (but it could have just gotten one of them) and deletes them. The next receive command doesn't get any because there aren't any left in the queue.

The queue name ("test" in my case) and AWS region is hard-coded in this example. I set the queue up manually in AWS beforehand.

http://godoc.org/github.com/crowdmob/goamz/sqs

> go run connect.go send.go -access_key="MY_ACCESS_KEY" -secret_key="MY_SECRET_KEY"
@wbrady
wbrady / how-to-set-up-stress-free-ssl-on-os-x.md
Last active August 29, 2015 14:26 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying