Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

William Dodson obxdesignworks

🏠
Working from home
View GitHub Profile
View px2rem.md
View _vertical-align.scss
/**
* Vertically center anything via Z63:
* http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
* //////////////////////////////////////////////////
* Example:
*
* .element p {
* @include vertical-align;
* }
*/
View Practical-Font-Sizing.markdown

Practical Font Sizing

A demo pen based on a blog post from Harry Roberts of CSS Wizardry about Practical Font Sizing.

A Pen by William Dodson on CodePen.

License.

@obxdesignworks
obxdesignworks / Social Media Brand Colors
Last active Aug 29, 2015
Social media branding colors. I'll update this Gist as I gather more and feel free to fork and collaborate.
View Social Media Brand Colors
Dribbble: #C73B6F
Facebook: #3B5998
Flickr: #FE0883
Forrst: #3B7140
Foursquare: #8FD400
GitHub: #4183C4
Google+: #C63D2D
Instagram: #4E433C
Linkedin: #4875B4
Tumblr: #2B4964
View gist:277f830a57c6215a127c
<?php
/* ORIGINAL: search-exclude.php Line 119 */
public function searchFilter($query)
{
if ($query->is_search) {
$query->set('post__not_in', array_merge($query->get('post__not_in'), $this->getExcluded()));
}
return $query;
}
View spread.sass
// strip-units required by spread mixin
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass
@function strip-units($number)
@return $number / ($number * 0 + 1)
// pow and sqrt required by ease function
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss
@function pow($base, $exponent)
$value: $base
View _inline-block.scss
/*
Inline-block for IE6, Firefox 2, and up
via http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block
*/
@module inline-block {
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
@obxdesignworks
obxdesignworks / obxdesignworks
Created Mar 23, 2011
Track PDF files in Google Analytics with jQuery
View obxdesignworks
/**
* Place this code after your Google Analytics scripts
*/
$(function() {
/* any links to PDFs are tracked with GA */
$('a[href$="pdf"]').click(function(e){
/* grab only the file name without the extension */
var fullpath = $(this).attr('href');
var filename = fullpath.substr(fullpath.lastIndexOf("/")+1, fullpath.length);
_gaq.push(['_trackPageview', '/'+filename]);
@obxdesignworks
obxdesignworks / reset.css
Created May 6, 2011
Reset CSS (Eric Meyer's v2 Reset with HTML5 declarations)
View reset.css
/**
* Eric Meyer's v2 Reset with HTML5 declarations
* http://meyerweb.com/eric/tools/css/reset/
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,