Skip to content

Instantly share code, notes, and snippets.

View cega's full-sized avatar

Carlos GALINDEZ cega

  • Córdoba, CORDOBA, ARGENTINA
View GitHub Profile
@jpetazzo
jpetazzo / README.md
Last active September 30, 2022 05:36
Share a directory with a docker container

Rectifier

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!

@ryanfitz
ryanfitz / blocklist_update.sh
Created April 21, 2012 01:07
update transmission blocklists
#!/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
@tbranyen
tbranyen / application.js
Created October 5, 2011 19:14
code for organization post
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.
@jeffkistler
jeffkistler / filters.py
Created May 25, 2011 05:12
Django Class-Based View Mixins
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:
@astanin
astanin / compare.py
Created October 14, 2010 15:20
Compare two aligned images of the same size
#!/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
@lucashungaro
lucashungaro / links.textile
Created August 14, 2010 16:36
Links de referência utilizados em minha palestra