Skip to content

Instantly share code, notes, and snippets.

@serdna
serdna / pic.php
Created March 27, 2012 21:55
PicHandler, resize images on the fly
<?
if(!isset($_GET['img'])) die('No URL image given');
$image = getimagesize($_GET['img']);
$qlty = isset($_GET['cqlty']) ? ($_GET['cqlty'] <= 100 ? $_GET['cqlty'] : 80) : 80;
if ($image === false) die;
$mime = explode('/', $image['mime']);
$ext = $mime[1];
switch($ext){
case('jpg'): case('jpeg'): case('jpe'):
@serdna
serdna / whatsapp.rb
Created March 7, 2012 02:54
Whatsapp status crawler for Central America mobile phone numbers.
#!/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!