Skip to content

Instantly share code, notes, and snippets.

View MikeGillihan's full-sized avatar
🏠
Working from home

Mike Gillihan MikeGillihan

🏠
Working from home
View GitHub Profile
@MikeGillihan
MikeGillihan / Font sizing with rem mixin
Last active January 3, 2016 09:19
Font sizing with rem mixin. A simple Sass mixin for sizing fonts with rem plus px as a fallback.
@mixin fontsize($size: 16, $base: 16) {
font-size: $size + px;
font-size: ($size / $base) * 1rem;
}
@MikeGillihan
MikeGillihan / Custom Wordpress Excerpts
Last active December 15, 2015 05:39
Custom excerpt lengths for Wordpress. USAGE: <?php echo ows_excerpt(55); ?>
function ows_excerpt($num) {
$cont = get_the_content();
$more = '&hellip; <a href="' . get_permalink() . '">Read More</a>';
$excerpt = wp_trim_words( $cont, $num, $more );
return $excerpt;
}
@MikeGillihan
MikeGillihan / Preferences.sublime-settings
Created January 28, 2013 18:16
My Sublime Text 2 user preferences
{
"theme": "Soda Dark.sublime-theme",
"font_size": 14.0,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"word_wrap": true,
"caret_style": "phase",
"highlight_line": true,
"line_padding_bottom": 1,
"line_padding_top": 1,