Skip to content

Instantly share code, notes, and snippets.

@steveh80
steveh80 / grid.scss
Last active April 16, 2020 10:32
Bootstrap viewport detection in Javascript
// needed for viewport size detection in javascript
body::before {
display: none;
content: "xs";
}
@media (min-width: $screen-sm-min) {
body::before {
content: "sm";
}
@steveh80
steveh80 / .htaccess
Created December 1, 2012 17:10
Wie gzip-komprimierte Seiten (laut Support-Auskunft) via .htaccess bei 1&1 funktionieren sollen
<IfModule mod_rewrite.c>
# If the user agent accepts gzip encoding...
RewriteCond %{HTTP:Accept-Encoding} gzip
# ...and if gzip-encoded version of the requested file exists (<file>.gz)...
RewriteCond %{REQUEST_FILENAME}.gz -f
# ...then serve the gzip-encoded file. Done.
RewriteRule ^(.+)$ $1.gz [L]
# Or if the user agent accepts gzip encoding...
RewriteCond %{HTTP:Accept-Encoding} gzip
# ...and the requested file exists...