Skip to content

Instantly share code, notes, and snippets.


Manuel Aristarán jazzido

View GitHub Profile
View gist:29998
Feature: Cross-compile C extensions
In order to avoid bitching from Windows users
As a Ruby developer on Linux
I want some rake tasks that take away the pain of compilation
Scenario: compile single extension
Given that all my source files are in place
And I'm running a POSIX operating system
And I've installed cross compile tools
jazzido / gist:154720
Created Jul 25, 2009
Rapidshare Reminder -- Session expirations, no more!
View gist:154720
var notif =;
var statusWidget = null;
var widget = {
html: '<span></span>',
width: 20,
onReady: function(w) {
statusWidget = $(w);
statusWidget.span = statusWidget.find('span');
View bug in mapping.xml
<!--- original from ffffound --->
<description>&lt;p&gt;&lt;a href=""&gt;&lt;img src="" alt="" border="0" width="480" height="451"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;via &lt;a href=""&gt;;/a&gt;&lt;/p&gt;</description>
<guid isPermaLink="true"></guid>
<pubDate>Sat, 20 Mar 2010 17:04:22 +0900</pubDate>
<media:content url="" />
View google-wifi-geolocation.json
{"version": "1.1.0",
"request_address": true,
"wifi_towers": [{"mac_address": "00-23-cd-d6-df-02", "ssid": "", "signal_strenght": -65 },
{"mac_address": "00-40-0c-04-05-93", "ssid": "", "signal_strenght": -90 }]
# -*- coding: utf-8 -*-
# very old (1999?) code for syllabification of spanish words
# based on this thesis:
# Author: Manuel Aristarán (
# License: Creative Commons Atribución 2.5 Argentina --
# usage: determina_caso('cadena de entrada')
vocales = u'aeiouyáéíóúÁÉÍÓÚAEIOUY'
View gist:535987
# coding: utf-8
from datetime import datetime, timedelta
class GPolyline(object):
def __init__(self, points, foo1, foo2):
self.points = points
class GLatLng(object):
def __init__(self, lat, lng):
View gist:634429
==> Caveats
To build plpython against a specific Python, set PYTHON prior to brewing:
PYTHON=/usr/local/bin/python brew install postgresql
If this is your first install, create a database with:
initdb /usr/local/homebrew/var/postgres
View gist:639693
# no me digan nada, es horrible.
import csv
import json
rows = list(csv.reader(open('votos2010.csv').readlines(), delimiter=";"))[1:]
diputados = map(lambda x: x[0], rows)
partidos = list(set(map(lambda x: x[1], rows)))
jazzido / gist:1133176
Created Aug 9, 2011
Convertir escrutinios electorales elección Gobernador pcia Córdoba 2011
View gist:1133176
# convertir escrutinios de eleccion gobernador 2011 pcia de Cordoba a un CSV
# Script horrible.
# requiere la presencia de algunos archivos en el directorio en donde se ejecuta
# para obtenerlos:
# $ wget
# $ wget
# $ for i in `seq 1 26`; do wget`printf %02d $i`_Municipio_000_Circuito_000_Cargo_01.xml; done
# Copyright (c) <2011> <Manuel Aristaran ->
jazzido / gist:1151638
Created Aug 17, 2011
Schema de la Db de la app distribuida por el ministerio del interior
View gist:1151638
manuel@nostromo:~$ mdb-schema '/home/manuel/.wine/drive_c/Elecciones Primarias 2011ARG/DatosBD/ArgentinaP.mdb'
-- MDB Tools - A library for reading MS Access database files
-- Copyright (C) 2000-2004 Brian Bruns
-- Files in libmdb are licensed under LGPL and the utilities under
-- the GPL, see COPYING.LIB and COPYING files respectively.
-- Check out