This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Register custom post types on the 'init' hook. | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 1.0.0 | |
* @access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Brightness math based on: | |
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx | |
$red-magic-number: 241; | |
$green-magic-number: 691; | |
$blue-magic-number: 68; | |
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number; | |
@function brightness($color) { | |
// Extract color components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# (not really -- run these commands by hand & pay attention to the comments) | |
# Homebrew: The missing package manager for OS X | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
# Fish: Finally, a command line shell for the 90s | |
brew install fish | |
# Git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Loads media from a remote site when on a local dev environment. | |
* Eliminates the need to download the uploads directory from the remote site for testing purposes. | |
*/ | |
if ( 'mydomain.dev' === $_SERVER['HTTP_HOST'] ): | |
add_filter( 'upload_dir', function ( $uploads ) { | |
$uploads['baseurl'] = 'http://mydomain.com/wp-content/uploads'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Load core variables | |
// -------------------------------------------------- | |
@import "variables.less"; | |
.breakpoint(@class, @rules) when (@class = xs) { | |
@media (min-width: @screen-xs-min) and (max-width: @screen-xs-max) {@rules();} | |
} | |
.breakpoint(@class, @rules) when (@class = sm) { |