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
/* | |
* Accurately returns the height and width of the viewport | |
* much more reliably than simply $(window).height | |
* | |
* Source: http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript | |
*/ | |
function viewport() { | |
var e = window, a = 'inner'; |
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 | |
if ( file_exists( dirname( __FILE__ ) . '/wp-local-config.php' ) ) { | |
include( dirname( __FILE__ ) . '/wp-local-config.php' ); | |
define( 'WP_LOCAL_DEV', true ); // We'll talk about this later | |
} else { | |
define('DB_NAME', 'database_name_here'); | |
define('DB_USER', 'username_here'); | |
define('DB_PASSWORD', 'password_here'); | |
define('DB_HOST', 'localhost'); |
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
'use strict'; | |
module.exports = function(grunt) { | |
// load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
grunt.initConfig({ | |
// watch for changes and trigger compass, jshint, uglify and livereload | |
watch: { |
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
<snippet> | |
<content><![CDATA[ | |
<?php | |
add_action( 'init', 'register_cpt_$1' ); | |
function register_cpt_$1() { | |
$labels = array( | |
'name' => _x( '$2s', '$1' ), |
NewerOlder