Skip to content

Instantly share code, notes, and snippets.


Toni Uebernickel havvg

View GitHub Profile
havvg / make-responsive.scss
Last active Sep 6, 2017
SCSS Mixin to create any content responsive
View make-responsive.scss
// Based on Twitter Bootstrap Mixins
@mixin make-responsive($prefix, $breakpoints: $grid-breakpoints) {
@each $breakpoint in map-keys($breakpoints) {
$infix: breakpoint-infix($breakpoint, $breakpoints);
@if $infix != "" {
@include media-breakpoint-down($breakpoint, $breakpoints) {
#{$prefix}#{$infix}-down {
havvg / SimpleArrayTraversable.php
Last active Aug 15, 2017
A simple \Traversable based on an array
View SimpleArrayTraversable.php
class SimpleArrayTraversable implements \IteratorAggregate
private $data;
public function __construct($a, $b, $c)
$this->data = [$a, $b, $c];
havvg / redirect
Last active Mar 28, 2017
Doctrine: Nullable embeddables - workaround
View redirect
havvg / TariffContext.php
Last active Mar 26, 2017
Behat: Expect exceptions
View TariffContext.php
namespace Thengine\Behat\Context\Domain\Tariff\Model;
use Behat\Behat\Context\Context;
use Thengine\Domain\Tariff\Model\Tariff;
use Thengine\Domain\Tariff\Model\TariffCategory;
use Thengine\Domain\Tariff\Exception\CannotRemoveCategoryException;
havvg / .gitconfig
Last active Mar 26, 2017
Semantic Versioning: git latest-version
View .gitconfig
latest-version = "!git tag --sort=v:refname | tail -n1"
havvg / ZendKernel.php
Created Dec 29, 2016
StackPHP Example: Symfony + Zend Framework (ZF1)
View ZendKernel.php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
class ZendKernel implements HttpKernelInterface, TerminableInterface
havvg / diesel-preis.php
Created Oct 11, 2016
Diesel price of JET petrol station in Penzberg (melody script)
View diesel-preis.php
- "fabpot/goutte: ^3.1"
- "symfony/console: ^3.1"
use Goutte\Client;
use Symfony\Component\Console\Input\ArrayInput;
havvg / zshrc
Created Oct 11, 2016
weather function calling API
View zshrc
weather () {
curl "${CITY}"
View cs-fixer.diff
@@ -37,7 +37,7 @@ final class MailHandler implements HandlerInterface
* @param \Swift_Mailer $mailer
* @param \Twig_Environment $twig
- * @param string|array $fromAddress The reply-to address is derived from this value, by default.
+ * @param string|array $fromAddress The reply-to address is derived from this value, by default
public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $fromAddress)
Stage this hunk [y,n,q,a,d,/,e,?]? n
havvg /
Created Sep 27, 2016
Clean up composer vendors directory
find . -type f -name composer.json -maxdepth 4 -exec dirname {} \; | \
xargs -I{} find {} -type d -name vendor -maxdepth 1 | \
xargs rm -Rf