Skip to content

Instantly share code, notes, and snippets.

View ninetwentyfour's full-sized avatar

Travis Berry ninetwentyfour

View GitHub Profile
@ninetwentyfour
ninetwentyfour / example1.html
Created August 28, 2011 17:05
On HTML5 Video - blogpost
<video src="movie.ogg" controls="controls"></video>
@ninetwentyfour
ninetwentyfour / example1.html
Created August 28, 2011 17:00
Create Simple A/B Tests In WordPress - blogpost
<script>utmx_section("Insert your section name here")</script>
@ninetwentyfour
ninetwentyfour / example1.php
Created August 28, 2011 16:54
Use WordPress’ is_page() To Exclude Content - blogpost
<?php
if ( is_page('work') || is_page('contact')) {
echo '<div id="secondnav"><div class="secondnavs"><a href="http://www.travisberry.com/video/">Video</a></div><div class="longsecondnavs">.</div></div>';
}
?>
@ninetwentyfour
ninetwentyfour / example1.html
Created August 28, 2011 16:44
Say It Aint So! Time For A New Contact Form - blogpost
<script type="text/javascript">
//<![CDATA[
var _wpcf7 = { cached: 1 };
//]]>
</script>
@ninetwentyfour
ninetwentyfour / example1.php
Created August 28, 2011 16:39
Use WordPress’ is_page() To Display Custom Content - blogpost
<?php
if ( is_page('about')) {
echo '<div id="secondnav">This is the super cool secondary navigation.</div>';
}
?>
@ninetwentyfour
ninetwentyfour / example1.txt
Created August 28, 2011 16:33
Improve YSlow Score With .htaccess - blogpost
Header unset ETag
FileETag None
<FilesMatch "\.(css|js)$">
SetOutputFilter DEFLATE
</FilesMatch>
<FilesMatch "\.(mov|otf|eot|ttf|ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
@ninetwentyfour
ninetwentyfour / example1.css
Created August 28, 2011 16:23
Making display:none; Javascript Accessible - blogpost
.menu_body{ display:none; }
@ninetwentyfour
ninetwentyfour / command1.txt
Created August 28, 2011 16:20
git dreamhost - blogpost
mkdir gittest
cd gittest
git --bare init
@ninetwentyfour
ninetwentyfour / quicktime.html
Created August 28, 2011 16:00
Quicktime embed - blogpost
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="240" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM name="SRC" VALUE="poster.mov">
<PARAM name="QTSRC" VALUE="rtsp://your_streaming_subdomain.com:554/your_streaming_subdomain.com/movie.mov">
<PARAM name="AUTOPLAY" VALUE="true">
<PARAM name="CONTROLLER" VALUE="false">
<embed src="poster.mov" qtsrc="rtsp://your_streaming_subdomain.com:554/your_streaming_subdomain.com/movie.mov" width="320" height="240" target="myself" controller="false" autoplay="true"></embed>
</OBJECT>
@ninetwentyfour
ninetwentyfour / highlightedNav.php
Created August 28, 2011 15:55
Creating Navigation Highlights - blogpost
<ul>
<li<?php if ( is_page('about') || is_404() ){ echo ' class="current_page_item" ';}?>><a href="<?php echo get_option('home'); ?>/">Home</a></li>
<li<?php if ( is_home() || is_page('blog')|| is_single() || is_search() || is_archive()) { echo ' class="current_page_item"'; } ?>><a href="<?php bloginfo('url'); ?>/blog/">Blog</a></li>
<li<?php if ( is_page('work') || is_page('video') || is_page('web')) { echo ' class="current_page_item"'; } ?>><a href="<?php bloginfo('url'); ?>/work/">Work</a></li>
<li<?php if ( is_page('contact')) { echo ' class="current_page_item"'; } ?>><a href="<?php bloginfo('url'); ?>/contact/">Contact</a></li>
</ul>