Skip to content

Instantly share code, notes, and snippets.

@bmoredrew
bmoredrew / mq.css
Created October 3, 2012 18:59 — forked from chriscoyier/mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@bmoredrew
bmoredrew / gist:4120398
Created November 20, 2012 19:24 — forked from retlehs/gist:4120053
Remove unnecessary markup from WooCommerce
<?php
/**
* Remove unnecessary markup from WooCommerce:
*
* 1. Remove <meta name="generator" content="WooCommerce (version)" />
* 2. Remove the addition of <body class="theme-themename">
*/
function woocommerce_head_cleanup() {
global $woocommerce;
@bmoredrew
bmoredrew / utm redirect
Created December 14, 2012 09:10
utm redirect
function utm_welcome_redirect() {
if ( !is_user_logged_in() ) {
wp_redirect('http://www.universaltimemiami.com/welcome');
exit();
}
else {
wp_redirect('http://www.universaltimemiami.com/');
exit();
}
<?php
add_filter('addthis_post_exclude', 'addthis_post_exclude');
function addthis_post_exclude($display) {
if ( !is_singular( 'post' ) )
$display = false;
return $display;
}
?>
@bmoredrew
bmoredrew / gist:5537993
Created May 8, 2013 03:31
answer to zurb g+ group question
ul li {
background: url('../images/icons/bullet.png') no-repeat 0 5px;
padding-left: 20px;
}
#header #nav li ul {
width: 200px;
padding: 0;
background: #fff;
margin: 0;
top: 32px;
line-height: 1.0;
/* border and top image */
-moz-border-image:url("nav-top.png") 30 30 round;
-webkit-border-image:url("nav-top.png") 30 30 round;
@bmoredrew
bmoredrew / gist:7819182
Last active December 30, 2015 10:58
bootstrap navbar 2.3.2
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar collapsed" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Title</a>
<div class="nav-collapse navbar-responsive-collapse collapse" style="height: 0px;">
@bmoredrew
bmoredrew / example-functions-includes-array.php
Last active January 2, 2016 08:39
Example of including functions in array
<?php
$my_theme = TEMPLATEPATH . '/inc/';
$includes = array(
$my_theme . 'theme-functions.php', // Custom Theme Functions
$my_theme . 'theme-custom-post-types.php', // CPT's
$my_theme . 'fields/init.php', // Custom Fields
$my_theme . 'stripe/lib.php' // Integrate Stripe
);
@bmoredrew
bmoredrew / gist:8295317
Created January 7, 2014 06:14
export-db-command-line
mysqldump -u username -p password my_db > my_db.sql
@bmoredrew
bmoredrew / gist:8295340
Created January 7, 2014 06:16
import mysql dump cli
mysql -u username -p password my_db < my_db.sql