Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am vibragiel on github.
  • I am gabi (https://keybase.io/gabi) on keybase.
  • I have a public key whose fingerprint is E358 7EB7 117D 9455 F198 1F2F 35C3 BEEA 4D1D 5421

To claim this, I am signing this object:

@vibragiel
vibragiel / emoticons_bookmarklet.md
Last active August 29, 2015 13:58
Bookmarklet to show handy copyable emoticons. External maintained version.

#Look Of Disapproval bookmarklet

This bookmarklet shows the look of disapproval emoticon, plus a bunch of other handy ones. It's based on maciak's bookmarklet, but uses an alert() instead.

Create a bookmark in your bookmarks toolbar and paste the following code into the URL/Location field:

javascript: (function () {
  var jsCode = document.createElement('script');
  jsCode.setAttribute('src', 'https://gist.githubusercontent.com/vibragiel/10368913/raw/ae08f049ae42bfd7394eb87dbcf8b4e0dff38f67/showEmoticos.js');
 document.body.appendChild(jsCode);
@vibragiel
vibragiel / screenshare
Last active September 9, 2015 11:13
Script to grab a screenshot, put it in a Dropbox directory and copy its public link into the clipboard. Modified from https://gist.github.com/Saicheg/4231551
#!/bin/bash
# Usage: screenshare [-m <window|area|desktop>] [-d <integer>] [-p]
# -m window Grab active window
# -m area Grab an area selected with the mouse
# -m desktop Grab whole desktop
# -d <integer> Grab after the specified delay in seconds
# -p Include mouse pointer in the screenshot
# Description: Take a screenshot, store it in Dropbox and copy public link
# into the clipboard
# Author: Gabriel Rodríguez Alberich
@vibragiel
vibragiel / byzanz-gui
Created September 9, 2015 13:26
Script to grab a screenshot, put it in a Dropbox directory and copy its public link into the clipboard. Modified from: http://askubuntu.com/a/201018
#!/bin/bash
# AUTHOR: (c) Rob W 2012, modified by MHC (http://askubuntu.com/users/81372/mhc), modified by Gabi (http://gabi.is) to use xrectsel and Dropbox
# NAME: GIFRecord 0.1
# DESCRIPTION: A script to record GIF screencasts.
# LICENSE: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# DEPENDENCIES: byzanz,gdialog,notify-send (install via sudo add-apt-repository ppa:fossfreedom/byzanz; sudo apt-get update && sudo apt-get install byzanz gdialog notify-osd beep)
# Time and date
TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
@vibragiel
vibragiel / gist:3707083
Created September 12, 2012 14:40
Rate of aviation incidents per million of scheduled passengers carried (selected airlines)

Rate of aviation incidents per airline per million of scheduled passengers carried

Airline* Rate Passengers†
Air Canada 2.73 130,132,000
WestJet 1.50 59,537,000
American Airlines 1.19 389,668,313
Aeroflot 1.02 48,090,000
Swiss 0.83 57,630,000
Lufthansa 0.68 302,717,000
@vibragiel
vibragiel / papeles_barcenas.json
Last active December 12, 2015 02:48
JSON con los papeles de Bárcenas publicados por EL PAÍS en http://elpais.com/especiales/2013/caso_barcenas/todos_los_papeles.html
[
{
"forma": "Efectivo",
"debe_unidad": "(\u00bf?)",
"debe": 8.0,
"concepto": "Saldo inicial (entrega R. N.)",
"haber": null,
"anyo": 1990,
"saldo": 8.0,
"saldo_unidad": "(\u00bf?)",
@vibragiel
vibragiel / parse_papeles.py
Created February 3, 2013 15:28
Script para convertir los papeles de Bárcenas publicados por EL PAÍS a json.
# -*- coding: utf8 -*-
import re
import json
from lxml import html
try:
from urllib2 import urlopen
except ImportError:
from urllib import urlopen
PAPELES_URL = "http://elpais.com/especiales/2013/caso_barcenas/" \
@vibragiel
vibragiel / multigrafias.json
Created February 6, 2013 17:21
Palabras del español que tienen varias escrituras distintas, en JSON. Albóndiga o almóndiga, cuásar o quásar, raíl o rail, faba o haba... ¡Hay más de 4000!
[
[
"abajar",
"bajar"
],
[
"abalaustrado",
"balaustrado"
],
[
@vibragiel
vibragiel / notable-absences.py
Last active December 12, 2015 08:39
This script retrieves the interlanguage links for every featured article in the English Wikipedia and prints a list of those articles not present in the Wikipedia language provided as a command line parameter. The list is sorted on the total number of interlanguage links of the articles. That is, it shows good articles present in many Wikipedias…
#/usr/bin/env python
# -*- coding: utf8 -*-
# notable-absences.py - Prints a list of featured articles in the English
# Wikipedia which are not present in the provided
# Wikipedia language, sorted by the number of
# interlanguage links of the article. That is, notable
# articles present in many Wikipedias, but not on the
# provided one.
#
# Copyright (C) 2012 Gabriel Rodríguez Alberich <chewie@gmail.com>
@vibragiel
vibragiel / 350_exim4-config_vdom_aliases
Created July 3, 2013 18:14
Fichero router para exim4, a colocar en /etc/exim4/conf.d/router, para permitir dominios y usuarios de correo virtuales. Dentro de /etc/mail/virtual/ hay que crear un fichero por cada dominoi, y dentro los alias de correo que se mapean a usuarios locales.
router_virtualdomains:
driver = redirect
domains = dsearch;/etc/mail/virtual
data=${lookup{$local_part}lsearch*{/etc/mail/virtual/$domain}}
no_more