Skip to content

Instantly share code, notes, and snippets.

View inerds's full-sized avatar

Inad Hussein inerds

View GitHub Profile
@inerds
inerds / .htaccess
Created April 14, 2012 22:45 — forked from necolas/.htaccess
Simple, quick way to concatenate, minify, and version static files in a Wordpress theme
# Filename-based cache busting
# taken from https://github.com/h5bp/html5-boilerplate/
# This rewrites file names of the form `name.123456.js` to `name.js`
# so that the browser doesn't use the cached version when you have
# updated (but not manually renamed) the file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
@mauryaratan
mauryaratan / htaccess-tweaks
Created May 7, 2012 13:43
htaccess Gzip Compression and expires to speed up page load time
<IfModule mod_deflate.c>
#The following line is enough for .js and .css
AddOutputFilter DEFLATE js css
AddOutputFilterByType DEFLATE text/plain text/xml application/xhtml+xml text/css application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp text/html
#The following lines are to avoid bugs with some browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
@croemmich
croemmich / gist:5830094
Last active October 28, 2020 11:51 — forked from davidpaulsson/foundation.pagination
Foundation 4 Pagination for Wordpress
function foundation_pagination($arrows = true, $ends = true, $pages = 2)
{
if (is_singular()) return;
global $wp_query, $paged;
$pagination = '';
$max_page = $wp_query->max_num_pages;
if ($max_page == 1) return;
if (empty($paged)) $paged = 1;
@tw2113
tw2113 / class.WDS_JetPack_Popular_Posts.php
Last active March 28, 2022 18:54
JetPack Popular Posts class.