Instantly share code, notes, and snippets.

:octocat:
Focusing

Sergej Müller sergejmueller

View GitHub Profile
View ga.php
<?php
// GA Tracking ID
$tid = 'UA-XXXXXXX-XX';
// Anonymous Client ID
$cid = sprintf(
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
mt_rand( 0, 0xffff ),
mt_rand( 0, 0xffff ),
View nginx.conf
location ~* \.(eot|ttf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}
View fastcgi_cache
## DEFAULT
set $no_cache 0;
## RULES
if ( $request_uri ~ "/wp-" ) {
set $no_cache 1;
}
if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
set $no_cache 1;
View index.html
<!DOCTYPE html>
<html>
<style>
html {
-webkit-font-smoothing: antialiased;
}
</style>
View gist:1766524
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
.tooltip {
font: normal 11px/17px sans-serif;
color: red;
View gist:2578648
grep -lr "text" .
View gist:2842988
<?php
/* Heute ist der 31. Mai */
$t = strtotime('-1 month');
echo strftime('%e. %B', $t);
// Ausgabe: 1. May
$t = strtotime('first day of previous month');
View gist:2912115
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-Y']);
_gaq.push(['_trackPageview']);
_gaq.push(
function() {
var tracker = _gat._getTrackerByName(),
group = tracker._getVisitorCustomVar(1),
random = Math.random();
View demo.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Sergej Müller" />
<link href="style.css" rel="stylesheet" />
<title>Fullscreen Demo</title>
View gist:3655924
/* Reset Textskalierung */
body {
-webkit-text-size-adjust: 100%;
}
/* Reset für Inputelemente */
input {
-webkit-appearance: none;
-webkit-border-radius: 0;