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
/* credit to http://www.456bereastreet.com/archive/201105/styling_ordered_list_numbers/ */ | |
ol { | |
counter-reset:li; /* Initiate a counter */ | |
margin-left:0; /* Remove the default left margin */ | |
padding-left:0; /* Remove the default left padding */ | |
} | |
ol > li { | |
position:relative; /* Create a positioning context */ | |
margin:0 0 6px 2em; /* Give each list item a left margin to make room for the numbers */ |
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
pngcrush -brute -d "crushed" *.png | |
PAUSE |
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
var is_win = navigator.userAgent.match(/(Windows)/i)?true:false; | |
var is_ie = navigator.userAgent.match(/(MSIE)/i)?true:false; | |
var is_64bit = navigator.userAgent.match(/(64)/i)?true:false; | |
var has_net = navigator.userAgent.match(/.NET CLR [0-9.]+/g)?true:false; //only works in IE |
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_filter( 'post_thumbnail_html', 'remove_width_attribute', 10 ); | |
add_filter( 'the_content', 'remove_width_attribute', 10 ); | |
function remove_width_attribute( $html ) { | |
$html = preg_replace( '/(width|height)="\d*"\s/', "", $html ); | |
return $html; | |
} |
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
function isHTTPS() { | |
return (window.location.href.indexOf('https') > -1 || window.location.host.indexOf('localhost') > -1); | |
}; | |
var loc = window.location.href, | |
httpsHref = 'https' + loc.substring(4), | |
if (!isHTTPS()) { | |
window.location = httpsHref; | |
} |
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
jq.when( | |
jq.getScript( "/js/libs/picker.js" ), | |
jq.getScript( "/js/libs/picker.date.js" ), | |
jq.getScript( "/js/libs/legacy.js" ), | |
jq.Deferred(function( deferred ){ | |
jq( deferred.resolve ); | |
}) | |
).done(function(){ | |
console.log('all required scripts are all loaded'); | |
}); |
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
/* | |
Paste the following into functions.php, hit save, then remove it, hit save again. | |
*/ | |
global $wpdb; | |
$wpdb->query( " | |
DELETE FROM $wpdb->postmeta | |
WHERE meta_key = '_thumbnail_id' | |
" ); |
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
@echo none | |
for /f "delims=" %%a in ('dir "*.jpg" /b /s /a-d') do ( | |
echo processing "%%a" | |
"C:\dev\jpegtran.exe" -optimize -progressive -copy none "%%a" "%%a.tmp" | |
move /Y "%%a.tmp" "%%a" >nul | |
) | |
pause |
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
var playListURL = '//gdata.youtube.com/feeds/api/playlists/PLOGi5-fAu8bFt81BE77HOVzO4S4M1ZexJ?v=2&alt=json&callback=?'; | |
jq.getJSON(playListURL, function (data) { | |
var list_data = ""; | |
jq.each(data.feed.entry, function (i, item) { | |
var feedTitle = item.title.$t; | |
var feedURL = item.link[1].href; | |
var fragments = feedURL.split("/"); | |
var videoID = fragments[fragments.length - 2]; | |
var thumb = "//i1.ytimg.com/vi/" + videoID + "/mqdefault.jpg"; |
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 tracking to each CTA on the hero slides | |
jq('.hero').find('.hero-content').find('a').each(function(){ | |
jq(this).attr('href', jq(this).attr('href')+'?icmp=Hero:'+encodeURI(jq(this).parent().parent().find("h1").text())); | |
}); |