Skip to content

Instantly share code, notes, and snippets.

@aaferrari
aaferrari / parche_xpath.diff
Last active Aug 29, 2015
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 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 Jul 20, 2015
Get total Bitcoin balance from blockexplorer.com
View gist:ccfc39f4b00e3aeadee3
# 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 Feb 11, 2016
Conversor de archivos a "inline" en Bash
View file2base64.sh
#!/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 Mar 11, 2017
Todas las imágenes de andalinux.wordpress.com
View Todas las imágenes de andalinux.wordpress.com.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 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 Sep 3, 2019
Imágenes recuperadas de andalinux.wordpress.com
View Imágenes recuperadas de andalinux.wordpress.com.csv
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 Sep 1, 2017
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 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
[Work in progress] This patch should make possible for aMSN to connect with [Escargot](http://escargot.log1p.xyz/) 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
aaferrari / timetable2ical.sql
Last active Nov 1, 2018
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
aaferrari / csic-scraper.py
Created Nov 26, 2018
Scraper to extract information from Spanish National Research Council page
View csic-scraper.py
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 Nov 26, 2018
File generated with csic-scraper.py
View csic.books.json
[
{
"author": [
"Josep-Maria Gili",
"Bego\u00f1a Vendrell",
"Mag\u00ed Marc\u00e9"
],
"category": [
"Popular Science"
],