- Jim Weirich: The Building Blocks of Modularity – http://goo.gl/g4Nk
- Jim Weirich: SOLID Ruby – http://goo.gl/z3jd
- Sandi Metz: SOLID Object-Oriented Design – http://goo.gl/PDn6T
- Sandi Metz: Less – The Path to Better Design – http://goo.gl/VuTl4
- Demeter is for Encapsulation – http://is.gd/eeyLx
- Opinionated Modular Code – http://is.gd/eeyXm
- Scaling to Hundreds of Millions of Requests – http://vimeo.com/12814529
- Confident Code – http://goo.gl/VFLX
- Destroy All Software Screencasts – https://www.destroyallsoftware.com/screencasts
- Corey Haines: Fast Rails Tests – http://goo.gl/Va2gb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Compare two aligned images of the same size. | |
Usage: python compare.py first-image second-image | |
""" | |
import sys | |
from scipy.misc import imread | |
from scipy.linalg import norm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django_filters.filterset import FilterSet, FilterSetMetaclass | |
def filterset_factory(model, filterset=FilterSet, fields=None, exclude=None, | |
filter_for_field=None): | |
""" | |
Build a ``FilterSet`` class for a specified model with the specified | |
options. | |
""" | |
attrs = {'model': model} | |
if fields is not None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chat = { | |
// Create this closure to contain the cached modules | |
module: function() { | |
// Internal module cache. | |
var modules = {}; | |
// Create a new module reference scaffold or load an | |
// existing module. | |
return function(name) { | |
// If this module has already been created, return it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
killall -9 transmission-daemon | |
rm -v /mnt/SEA_DISC/torrents/.config/transmission-daemon/blocklists/* | |
cd /mnt/SEA_DISC/torrents/.config/transmission-daemon/blocklists | |
ls /mnt/SEA_DISC/torrents/.config/transmission-daemon/blocklists | |
wget -q -O bt_level1.gz http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz | |
wget -q -O bt_level2.gz http://list.iblocklist.com/?list=bt_level2&fileformat=p2p&archiveformat=gz |
The diode bridge is the simplest rectifier I know.
Rectifier lets you share a directory with a docker container (just like $yourvm
shared folders).
You don't have to install anything in your containers, and you only need to install diod
in the host. diod
is packaged on Ubuntu/Debian distros, and will automatically be apt-get install
-ed if needed.
Since it uses diod
to make a bridge, I called it rectifier. Yeah, that sucks, so if you have a better name, I'll steal it!