Skip to content

Instantly share code, notes, and snippets.

@aaferrari
aaferrari / parche_xpath.diff
Last active August 29, 2015 14:10
Patch for xpath script in Gentoo (comments in spanish)
# 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 https://gist.githubusercontent.com/aaferrari/2bee720d1b8bac7a09ee/raw/parche_xpath.diff\
# && sudo patch /usr/bin/xpath parche_xpath.diff
#
# Como revertirlo
@aaferrari
aaferrari / gist:ccfc39f4b00e3aeadee3
Created July 20, 2015 19:02
Get total Bitcoin balance from blockexplorer.com
# need BeautifulSoup2
from BeautifulSoup import BeautifulSoup as bs
balance=0.0
for direccion in direcciones:
sopa = bs(getter("http://blockexplorer.com/address/%s" % direccion))
tabla = sopa.find("table", {"class":"txtable"})
fila = tabla.findAll("tr")[-1]
celdas = fila.findAll("td")
if celdas != []:
@aaferrari
aaferrari / file2base64.sh
Last active February 11, 2016 11:39
Conversor de archivos a "inline" en Bash
#!/bin/bash
file2base64 () {
# Si es una archivo de internet, entonces se descarga temporalmente y luego se borra
if [[ "$1" =~ ^https?:// ]]; then
ubicacion="/tmp/imagen-temporal";
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
aaferrari / Todas las imágenes de andalinux.wordpress.com.csv
Last active March 11, 2017 14:26
Todas las imágenes de andalinux.wordpress.com
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
https://andalinux.files.wordpress.com/2016/08/malware-bancos-android.png?w=646,131159,https://andalinux.wordpress.com/2016/08/23/la-banca-adalid-de-la-seguridad-xd/
https://andalinux.files.wordpress.com/2016/09/firefox-screenshots.png?w=646,14784,https://andalinux.wordpress.com/2016/09/20/genial-capturas-con-scroll-en-firefox-sin-usar-extensiones/
https://dl.dropboxusercontent.com/u/9954917/articulos/configurar-web-developer-firefox.png,33088,https://andalinux.wordpress.com/2016/09/20/genial-capturas-con-scroll-en-firefox-sin-usar-extensiones/
https://dl.dropboxusercontent.com/u/9954917/articulos/enable-fullpage-screenshot.png,44710,https://andalinux.wordpress.com/2016/09/20/genial-capturas-con-scroll-en-firefox-sin-usar-extensiones/
https://dl.dropboxusercontent.com/u/9954917/articulos/enable-firefox-screenshots.png,27535,https://andalinux.wordpress.com/2016/09/20/genial-capturas-con-scroll-en-firefox-sin-usar-extensiones/
https://andalinux.files.wordpress.com/2014/03/pirate
@aaferrari
aaferrari / Imágenes recuperadas de andalinux.wordpress.com.csv
Last active September 3, 2019 17:06
Imágenes recuperadas de andalinux.wordpress.com
Original Copia recuperable
https://cdn.bitelia.com/files/2011/02/facbook_vs_twitter_infographic1-e1297842276356.jpg https://i1.wp.com/hipertextual.com/archivo/wp-content/uploads/2011/02/facbook_vs_twitter_infographic1-e1297842276356.jpg?resize=640%2C1449
https://img100.imageshack.us/img100/4070/cambiartemagrubpf6.jpg http://wayback.archive.org/web/20140221211650/http://img100.imageshack.us/img100/4070/cambiartemagrubpf6.jpg
https://img105.imageshack.us/img105/6253/seguridadmd5ba6.png http://wayback.archive.org/web/20120903021041/http://img105.imageshack.us/img105/6253/seguridadmd5ba6.png
https://img107.imageshack.us/img107/9936/incluirenlaceed2kjc9.png http://wayback.archive.org/web/20120910132145/http://img107.imageshack.us/img107/9936/incluirenlaceed2kjc9.png
https://img110.imageshack.us/img110/4350/xnestventanajj6.png http://wayback.archive.org/web/20140221200310/http://img110.imageshack.us/img110/4350/xnestventanajj6.png
https://img111.imageshack.us/img111/6643/seleccionarcuentagmailik9.png http://wayback
@aaferrari
aaferrari / Proyectos en Google Code.tsv
Last active September 1, 2017 11:57
Algunos proyectos en Google Code
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 http://www.coder-world.de/
akernelloader Develope a Simple boot loader
altdrag Easily drag windows when pressing the alt key https://stefansundin.github.io/altdrag/
amarino Android meets Arduino
android-apktool A tool for reverse engineering Android apk files http://ibotpeaches.github.io/Apktool/
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
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](http://escargot.log1p.xyz/) servers
--- 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
aaferrari / timetable2ical.sql
Last active November 1, 2018 05:56
Convert TimeTable subjects schedules into an iCal file.
/*
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
aaferrari / csic-scraper.py
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 = ['http://libros.csic.es/freebooks.php']
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("http://libros.csic.es/product_info.php\?products_id=[0-9]+")))
@aaferrari
aaferrari / csic.books.json
Created November 26, 2018 01:09
File generated with csic-scraper.py
[
{
"author": [
"Josep-Maria Gili",
"Bego\u00f1a Vendrell",
"Mag\u00ed Marc\u00e9"
],
"category": [
"Popular Science"
],