Skip to content

Instantly share code, notes, and snippets.

Manuel Aristarán jazzido

Block or report user

Report or block jazzido

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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
jazzido / gist:154720
Created Jul 25, 2009
Rapidshare Reminder -- Session expirations, no more!
View gist:154720
var notif = jetpack.notifications.show;
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 --->
<item>
<title>Exhibitions</title>
<link>http://ffffound.com/image/2f6feffab512ca2e8d5b791a530323c02eba0404</link>
<description>&lt;p&gt;&lt;a href="http://ffffound.com/image/2f6feffab512ca2e8d5b791a530323c02eba0404"&gt;&lt;img src="http://img.ffffound.com/static-data/assets/6/2f6feffab512ca2e8d5b791a530323c02eba0404_m.jpg" alt="" border="0" width="480" height="451"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;via &lt;a href="http://www.artmap.com.tw/2-show-past/02-show9809-eng.htm"&gt;http://www.artmap.com.tw/2-show-past/02-show9809-eng.htm&lt;/a&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">http://ffffound.com/image/2f6feffab512ca2e8d5b791a530323c02eba0404</guid>
<author>pjbond</author>
<pubDate>Sat, 20 Mar 2010 17:04:22 +0900</pubDate>
<media:content url="http://img.ffffound.com/static-data/assets/6/2f6feffab512ca2e8d5b791a530323c02eba0404_m.jpg" />
View google-wifi-geolocation.json
{"version": "1.1.0",
"request_address": true,
"wifi_towers": [{"mac_address": "00-23-cd-d6-df-02", "ssid": "inkpro.net", "signal_strenght": -65 },
{"mac_address": "00-40-0c-04-05-93", "ssid": "inkpro.net", "signal_strenght": -90 }]
View spanish_syllabification.py
# -*- coding: utf-8 -*-
# very old (1999?) code for syllabification of spanish words
# based on this thesis: http://www.fismat.umich.mx/~karina/tesisLicenciatura/capitulo2.html
# Author: Manuel Aristarán (jazzido.com)
# License: Creative Commons Atribución 2.5 Argentina -- http://creativecommons.org/licenses/by/2.5/ar/
# 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
See:
http://www.postgresql.org/docs/9.0/static/install-procedure.html
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
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 http://www.eleccordoba2011.com.ar/iniele/listas.xml
# $ wget http://www.eleccordoba2011.com.ar/iniele/secciones.xml
# $ for i in `seq 1 26`; do wget http://www.eleccordoba2011.com.ar/resultados/Seccion_`printf %02d $i`_Municipio_000_Circuito_000_Cargo_01.xml; done
#
# Copyright (c) <2011> <Manuel Aristaran - http://jazzido.com>
@jazzido
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 http://mdbtools.sourceforge.net
-------------------------------------------------------------
You can’t perform that action at this time.