Skip to content

Instantly share code, notes, and snippets.

View l4ci's full-sized avatar

Volker Otto l4ci

View GitHub Profile
/**
* Example Boilerplate Module
*
* Add boilerplateModule.init() to main.js to initiate it.
*/
var boilerplateModule = (function(){
var config = {
'default': true,
# robotstxt.org/
User-agent: *
Disallow:
<?php
$date = strtotime("15.11.2017 05:00");
$now = time();
if ($date > $now) {
die("Silence is golden!");
}
<?php
function dd(){
array_map(function($x) { var_dump($x); }, func_get_args()); die;
}
## Browser Caching + Deflate Compression
<IfModule mod_deflate.c>
<FilesMatch "\.(js|jpg|jpeg|gif|png|ico|svg|css)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
# Deflate Compression
// <div class="counter" data-count="150">0</div>
$('.counter').each(function() {
var $this = $(this),
countTo = $this.attr('data-count');
$({ countNum: $this.text()}).animate({
countNum: countTo
},
{
<select onchange="if (this.value) window.location.href=this.value">
<option value="">Pick one:</option>
<option value="/foo">Foo</option>
<option value="/bar">Bar</option>
</select>
<script src="https://cdn.jsdelivr.net/jquery/3.2.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/js/libs/jquery.min.js">\x3C/script>')</script>
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
var gaProperty = 'UA-XXXXX-Y';
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
ga('create', gaProperty,'auto');
ga('set','anonymizeIp',true);
ga('send','pageview');
var disableStr = 'ga-disable-' + gaProperty;
<!--[if lt IE 8]>
<div class="info-box" id="browsehappy">
<div class="info-box__headline">Unsicherer Browser!</div>
Sie benutzen einen <strong>veralteten und unsicheren</strong> Webbrowser. Wir empfehlen, den <a href="http://browsehappy.com/">Browser zu aktualisieren</a> oder einen anderen, aktuellen Browser zu verwenden.
</div>
<![endif]-->