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
// lack of support for CSS :first-child and :last-child | |
if ($.browser.msie && parseInt($.browser.version, 10) === 8) { | |
$('ul li:first').addClass('first'); | |
$('ul li:last').addClass('last'); | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Online / offline Demo<title> | |
<style> | |
body { background: #6c6; } | |
body.offline { background: #ccc; } | |
.container { | |
width: 500px; | |
background: #fff; |
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
jQuery(document).ready(function() { | |
jQuery('#content div.entry div.info h2 a').each(function() { | |
var new_text = jQuery(this).html().replace(/&/g, '<span class="amp">&</span>'); | |
jQuery(this).html(new_text); | |
}); | |
}); |
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
<h1 class="parallax">The ‘root element’ parallax technique</h1> | |
<img src="http://distilleryimage4.s3.amazonaws.com/631dac84d67611e1a7d81231381b5136_7.jpg" class="parallax skyline"> | |
<img src="http://distilleryimage4.s3.amazonaws.com/16fe826ee3b511e1a47b22000a1cf766_7.jpg" class="parallax blimp"> | |
<img src="http://distilleryimage11.s3.amazonaws.com/07354ffe2f3011e2a23c22000a1f9d66_7.jpg" class="parallax gherkin"> | |
<img src="http://distilleryimage4.s3.amazonaws.com/059c1a748e6311e1b10e123138105d6b_7.jpg" class="parallax dino"> | |
<img src="http://distilleryimage10.s3.amazonaws.com/7ec10646ab5d11e1af7612313813f8e8_7.jpg" class="parallax bull"> | |
<div class="parallax box"> | |
<p>By combining the power of <code>`rem`</code> and a small JavaScript function to manipulate the <code>`font-size`</code> of the <code>`html`</code> element, we can achieve simple but effective parallaxing.</p> |
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
<p>A pull quote is a typographical technique in which an excerpt or quote from an article is duplicated within the article using a different formatting style so that it jumps out at the reader.</p> | |
<p data-pullquote="b">Blatantly copying the excerpt of the pull quote into it’s own element is not the way to go. <b>A pull quote is a purely visual technique, and therefore should not change the structure of the body.</b> Next to that, a structural representation of the excerpt would be seen twice by people using feed readers or services like <a href="http://www.instapaper.com/">Instapaper</a>, as well as be re-read for people who use screen readers. So how can we best author this into our mark-up?</p> | |
<h3>Our good friend, the data attribute</h3> | |
<p><span class="caps">HTML5 </span>introduced the ability for authors to create custom non-visible data-attributes. These attributes can contain data that will not affect layout or presentation.</p> | |
<blockquote><p>Custom data attributes are intended to store custom da |
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
@mixin ie7icon($arguments...) { | |
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = #{$arguments}); | |
} | |
.icon-music { @include ie7icon(''); } | |
.icon-search { @include ie7icon(''); } | |
.icon-envelope { @include ie7icon(''); } | |
// and so on... |
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
#profile_popup .modal, .profile-card.profile-header, #activity-popup-dialog .modal { | |
width: 600px; | |
} | |
.account-summary .avatar { | |
top: 0.5em; | |
} | |
.activity-popup-users .avatar { | |
top: 0.9em; |
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
// search filter | |
function fb_search_filter($query) { | |
if ( !$query->is_admin && $query->is_search) { | |
$query->set('post_type', array('video-camera', 'software-solution','post') ); // id of page or post | |
} | |
return $query; | |
} | |
add_filter( 'pre_get_posts', 'fb_search_filter' ); |
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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
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
// Note: httpd-vhosts.conf filename just used as an example. | |
// Add the following line to your apache configuration inside the VirtualDocumentRoot vhost definition | |
// E.g. | |
// <VirtualHost *:80> | |
// ... | |
// {paste here} | |
// </VirtualHost> | |
php_admin_value auto_prepend_file "/Users/USERNAME/Sites/setdocroot.php" |