Skip to content

Instantly share code, notes, and snippets.

@amw
amw / database.yml
Created December 21, 2010 16:12
Standard rails database.yml with additional definition of live database
development:
adapter: mysql2 # must =~ /mysql/
database: adamDb # required
username: your_user
password: keep_secret
live:
ssh_user: # optional, use if live system user differs from your dev user
host: example.com # required, can be IP
adapter: mysql2 # must =~ /mysql/
@amw
amw / pillow-vs-vips.py
Last active September 19, 2023 10:48
Performance comparison of image resizing methods in Pillow and PyVIPS
#!/usr/bin/env python
# Script for comparing Pillow vs PyVIPS used for this issue:
# https://github.com/libvips/pyvips/issues/148
import sys
import timeit
import pyvips