Skip to content

Instantly share code, notes, and snippets.

View matiasinsaurralde's full-sized avatar

Matias Insaurralde matiasinsaurralde

  • Paraguay
View GitHub Profile
@matiasinsaurralde
matiasinsaurralde / extended_category_page.php
Last active December 16, 2015 16:40
Wordpress Custom Page
<?php
/*
Template Name: Extended category
(we want to enable many plugins that do not work with the default category template)
*/
?>
<?php
@matiasinsaurralde
matiasinsaurralde / padron
Last active December 16, 2015 11:08
script para obtener los datos del padrón
require 'nokogiri'
require 'net/http'
require 'uri'
require 'cgi'
def data_for(id)
uri, nice_data = URI.parse('http://tsje.gov.py/dinamics/app/consulta-al-padron.php'), {}
http = Net::HTTP.new(uri.host, uri.port); req = Net::HTTP::Post.new(uri.path); req['Host'] = 'tsje.gov.py'; req['Referer'] = 'http://tsje.gov.py/'; req['X-Requested-With'] = 'XMLHttpRequest'; req.set_form_data( { 'cedula' => id }); res = http.request(req); raw_html = res.body; span6_count = 0