Skip to content

Instantly share code, notes, and snippets.

View illarionvk's full-sized avatar

Illarion Koperski illarionvk

View GitHub Profile
@illarionvk
illarionvk / .htaccess
Created September 13, 2013 07:35
Apache: Serve pre-compressed static CSS and JavaScript files
AddEncoding gzip .gz
RewriteEngine On
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]
<Files *.css.gz>
ForceType text/css
@illarionvk
illarionvk / Guardfile
Created September 11, 2013 09:24
Guard configuration for Shopify theme development
guard 'sass', :input => '_sass', :output => 'assets', :extension => ".scss.liquid", :style => :compressed, :all_on_start => true
guard 'sprockets', :destination => 'assets', :root_file => '_foundation/js/foundation/foundation_all.js'
guard 'haml', :default_ext => 'liquid', :run_at_start => true do
watch %r{.+(\.liquid\.haml)}
end
@illarionvk
illarionvk / hreflang-conditional-link-tag.scss
Last active December 21, 2015 16:18
Append language abbreviation (EN, RU, PL) in superscript to a link if the language of the page is different.
@illarionvk
illarionvk / html_if_IE8.haml
Last active December 21, 2015 05:49
HAML [If IE 8] conditions header for ZURB Foundation 4
/[if IE 8] <html class="no-js lt-ie9" lang="en">
<!--[if gt IE 8]><!-->
%html.no-js{lang: "en"}
/<![endif]