Skip to content

Instantly share code, notes, and snippets.

@dlh01
dlh01 / gist:3922398
Created October 20, 2012 06:43
SASS mixin for Bootstrap breakpoints
/**
* Bootstrap breakpoints. Thanks goes to Chris Coyier for the inspiration.
*
* Original post and usage example: http://css-tricks.com/custom-user-mixins/
*/
@mixin breakpoint($point) {
@if $point == large-display {
@media (min-width: 1200px) { @content; }
}
@if $point == default {
@dlh01
dlh01 / install.php
Created April 27, 2012 23:39
Install WordPress without "Hello world!" and other default content
<?php
/**
*
* Install WordPress without "Hello world!" and other default content
*
* This function overrides the standard wp_install_defaults() in
* wp-admin/includes/upgrade.php. Leaving the function empty causes WordPress
* to install without the default post, page, links, categories, etc.
*
* Save this file as install.php inside your wp-content directory before beginning installation
@dlh01
dlh01 / wp-register-enqueue-assets.php
Created April 6, 2012 16:59
Template for registering and enqueueing scripts and styles in WordPress
<?php
/**
*
* Register and enqueue assets
*
*/
add_action( 'wp_enqueue_scripts', 'function_name_here' );
function function_name_here() {
# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding