Skip to content

Instantly share code, notes, and snippets.

View mattwiebe's full-sized avatar

Matt Wiebe mattwiebe

View GitHub Profile
@mattwiebe
mattwiebe / keybase.md
Created January 20, 2015 23:54
keybase verification

Keybase proof

I hereby claim:

  • I am mattwiebe on github.
  • I am mattwiebe (https://keybase.io/mattwiebe) on keybase.
  • I have a public key whose fingerprint is 4E08 5645 1F69 5D0A B0FA 2DF0 31C2 3ED8 EDEF 5823

To claim this, I am signing this object:

curl -s https://typekit.com/api/v1/json/families/gkmg | jsonpretty
{
"family": {
"id": "gkmg",
"name": "Droid Sans",
"slug": "droid-sans",
"web_link": "http://typekit.com/fonts/droid-sans",
"browse_info": {
"capitals": [
"uppercase-lowercase"
<?php
/**
* A couple of functions for caching the global post object so that contextual
* stuff (eg: sidebars) still works after custom queries
* NOT for use with query_posts(). Real WP coders always do a new WP_Query.
*/
function sd_cache_post() {
global $post, $sd_cached_post;
$sd_cached_post = $post;
}
/**
* Lucida Grande doesn't have italics, but is preferable for its small size awesomeness.
* Lucida Sans has lovely italics.
* Let's use @font-face to combine them
*/
body {
font-family:'Lucida Improved','Lucida Grande','Lucida Sans','Lucida Sans Unicode',Verdana,sans-serif;
}
@font-face {
font-family:'Lucida Improved';
/**
* Soma HTML5 CSS Reset. Assumed an HTML5 shiv for IE < 9
* Builds from http://meyerweb.com/eric/tools/css/reset/
*/
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,big,cite,code,del,em,font,img,ins,small,strong,sub,sup,tt,b,u,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
a:focus{outline:1px dotted;}
@mattwiebe
mattwiebe / sd_mail_killer.php
Created December 21, 2010 01:25
A simple class to override WP's email functionality to debug/inspect what will be sent. Put in your mu-plugins directory.
<?php
/*
Plugin Name: Mail Killer/Logger
Description: A simple class to override WP's email functionality to debug/inspect what will be sent. Put in your mu-plugins directory.
Version: 1.0
Author: Matt Wiebe
Author URI: http://somadesign.ca/
License: A "Slug" license name e.g. GPL2
*/
@mattwiebe
mattwiebe / sd_lessn.php
Created January 11, 2011 18:25
Lessn More integration for WP
<?php
/*
Plugin Name: Lessn Shortlinks
Description: Integrates WP's shortlink functionality with the <a href="http://lessnmore.net/">Lessn More</a> URL shortener. <em>Hasn't been tested with vanilla Lessn, but the API should be compatible.</em> (Edit the file manually to configure)
Version: 1.0
Author: Matt Wiebe
Author URI: http://somadesign.ca/
*/
/**
@mattwiebe
mattwiebe / sd_list_authors.php
Created January 23, 2011 23:49
An slight mod of wp_list_authors to optionally add a class to the current author in an author archive.
<?php
/**
* List all the authors of the blog, with several options available.
* Edited to optionally include current-author class on author archives
*
* <ul>
* <li>optioncount (boolean) (false): Show the count in parenthesis next to the
* author's name.</li>
* <li>exclude_admin (boolean) (true): Exclude the 'admin' user that is
@mattwiebe
mattwiebe / cleaner_menus.php
Created February 8, 2011 06:45
Clean up the cruft on WP-generated menus
<?php
/**
* De-cruft WordPress-generated menu HTML
* @author Matt Wiebe
* @link http://somadesign.ca/
* @contributor Roger Johansson {@link} http://www.456bereastreet.com/archive/201101/cleaner_html_from_the_wordpress_wp_list_pages_function/
* @license GPL v2 {@link} http://www.opensource.org/licenses/gpl-2.0.php
* @copyright 2011
*/
class SD_Cleaner_Menus {
@mattwiebe
mattwiebe / conditional-html.php
Created April 8, 2011 05:11
Conditional <html> for WordPress
<?php
/**
* The WordPress answer to:
* @link paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
* @author Matt Wiebe
* @link http://somadesign.ca/
* @var $min int minimum version of IE to target.
* @var $max int maximum version of IE to target - will receive no IE-specific classes.
*/