This file contains hidden or 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
<xsl:if test="position() mod 2 != 1"> | |
<xsl:attribute name="class">alt</xsl:attribute> | |
</xsl:if> |
This file contains hidden or 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
// add this to the theme's functions.php | |
// file between the php tags | |
if(!is_admin()){ | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', ('https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'), false, '1.6.4'); | |
wp_enqueue_script('jquery'); | |
wp_deregister_script('jquery-ui'); | |
wp_register_script('jquery-ui', ('https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js'), false, '1.8.16'); | |
wp_enqueue_script('jquery-ui'); | |
} |
This file contains hidden or 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
// This goes in the functions.php file between the php tags | |
// to make wordpress render the markup needed for a jQuery UI | |
// accordion widget area | |
register_sidebar(array( | |
'name' => 'Accordion Widget Area', | |
'id' => 'accordion-widgets', | |
'description' => 'jQuery UI accordion enabled widget area', | |
'before_widget' => '', | |
'after_widget' => '', | |
'before_title' => '<h3><a href="#">', |
This file contains hidden or 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 | |
// Accordion widget area | |
if (is_active_sidebar('accordion-widgets')) : ?> | |
<div id="accordion" class="widget-area" role="complementary"> | |
<?php dynamic_sidebar( 'accordion-widgets' ); ?> | |
</div><!-- #accordion --> | |
<?php endif; ?> |
This file contains hidden or 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> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>jQuery Feature Box</title> | |
<link rel="stylesheet" href="assets/styles/momentum.css" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script src="assets/scripts/jquery.scrollTo-min.js"></script> | |
<script src="assets/scripts/featurebox.js"></script> | |
</head> |
This file contains hidden or 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
/** | |
* Add whatever reset you want to use here - | |
* I am using Eric Meyer's 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, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { | |
border: 0; | |
font-weight: inherit; | |
font-style: inherit; | |
font-size: 100%; | |
line-height: 1; |
This file contains hidden or 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
$(document).ready(function(){ | |
var icons = $('.icons'), | |
icon = icons.find('li'), | |
numIcons = icon.length, | |
openIcon = Math.floor(Math.random()*icon.length), | |
iconContainer = $('.feature-box'), | |
expandedClass = 'expanded', | |
collapsedClass = 'collapsed'; | |
$(icon[openIcon]).addClass(expandedClass); |
This file contains hidden or 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
#!/usr/bin/zsh | |
COMPRESSOR=$(whence -p yui-compressor) | |
[ -z $COMPRESSOR ] && exit 0; | |
function _compress { | |
local fname=$1:t | |
local dest_path=$1:h | |
local min_fname="$dest_path/${fname:r}.min.${fname:e}" | |
$COMPRESSOR $1 > $min_fname |
This file contains hidden or 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
/** | |
* @author Ethan Gardner | |
* @see: http://www.ethangardner.com/articles/drawing-with-raphael-js-plus-a-bonus-for-guitar-players/ | |
*/ | |
var paper = new Raphael(document.id("fretboard"), 1300, 300); | |
/** | |
* Set up a GTR object to be used for namespacing | |
* @see http://www.ethangardner.com/articles/javascript-namespace-strategy-for-large-applications/ |
This file contains hidden or 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
SELECT * FROM table ORDER BY NEWID() | |
-- mysql version | |
SELECT * FROM table ORDER BY uuid() |