Skip to content

Instantly share code, notes, and snippets.

@loschke
loschke / .htaccess
Created February 23, 2016 14:02 — forked from seoagentur-hamburg/.htaccess
Die optimale .htaccess-Datei für mehr Speed und Sicherheit
# ----------------------------------------------------------------------
# | Komprimierung und Caching |
# ----------------------------------------------------------------------
# Serve resources with far-future expires headers.
#
# (!) If you don't control versioning with filename-based
# cache busting, you should consider lowering the cache times
# to something like one week.
#
background-color: #6d695c; background-image: repeating-linear-gradient(120deg, rgba(255,255,255,.1), rgba(255,255,255,.1) 1px, transparent 1px, transparent 60px), repeating-linear-gradient(60deg, rgba(255,255,255,.1), rgba(255,255,255,.1) 1px, transparent 1px, transparent 60px), linear-gradient(60deg, rgba(0,0,0,.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.1) 75%, rgba(0,0,0,.1)), linear-gradient(120deg, rgba(0,0,0,.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.1) 75%, rgba(0,0,0,.1)); background-size: 70px 120px;
@loschke
loschke / array.functions.php
Last active January 2, 2016 06:19
Nützliche Funktionen zur Arbeit mit Array
<?php
//check if an array is associative
function isAssocArray($array){
return array_keys($array) !== range(0, count($array) - 1);
}
//check if an array is multidimensional
function isMultiArray($array) {