Skip to content

Instantly share code, notes, and snippets.

@zztimur
zztimur / apache-expires
Created November 15, 2013 00:20
Apache Expires module configuration for common set up, as well as server stored fonts.
# Add expire headers
# BEGIN Expires
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 0 seconds"
ExpiresByType text/html "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
@zztimur
zztimur / apache-gzip
Last active December 28, 2015 09:08
Apache GZip configuration with fonts and other goodies
<ifModule mod_expires.c>
# Insert filter on all content
###SetOutputFilter DEFLATE
# Insert filter on selected content types only
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE text/json
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE text/xml
@zztimur
zztimur / apache-mime
Last active December 28, 2015 08:59
Apache MIME file types for embed fonts and other goodies
# Add the font file types
AddType application/font-woff .woff
AddType application/x-font-ttf .ttf
AddType application/vnd.ms-fontobject .eot
AddType image/svg+xml .svg
AddType application/x-font-opentype .otf
# Archaic stuff
AddType text/x-component .htc
@zztimur
zztimur / magento unnecessary apache modules
Created November 13, 2013 00:28
magento - apache modules that are not needed
Here is the list of apache modules which we were able to disable safely. This list is published just to give you idea, so be careful and consider your specific needs before disabling these.
Here is the list
proxy
proxy_ajp
proxy_balancer
proxy_connect
proxy_ftp
proxy_http
@zztimur
zztimur / mage-clean
Last active December 28, 2015 01:59
Bash script to clean up the magento temp directories and so..
echo "# Cleaning var/cache..."
rm -rf ./public_html/var/cache/*
echo "# Cleaning var/log..."
rm -rf ./public_html/var/log/*
echo "# Cleaning var/report..."
rm -rf ./public_html/var/report/*
echo "* Cleaning var/sessions..."
/* MIXINS
-------------------------------------------------- */
.kill-gradient() {
background-image: none;
background-image: none;
background-image: none;
background-image: none;
background-image: none;
background-image: none;
background-repeat: no-repeat;