Skip to content

Instantly share code, notes, and snippets.

View micahblu's full-sized avatar

Micah Blu micahblu

View GitHub Profile
@micahblu
micahblu / index.html
Created August 10, 2013 01:11
A CodePen by Micah Blu. Fluid Navigation with evenly spaced tabs - ever have a navigation where you want the tabs to be all the same width and span the entire width of the layout? this aims at helping to do just that and is dynamic so as you add or subtract menu items, it will adjust accordingly
<nav>
<ul>
<li><span>Home</span></li>
<li><span>About</span></li>
<li><span>Our Work</span></li>
<li><span>Blog</span></li>
<li><span>Contact</span></li>
</ul>
</nav>
@micahblu
micahblu / gist:5980874
Created July 12, 2013 01:59
git export master as zip
git archive --format zip --output /full/path/to/zipfile.zip master
@micahblu
micahblu / gist:5872893
Last active December 19, 2015 00:59
A simple WordPress method that lets us know if were on a blog page or not
/**
* is_blog
*
* A simple method that lets us know if were on a blog page or not
*
* @return bool
* @since 0.7
*/
function is_blog () {
global $post;
@micahblu
micahblu / gist:5786794
Created June 15, 2013 03:43
a wordpress function that allows you to grab a page or custom post type by its slug. Originally from Matheus Eduardo http://wordpress.stackexchange.com/users/3575/matheus-eduardo
function get_page_by_slug($page_slug, $output = OBJECT, $post_type = 'page' ) {
global $wpdb;
$page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_name = %s AND post_type= %s", $page_slug, $post_type ) );
if ( $page )
return get_page($page, $output);
return null;
}
@micahblu
micahblu / gist:5727445
Last active December 18, 2015 04:39
A media query template
/* SECTION: MEDIA QUERIES */
/* MQ: Desktop Slim */
@media only screen and (min-width: 768px) and (max-width: 984px) {
}
/* MQ: Tablet Landscape */
@media only screen and (min-width: 600px) and (max-width: 767px) {