Skip to content

Instantly share code, notes, and snippets.

View YannickFricke's full-sized avatar
:octocat:
A ❤️ for open source

Yannick Fricke YannickFricke

:octocat:
A ❤️ for open source
View GitHub Profile
@YannickFricke
YannickFricke / gist:1263050
Created October 4, 2011 22:34 — forked from flipflop/gist:1263020
Mobile Detection with Optional Zepto / jQuery include
<?php
$deviceClass = "";
$graduateLevelClass = "";
if (ereg('iPhone',$_SERVER['HTTP_USER_AGENT']) || ereg('iPod',$_SERVER['HTTP_USER_AGENT'])) {
$deviceClass = "ui-iphone";
} else if (ereg('iPad',$_SERVER['HTTP_USER_AGENT'])) {
$deviceClass = "ui-ipad";
} else if (ereg('Android',$_SERVER['HTTP_USER_AGENT']) && ereg('Mobile Safari',$_SERVER['HTTP_USER_AGENT'])) {
$deviceClass = "ui-android";
};
@YannickFricke
YannickFricke / base.html.twig
Created January 8, 2018 03:25 — forked from enricofoltran/base.html.twig
Symfony: display all flash messages in a twig template
{% if app.session.flashbag.peekAll|length > 0 %}
{% for type, messages in app.session.flashbag.all %}
{% for message in messages %}
<div class="{{ type ? type : '' }}">
{{ message|trans({}, domain|default('messages')) }}
</div>
{% endfor %}
{% endfor %}
{% endif %}
@YannickFricke
YannickFricke / debug-grid.css
Created June 13, 2020 01:23 — forked from kesor/debug-grid.css
debug css grid
/* DEBUG Grid */
body {
position: relative;
background: blue;
}
body:after {
background-size: var(--grid-size) var(--grid-size);
background-repeat: repeat;
background-image:
linear-gradient(