Skip to content

Instantly share code, notes, and snippets.

View juque's full-sized avatar

Juan Pablo Aqueveque juque

View GitHub Profile
@juque
juque / patan2
Created May 4, 2011 02:15
Patan 2.01
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import feedparser, pprint
# Documentacion feedparse:
# http://www.feedparser.org/docs/
feed_mercado_publico = "http://www.mercadopublico.cl/Portal/feed.aspx?OrgCode=296647"
# Depurar
pp = pprint.PrettyPrinter(depth=6)
<a href=""><img src="http://sem.silogismo.com/wp-content/uploads/2011/05/publicacion-3-75x75.jpg" alt="" title="" width="75" height="75" class="alignnone size-detail wp-image-171" /></a>stdClass Object
(
[term_id] => 7
[name] => European Journal of Mineralogy
[slug] => european-journal-of-mineralogy
[term_group] => 0
[term_taxonomy_id] => 8
[taxonomy] => revista
[description] => Revista de la European Journal of Mineralogy
[parent] => 0
import threading
import thread
import time
import sys
class MyThread(threading.Thread):
def __init__(self):
super(MyThread, self).__init__()
def run(self):
(SELECT count( * ) -1 as count , a.rut_int,a.rut2_int,a.apa_int,a.nom_int,a.ama_int,a.com_int,a.ciu_int,a.fon_int,a.dir_int,a.mail1_int,a.mail2_int FROM integrantes a LEFT OUTER JOIN turnos_sol b ON b.rut_tursol=a.rut2_int where a.rut2_int LIKE '%%' AND DATE_FORMAT(b.fec_tursol,'%Y-%m-%d') >= '2011-04-15' AND DATE_FORMAT(b.fec_tursol,'%Y-%m-%d') <= '2011-05-15' and a.estado_int=1 GROUP BY a.rut2_int,a.rut2_int,a.apa_int,a.nom_int,a.ama_int,a.com_int,a.ciu_int,a.fon_int,a.dir_int,a.mail1_int,a.mail2_int ORDER BY count(*) asc limit 10);
+------------+
| rut_tursol |
+------------+
| 17340001 |
| 17769881 |
| 17230363 |
| 17098117 |
| 17666572 |
| 16718160 |
| 16642100 |
SELECT count( * ) -1 as count,
a.rut_int,
a.rut2_int,
a.apa_int,
a.nom_int,
a.ama_int,
a.com_int,
a.ciu_int,
a.fon_int,
a.dir_int,
<?php
if ( isset($_POST['enviar']) ) {
/**
* Se prepara la sentencia SQL para insertar
*/
$_sql = "
INSERT INTO hostal (
identificador,
nombre,
correo,
#!/bin/sh
VIMSERVER=`mvim --serverlist`
if [ $VIMSERVER ]
then
mvim --servername VIM --remote-send '<Esc>:tabnew<CR>'
else
mvim
fi
<?php
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$options = array(
'host' => '10.181.132.100',
'baseDn' => 'OU=usuarios,DC=localhost',
'bindRequiresDn' => true
);
$ldap = new Zend_Ldap($options);
$ldap->bind();
@juque
juque / gist:1754125
Created February 6, 2012 19:08
Show the image filename as a legend in modal window
/*
* Bootic.net
* Show the image filename as a legend in modal window
*/
var showVariantName = (function(){
function getVariantName(url) {
var reImg = /(\d+)-([^?]*)/;
var reStripExt = /(.*)\.[^.]+$/;
var reCleanName = /_+|-+/g;
return url.split("/").pop().match(reImg)[2].match(reStripExt)[1].replace(reCleanName,' ');