Friday, May 8, 2015

MySQL Batch Updates Not Working

Looking at "SHOW PROCESSLIST" and it looks like your queries are running individually instead of in batches like you sent?

This happens because MySQL runs each update statement individually, but you should still be able to see the batches when the queries are in the "init" state.

Use this query to see the batched queries:

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:

Wednesday, January 28, 2015

When Not to Use Generator Expressions

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

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('')

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

Thursday, January 22, 2015

Self-Hosting Fonts

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