Skip to content

Instantly share code, notes, and snippets.

@axd
axd / candidates.json
Last active March 8, 2018 15:20
Extracto de archivo JSON que utiliza el portal de TSE
optionsRegister": [
{
"ballotCode": 26301, //Identificador único de candidato
"ballotName": "CLAUDIA MARIA GONZALEZ", //Nombre de diputado(a)
"partyCode": 1, // Código de partido
"partyBgColorC": 96, // Color CMYK del partido
"partyBgColorK": 0, // Color CMYK del partido
"partyBgColorM": 69, // Color CMYK del partido
"partyBgColorY": 0, // Color CMYK del partido
"partyCustomCode": "1", // Código personalizado del partido (?)
@axd
axd / tse.php
Last active March 7, 2018 09:58
#!/usr/bin/php
<?php
/**
* TSE Downloader
* Copyright (C) 2018
*
* Script para obtener todas las actas (imágenes) de las diferentes JRV
* para elección de diputados de la Asamblea Legislativa 2018.
* Utilización:
* tse.php departamentos -- Genera estructura base para la descarga.
@axd
axd / pic.php
Last active October 25, 2016 22:52
<?php
if(isset($_GET['img'])) $image = getimagesize($_GET['img']);
else if ($image === false) trigger_error('Error: The URL given is an invalid image.', E_USER_ERROR);
else trigger_error('Error: The $img variable is no set.', E_USER_ERROR);
$qlty = isset($_GET['cqlty']) && $_GET['cqlty'] <= 100 ? $_GET['cqlty'] : 80;
$mime = explode('/', $image['mime']);
$ext = strtolower($mime[1]);
list($width, $height) = $image;

Keybase proof

I hereby claim:

  • I am axd on github.
  • I am axd (https://keybase.io/axd) on keybase.
  • I have a public key whose fingerprint is 3464 8B45 C50F 05B5 5924 0560 7ACB F3CE F305 D1FC

To claim this, I am signing this object:

@axd
axd / whatsapp.rb
Created October 2, 2013 18:17 — forked from serdna/whatsapp.rb
#!/usr/bin/env ruby
#
# Whatsapp status crawler for Central America mobile phone numbers.
#
# Based on a SBD post by Alejandro Ramos:
# http://www.securitybydefault.com/2012/03/casi-10-millones-de-moviles-espanoles.html
#
# Modified by @hugogilmar & @andrexu for mobile phone numbers in El Salvador
#--------------------------------------------------------------------------------------
# You must change some parameters matching to your country, your country code, for example. HAVE FUN!