Skip to content

Instantly share code, notes, and snippets.

View Dillie-O's full-sized avatar

Sean Patterson Dillie-O

View GitHub Profile
anonymous
anonymous / gist:4271964
Created December 12, 2012 21:52
run this in your terminal (mac/linux). via http://www.reddit.com/r/gifs/comments/14p3ip/snowing_cli_style/
clear; while :; do echo $LINES $COLUMNS $(($RANDOM%$COLUMNS)); sleep 0.1; done | awk '{a[$3]=0; for(x in a) {o=a[x]; a[x]=a[x]+1; printf "\033[%s;%sH ",o,x; printf "\033[%s;%sH*\033[0;0H",a[x],x;}}'
@mikejolley
mikejolley / gist:1622323
Created January 16, 2012 18:54
WooCommerce - Change default catalog sort order
/**
* This code should be added to functions.php of your theme
**/
add_filter('woocommerce_default_catalog_orderby', 'custom_default_catalog_orderby');
function custom_default_catalog_orderby() {
return 'date'; // Can also use title and price
}