Skip to content

Instantly share code, notes, and snippets.

aaferrari / parche_xpath.diff
Last active August 29, 2015 14:10
Patch for xpath script in Gentoo (comments in spanish)
View parche_xpath.diff
# Parche para el script ejecutable de xpath. Aplíquese en Gentoo o en cualquier
# instalación cuyo hash de archivo sea acb44c08365e33b1bd0feab421c75167 (se comprueba
# con "md5sum /ruta/hacia/xpath")
# Como aplicarlo
# ==============
# wget\
# && sudo patch /usr/bin/xpath parche_xpath.diff
# Como revertirlo
aaferrari / gist:ccfc39f4b00e3aeadee3
Created July 20, 2015 19:02
Get total Bitcoin balance from
View gist:ccfc39f4b00e3aeadee3
# need BeautifulSoup2
from BeautifulSoup import BeautifulSoup as bs
for direccion in direcciones:
sopa = bs(getter("" % direccion))
tabla = sopa.find("table", {"class":"txtable"})
fila = tabla.findAll("tr")[-1]
celdas = fila.findAll("td")
if celdas != []:
aaferrari /
Last active February 11, 2016 11:39
Conversor de archivos a "inline" en Bash
file2base64 () {
# Si es una archivo de internet, entonces se descarga temporalmente y luego se borra
if [[ "$1" =~ ^https?:// ]]; then
wget -q -O $ubicacion $1;
echo 'data:'$(file --mime-type -b $ubicacion)";base64,"$(base64 -w0 $ubicacion);
rm -f $ubicacion > /dev/null;
else # De lo contrario se asume que es un archivo local
# Se utilizan los comandos file para obtener el tipo de archivo y base64 para codificarlo en ese formato
aaferrari / Todas las imágenes de
Last active March 11, 2017 14:26
Todas las imágenes de
View Todas las imágenes de
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 1. in line 6.
Imagen,Tamaño (en bytes),Articulo,131159,,14784,,33088,,44710,,27535,
aaferrari / Imágenes recuperadas de
Last active September 3, 2019 17:06
Imágenes recuperadas de
View Imágenes recuperadas de
Original Copia recuperable http://wayback
aaferrari / Proyectos en Google Code.tsv
Last active September 1, 2017 11:57
Algunos proyectos en Google Code
View Proyectos en Google Code.tsv
Nombre Sumario Movido a
abbaye-for-linux Linux port of indie game Abbaye des Morts
advanced-buddy-search-perl-pidgin Advanced Buddy Search Perl Pidgin
akernelloader Develope a Simple boot loader
altdrag Easily drag windows when pressing the alt key
amarino Android meets Arduino
android-apktool A tool for reverse engineering Android apk files
android-x86 An open source project to provide android support on x86
androidscreencast Desktop app to control an android device remotely
androino connect your mobile to real world objects
aaferrari / amsn-with-escargot.patch
Last active May 12, 2020 12:50
[Work in progress] This patch should make possible for aMSN to connect with [Escargot]( servers
View amsn-with-escargot.patch
--- amsn-0.98.9/config-original.tcl
+++ amsn-0.98.9/config.tcl
@@ -63,7 +63,7 @@
::config::setKey cam_in_cw 0
- ::config::setKey protocoloverride 0
+ ::config::setKey protocoloverride 1
::config::setKey receiveddir [::config::getDefaultDownloadDir]
aaferrari / timetable2ical.sql
Last active November 1, 2018 05:56
Convert TimeTable subjects schedules into an iCal file.
View timetable2ical.sql
To test it you need to extract the database of the application and execute the
SQL statements in an external program or from Android with the following command
(it is assumed that the device is rooted):
sqlite3 /data/data/com.gabrielittner.timetable/databases/timetable.db < timetable2ical.sql
CREATE temporary TABLE weekdays ('day' INTEGER, 'short_name' CHAR, 'long_name' VARCHAR);
insert into weekdays values('1', 'MO', 'Monday');
insert into weekdays values('2', 'TU', 'Tuesday');
aaferrari /
Created November 26, 2018 01:06
Scraper to extract information from Spanish National Research Council page
import scrapy, json
from scrapy.crawler import CrawlerProcess
class BookSpider(scrapy.Spider):
name = "freebooks"
start_urls = ['']
def parse(self, response):
# Because the HTML is malformed the links of the books are extracted with regular expressions
urls = list(set(response.css("#principal").re("\?products_id=[0-9]+")))
aaferrari / csic.books.json
Created November 26, 2018 01:09
File generated with
View csic.books.json
"author": [
"Josep-Maria Gili",
"Bego\u00f1a Vendrell",
"Mag\u00ed Marc\u00e9"
"category": [
"Popular Science"