Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

Sergej Müller sergejmueller

:octocat:
Focusing
Block or report user

Report or block sergejmueller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sergejmueller
sergejmueller / ga.php
Last active Aug 29, 2015
Tracking der Bestellungen in Google Analytics (GA) mithilfe von PHP und Measurement Protocol. Weitere Informationen: https://developers.google.com/analytics/devguides/collection/protocol/v1/
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 ),
@sergejmueller
sergejmueller / nginx.conf
Created Jul 11, 2014
Access-Control-Allow-Origin CORS configuration on Nginx
View nginx.conf
location ~* \.(eot|ttf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}
@sergejmueller
sergejmueller / fastcgi_cache
Last active Aug 29, 2015
Nginx-Caching für PHP-generierte Inhalte. Weitere Details: http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html
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;
@sergejmueller
sergejmueller / index.html
Created Sep 9, 2014
Prevent animation flickering on CSS3 Transitions/Transforms in Safari
View index.html
<!DOCTYPE html>
<html>
<style>
html {
-webkit-font-smoothing: antialiased;
}
</style>
@sergejmueller
sergejmueller / gist:1766524
Created Feb 8, 2012
Tooltip in Form einer Sprechblase auf CSS-Basis
View gist:1766524
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
.tooltip {
font: normal 11px/17px sans-serif;
color: red;
@sergejmueller
sergejmueller / gist:2578648
Created May 2, 2012
Rekursive Suche in allen Dateien des aktuellen Ordners mit der Ausgabe der Dateinamen
View gist:2578648
grep -lr "text" .
@sergejmueller
sergejmueller / gist:2842988
Created May 31, 2012
Korrekte Ermittlung des letzten Monats am 31. eines Monats. Nur für PHP 5.3.
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');
@sergejmueller
sergejmueller / gist:2912115
Created Jun 11, 2012
Google Analytics Tracking-Code zum Protokollieren von simplen A/B-Tests
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();
@sergejmueller
sergejmueller / demo.html
Created Jun 15, 2012
Fullscreen API Demo. Denkbar für eShops. Lauffähig unter Firefox, Chrome und Safari.
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>
@sergejmueller
sergejmueller / gist:3655924
Created Sep 6, 2012
Reset der CSS-Werte für iOS-Geräte
View gist:3655924
/* Reset Textskalierung */
body {
-webkit-text-size-adjust: 100%;
}
/* Reset für Inputelemente */
input {
-webkit-appearance: none;
-webkit-border-radius: 0;
You can’t perform that action at this time.