Skip to content

Instantly share code, notes, and snippets.

View jazzido's full-sized avatar
💭
𝄢

Manuel Aristarán jazzido

💭
𝄢
View GitHub Profile
@jazzido
jazzido / scraper_padron.rb
Created November 28, 2011 23:08
Scraper para el padrón de renunciantes voluntarios a los subsidios de servicios públicos
# script muy mugriento
# el loop termina cuando hay excepción.
# TODO: agregar un parametro para poder empezar el scraping desde un
# id de tramite ne particular, para evitar scanear TODO.
require "watir-webdriver"
require "nokogiri"
require "csv"
pages_per_set = 1
require 'nokogiri'
require 'json'
DISTRICT_DATA_RE = /->([^:]+):(.+)/
def parse_data_table(element)
Hash[*element.xpath('.//td[@bgcolor="#ECC6D5"]').map { |td_bg|
[td_bg.next_element.inner_text, td_bg.next_element.next_element.inner_text]
}.flatten]
end
@jazzido
jazzido / .emacs
Created December 13, 2011 19:34
bare minimum .emacs
(tool-bar-mode -1)
(color-theme-clarity)
(server-start)
(menu-bar-mode -1)
(ido-mode)
(show-paren-mode)
(setq x-select-enable-clipboard t)
@jazzido
jazzido / afip.user.js
Created February 7, 2012 00:49
Arreglar AFIP en Firefox, Chrome, etc
// ==UserScript==
// @name AFIP-navigate
// @namespace http://www.nerdpower.org/
// @description Arregla el sitio de AFIP para poder imprimir constancias de Monotributo, entre otras cosas
// @include https://*.afip.gov.ar/*
// @include http://*.afip.gov.ar/*
// ==/UserScript==
// esto lo saque de aca: https://gist.github.com/1143845
window.unsafeWindow || (
/************************************** subsystem.c **************************************/
#define METHOD(x) typeof(x) *x;
typedef enum {
BOOT,
SURVIVAL,
MISSION
} mode_t;
/* opaque pointer ? */
;; esto va en el .emacs
; auto syntax check
(require 'flymake)
(require 'flymake-clang-c)
(add-hook 'c-mode-hook 'flymake-clang-c-load)
;; ~/.site-lisp/flymake-clanc-c.el
;; lo único que habría que hacer es setear los "-I" de acuerdo a elisp variable.
(defun flymake-clang-c-init ()
# Para hacer los thumbnails de los mapitas
CROP_BOX = (24, 330, 24+401, 330+861)
THUMBNAIL_SIZE = (103, 103)
import selenium, time, string
from selenium import webdriver
from PIL import Image
browser = webdriver.Firefox()
browser.get('http://localhost:8000')
@jazzido
jazzido / index.html
Last active January 10, 2022 03:52
Glowing text effect with CSS3
<html>
<head>
<style type="text/css">
.glow {
-webkit-animation-duration: 1s;
-webkit-animation-name: glow;
-webkit-animation-direction: alternate;
-webkit-animation-iteration-count: infinite;
animation-duration: 1s;
animation-name: glow;
@jazzido
jazzido / LICENSE.md
Last active December 16, 2016 04:42
Linked Micromaps Plots

Copyright (C) 2012-2013 Manuel Aristarán jazzido@jazzido.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all

@jazzido
jazzido / lanacion_scraper.rb
Last active December 25, 2015 17:19
La Nacion tags scraper
# -*- coding: utf-8 -*-
require 'json'
require 'logger'
require 'date'
require 'mechanize'
# remove the byte order mark
def remove_BOM(str)
str.force_encoding('utf-8').gsub("\xEF\xBB\xBF".force_encoding('utf-8'), '')