Skip to content

Instantly share code, notes, and snippets.

View jazzido's full-sized avatar
💭
𝄢

Manuel Aristarán jazzido

💭
𝄢
View GitHub Profile
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 July 25, 2009 06:42
Rapidshare Reminder -- Session expirations, no more!
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');
}
<!--- 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" />
{"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 }]
# -*- 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'
# 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):
==> 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
# 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 August 9, 2011 00:53
Convertir escrutinios electorales elección Gobernador pcia Córdoba 2011
# 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 August 17, 2011 14:38
Schema de la Db de la app distribuida por el ministerio del interior
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
-------------------------------------------------------------