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 / 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 / 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 / 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 / javascript_resources.md
Last active September 14, 2015 22:14 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@MikeGillihan
MikeGillihan / link.html
Created January 9, 2016 18:39
WP Customizer Direct Link
@MikeGillihan
MikeGillihan / hide-themes.php
Last active January 30, 2016 22:16
Hide themes in theme picker
<?php
add_filter( 'wp_prepare_themes_for_js', 'PE_hide_themes' );
/**
* Prevents themes from being displayed on the Theme picker
* @param array $themes Available themes
*/
function PE_hide_themes( $themes ) {
// List of themes to be hidden
$hidden_themes = array(
{
"bold_folder_labels": true,
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_extra_width": 2,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"fade_fold_buttons": false,
"font_face": "Source Code Pro",
"font_options":
@MikeGillihan
MikeGillihan / CopyAsanaTasks.php
Created December 15, 2016 04:06 — forked from AWeg/CopyAsanaTasks.php
main changes: - Asana has own SSL cert -> had to add to lines of code - copies subtasks and up to 11 subtasks of subtasks - copies tags -> only tagnames not followers/descriptions
function asanaRequest($methodPath, $httpMethod = 'GET', $body = null)
{
$apiKey = 'ASANA_API_KEY_HERE'; /// Get it from http://app.asana.com/-/account_api
$url = "https://app.asana.com/api/1.0/$methodPath";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;
curl_setopt($ch, CURLOPT_USERPWD, $apiKey);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@MikeGillihan
MikeGillihan / HeartThis.php
Created December 26, 2017 22:15
Filter the output of the HeartThis for the front page
add_filter( 'heart_this_hearts', 'custom_heart_this_hearts' );
/**
* Filter the output of the HeartThis for the front page
*
* @param $output
* @param bool $post_id
*
* @return string
*/
function custom_heart_this_hearts( $output, $post_id = false ) {
# Stop syncing a node_modules directory (via symlink)
noicloud() {
mv node_modules node_modules.nosync
ln -s node_modules.nosync/ node_modules
}
alias nocloud=noicloud