Skip to content

Instantly share code, notes, and snippets.

View juliomenendez's full-sized avatar

Julio Carlos Menendez juliomenendez

View GitHub Profile
@juliomenendez
juliomenendez / gist:1222225
Created September 16, 2011 14:23
Get an array with all the changesets on a Trac ticket
$('a.changeset').map(function(i, o) { s = String($(o).html()).match(/^\[(\d+)/); return s[1]; });
@juliomenendez
juliomenendez / gist:1195724
Created September 5, 2011 19:25
Show one post per author in WP
add_filter('posts_groupby', 'author_groupby');
function author_groupby($groupby)
{
global $wpdb;
$author_groupby = "{$wpdb->posts}.post_author";
if(preg_match("/$author_groupby/", $groupby)) {
// grouping we need is already there
@juliomenendez
juliomenendez / gist:1189497
Created September 2, 2011 18:54 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Python developer at the pathology department of the University of Utah. Mostly doing bioinformatics.
Favorite Python project: Django
Favorite Conference: Google IO
Python Experience Level: between intermediate and expert. 4 years.