Skip to content

Instantly share code, notes, and snippets.

Avatar

Rogier Borst rogierborst

  • Amersfoort, the Netherlands
View GitHub Profile
View Words of Wisdom
1) Always start your day with a failing test
@rogierborst
rogierborst / gist:5825989
Created Jun 20, 2013
The first and only acceptance test you'll ever need
View gist:5825989
$this->assertCompanyLogoIsReallyBig();
@rogierborst
rogierborst / $.slideUp on table rows.js
Last active Jul 19, 2021
Make table rows slideUp with jQuery
View $.slideUp on table rows.js
$('tr').children('td')
.animate({'padding-top' : 0, 'padding-bottom' : 0}) // first remove vertical padding
.wrapInner('<div />') // wrap contents in divs, because THOSE can be animated
.children()
.slideUp(function(){
$(this).closest('tr').remove();
});
@rogierborst
rogierborst / gist:2786753
Created May 25, 2012 — forked from GaryJones/gist:1258784
Using the template_include filter in WordPress
View gist:2786753
<?php
add_filter( 'template_include', 'ja_template_include' );
function ja_template_include( $template ) {
if ( !is_category() )
return $template;
$category_info = get_category(get_query_var('cat'));
if ( $category_info->parent == 0 )