Skip to content

Instantly share code, notes, and snippets.

View blainerobison's full-sized avatar

Blaine Robison blainerobison

  • Dagrander
  • San Diego
View GitHub Profile
@blainerobison
blainerobison / gist:f17b4a0d8f4ce1940aac
Last active August 29, 2015 14:02
wp: Display immediate children or siblings as a menu. [WordPress]
<?php
/**
* Get related menu
*
* Displays immediate children or siblings
*
* @param boolean $echo echo or return result
* @return str $r
*/
function prefix_related_menu( $echo = true ) {
@blainerobison
blainerobison / gist:11272283
Last active December 17, 2017 08:02
wp: Options for WordPress wp-config.php
<?php
/**
* Local / Staging Environment
*
* Used in conjunction with mu-plugins/disable-plugins-dev-environment.php
* Disables plugins specified in plugin file
*
* SET TO FALSE ON PRODUCTION
*/
@blainerobison
blainerobison / gist:8164985
Last active January 1, 2016 15:29
Sublime Text user preference settings. Works for both ST 2 & 3.
{
"overlay_scroll_bars": "enabled",
"line_padding_top": 3,
"line_padding_bottom": 3,
"always_show_minimap_viewport": true,
"font_options": [ "gray_antialias" ],
"bold_folder_labels": true,
"caret_extra_width": 2,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker-OceanicNext.tmTheme",
@blainerobison
blainerobison / gist:8bb58aa33089f729ffdd
Last active December 30, 2015 11:59
wp: Order admin menu items
/**
* Order Admin Menu Items
*/
function custom_menu_order( $menu_ord ) {
if ( ! $menu_ord ) {
return true;
}
return array(
@blainerobison
blainerobison / gist:8151fb2c416cb83f6ee3
Last active December 30, 2015 04:49
js: Delay execution on window resize
var resizeTimer;
// foo
function foo() {
console.log( 'delayed' );
}
// initially run foo
foo();