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
<link rel="shortcut icon" href="/images/favicon.ico"/> | |
<!-- Apple Touch Icons --> | |
<link rel="apple-touch-icon" href="/images/touch-icon-57.png" sizes="57x57"/> | |
<link rel="apple-touch-icon" href="/images/touch-icon-72.png" sizes="72x72"/> | |
<link rel="apple-touch-icon" href="/images/touch-icon-76.png" sizes="76x76"/> | |
<link rel="apple-touch-icon" href="/images/touch-icon-114.png" sizes="114x114"/> | |
<link rel="apple-touch-icon" href="/images/touch-icon-120.png" sizes="120x120"/> | |
<link rel="apple-touch-icon" href="/images/touch-icon-144.png" sizes="144x144"/> | |
<link rel="apple-touch-icon" href="/images/touch-icon-152.png" sizes="152x152"/> |
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
//remove empty p tags | |
$("p").filter(function () { | |
return $.trim($(this).html()) == ''; | |
}).remove(); |
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
//GOOGLE EVENTS TRACKING | |
var track = function(category, name, value) { | |
// console.log(category); | |
// console.log(name); | |
// console.log(value); | |
// return; | |
if (window._gaq) { | |
window._gaq.push(["_trackEvent", category, name, value]); | |
} | |
}; |
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
<!-- Make the content easily recognizable by social networks, we can use the Open Graph (http://ogp.me) spesification so when somebody shares our content, the social network can show accurate information about the page that is shared. --> | |
<!-- Add to functions.php --> | |
function opengraph_for_posts() { | |
if ( is_singular() ) { | |
global $post; | |
setup_postdata( $post ); | |
$og_type = '<meta property="og:type" content="article" />' . "\n"; | |
$og_title = '<meta property="og:title" content="' . esc_attr( get_the_title() ) . '" />' . "\n"; | |
$og_url = '<meta property="og:url" content="' . get_permalink() . '" />' . "\n"; |
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
<ul class="collapse_list"> | |
<li><a href="#" data-toggle="collapse" data-target="#one">One</a></li> | |
<li><a href="#" data-toggle="collapse" data-target="#two">Two</a></li> | |
</ul> | |
<div class="collapse_content"> | |
<div id="one"> | |
<p>Content for div one</p> | |
</div> |
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
<?php | |
//Defer parsing of JS to speed up loading pages | |
if (!(is_admin() )) { | |
function defer_parsing_of_js ( $url ) { | |
if ( FALSE === strpos( $url, '.js' ) ) return $url; | |
if ( strpos( $url, 'jquery.js' ) ) return $url; //excluding js file | |
return "$url' defer='defer"; | |
} | |
add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 ); | |
} |
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
//Autohide Dock Speed | |
$ defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -float 0.5 | |
$ killall Dock | |
//Add spacers to your Dock | |
$ defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' | |
$ killall Dock | |
//Changing screenshots from the default png to jpg format | |
$ defaults write com.apple.screencapture type jpg |
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
## BEGIN GZIP Compression ## | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript |
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
# Cache-Control - HTTP headers for static resources | |
<IfModule mod_headers.c> | |
# One year for image and video files | |
<filesMatch ".(jpg|jpeg|png|gif|ico|mp4|webm)$"> | |
Header set Cache-Control "max-age=31536000, public" | |
</filesMatch> | |
# One month for css and js | |
<filesMatch ".(css|js)$"> | |
Header set Cache-Control "max-age=2628000, public" |
NewerOlder