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 / css_resources.md
Last active September 14, 2015 22:14 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@MikeGillihan
MikeGillihan / 0_reuse_code.js
Last active September 14, 2015 19:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@MikeGillihan
MikeGillihan / Gravity Forms Hidden Labels
Created May 27, 2015 16:37
Enables Gravity Forms field label visibility drop down menu in the form editor
// Enable Gravity Forms field label visibility
add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' );
@MikeGillihan
MikeGillihan / sassy-grid.scss
Created January 20, 2015 20:02
Just Another Sassy Grid
// Just Another Sassy Grid
// ---------------------------------------------
$pad: 2rem;
$base-container-width: 100rem;
$gridpad: ( $pad / $base-container-width ) * 100%;
.row {
// margin-bottom: $gridpad; // Optional row padding
@MikeGillihan
MikeGillihan / WP_native_classes
Created December 6, 2014 03:10
WordPress Native Classes
// Body Classes
// ----------------------------------------
.home {} // if it's the homepage
.page {} // if it's any page
.postid-XX {} // if it's a post - XX is the post's ID
.rtl {} // when dealing with right-to-left content
.blog {} // if it's the custom blog listing
.archive {} // if it's any sort of archive page
.category {} // if it's a categories listing page
.tag {} // if it's a tags listing page
// Show ACF menu for user_ID 1 only
function remove_acf_menu() {
$current_user = wp_get_current_user();
if ( $current_user->ID != 1 ) {
remove_menu_page( 'edit.php?post_type=acf' );
}
}
add_action( 'admin_menu', 'remove_acf_menu', 100 );
@MikeGillihan
MikeGillihan / trackback-killer
Created August 11, 2014 19:40
SQL query to set track/pingbacks on all posts to closed.
UPDATE wp_posts SET ping_status="closed";
@MikeGillihan
MikeGillihan / color-scheme
Created August 9, 2014 00:07
Add ACF field Color Scheme Class
/**
* Color Scheme
* Add color theme class to <body>
* Requires custom field 'color_scheme'
*/
// add_filter('body_class', 'genesass_color_scheme');
function genesass_color_scheme($classes) {
$color_scheme = get_field('color_scheme');
@MikeGillihan
MikeGillihan / wp-styleguide
Created August 8, 2014 05:49
WordPress Style Guide Post Content
<section id="intro">
<p class="intro">This is the style guide for your website. This document sets the styles and standards to be used when updating or contributing to your site. In this guide you will find examples of what your site is supposed to look like and the many HTML elements that you can use in your posts and pages.</p>
<p class="intro">Not only can you view how the elements will appear on your site, but you can also see how these elements are implemented by viewing the <q>Your Website Style Guide</q> post within the WordPress post editor.</p>
</section><!-- END #intro -->
<section id="branding">
<h2 class="font-script callout">Branding</h2>
<h3>Colors &amp; Textures</h3>
<ul class="colors">
<li class="color-light"><var>#F5F5F5</var></li>
@MikeGillihan
MikeGillihan / sass-color-wheel
Created February 11, 2014 20:07
Color Wheel Mixin
// COLOR WHEEL
@mixin colorwheel($color: $colorBrand,$colors: 6,$spectrum: 180deg,$offset: 30deg) {
@for $i from 0 to $colors {
&:nth-child(#{$i}) {
background: adjust-hue($color, $offset + $spectrum / $colors * $i);
}
}
}