Sunday, March 22, 2015

Thursday, February 12, 2015

"Error response from daemon: 404 page not found" - Docker

This required setting the following in my /etc/environment:
no_proxy=/var/run/docker.sock

Wednesday, January 28, 2015

When Not to Use Generator Expressions

http://stackoverflow.com/a/26635939

I found that post very helpful. I didn't know it's a better idea to use a list comprehension rather than a generator expression for "".join().

mod_wsgi + Flask

Here's my mod_wsgi configuration for a flask app that uses Flask-Admin.

Trailing slashes matter! If you set a trailing slash, it will only set the alias for that directory and not all of the directories below it.

Monday, January 26, 2015

Request.Args Empty During Tests - Flask

https://github.com/mitsuhiko/flask/issues/801#issuecomment-21513278

If you're using app.test_client().get, it's very important to use a relative url or your parameters will be removed.

# will not pass request.args
rv = self.client.get('http://0.0.0.0:5000/view/?foo=bar')

# works just fine
rv = self.client.get('/view/?foo=bar')


Thursday, January 22, 2015

Self-Hosting Fonts

https://github.com/CSSLint/csslint/wiki/Bulletproof-font-face

That's the most helpful guide I found for self-hosting your own fonts and preventing compatibility issues.

Wednesday, January 21, 2015

Dokku Change Nginx Timeout

None of the plug-ins for doing custom nginx configurations were working for me.

So, I changed the following two files:
/var/lib/dokku/plugins/nginx-vhosts/templates/nginx.ssl.conf
/var/lib/dokku/plugins/nginx-vhosts/templates/nginx.conf

I added the following under "location    / {":
proxy_connect_timeout 300s;
proxy_read_timeout 300s;