Skip to content

Instantly share code, notes, and snippets.

View imsamthomas's full-sized avatar
🎯
Focusing

Sam Ng imsamthomas

🎯
Focusing
View GitHub Profile
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP Ref: https://varvy.com/pagespeed/enable-compression.html
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/*
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
@imsamthomas
imsamthomas / readme.md
Last active November 20, 2015 02:40
social-button
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
    
    <!-- Buffer -->
    <a href="https://bufferapp.com/add?url=https://simplesharebuttons.com&amp;text=Simple Share Buttons" target="_blank">
        <img src="https://simplesharebuttons.com/images/somacro/buffer.png" alt="Buffer" />
    </a>
    
    <!-- Digg -->
//File: /app/code/core/Mage/Core/Model/Translate/Inline.php:273
//Add follow this block
new TranslateInline('translate-inline-trig', '<?php echo $ajaxUrl ?>', '<?php
echo Mage::getDesign()->getArea() ?>');
if(Object.__defineGetter__)
@imsamthomas
imsamthomas / gist:9f661e2af7e92b5df258
Created December 18, 2014 03:39
Meta tag for Social network - Snippet
<?php /* Open Graph Protocol for Facebook and SEO */ ?>
<?php if(Mage::registry('current_product')): ?>
<?php $product = Mage::registry('current_product'); ?>
<meta property="og:title" content="<?php echo ($product->getName()); ?>" />
<meta property="og:type" content="product" />