Skip to content

Instantly share code, notes, and snippets.

View worenga's full-sized avatar
🐱
i cyber.

Benedikt Christoph Wolters worenga

🐱
i cyber.
View GitHub Profile
@worenga
worenga / index.html
Created February 13, 2013 20:57
A CodePen by Ana Tudor. Circular menu with pure CSS - Just putting on CodePen something I've done months ago. **Absolutely no images used for the menu. The only image used is the one for the background.** Click the star to open the menu and anywhere else to close it. (Firefox has an issue with the :focus trick on the link - Thanks to Sara http:/…
<a class='button ctrl' href='#' tabindex='1'>★</a>
<ul class='tip ctrl'>
<li class='slice'><div>✦</div></li>
<li class='slice'><div>✿</div></li>
<li class='slice'><div>✵</div></li>
<li class='slice'><div>✪</div></li>
<li class='slice'><div>☀</div></li>
</ul>
@worenga
worenga / gist:4747405
Created February 9, 2013 22:32
Polynomdivision in LaTeX
\documentclass{scrartcl}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{polynom}
\begin{document}
\begin{center}
\polyset{style=C,div=:,vars=x}
\polylongdiv{2x^5+3x^2+x}{2x^3+1}
\end{center}
renderWith('ArticleCommentInterface');
}
function PostCommentForm()
{
Requirements::javascript('jsparty/behaviour.js');
Requirements::javascript('jsparty/prototype.js');
Requirements::javascript('jsparty/scriptaculous/effects.js');
Requirements::javascript('mysite/javascript/ArticleCommentInterface.js');
1: Data: Spot update 2, 3
1: Data: Spot update scouted
1: Data: Spot update reserved -1
0: Strat: targets sent to Slave
1: Data: Spot update 3, 4
1: Data: Spot update scouted
1: Data: Spot update reserved -1
1: Data: Spot update 4, 4
1: Data: Spot update scouted
1: Data: Spot update reserved -1
@worenga
worenga / index.html
Created December 7, 2012 23:17
A CodePen by Benedikt Wolters.
<h1>Conway's Game of Live</h1>
<canvas id="c"></canvas>
@worenga
worenga / gist:3852165
Created October 8, 2012 12:04
timepicker de local
$.timepicker.regional['de'] = {
timeOnlyTitle: 'Wählen Sie eine Zeit',
timeText: 'Zeit',
hourText: 'Stunde',
minuteText: 'Minute',
secondText: 'Sekunde',
millisecText: 'Milisekunde',
timezoneText: 'Zeitzone',
currentText: 'Jetzt',
closeText: 'Schließen',
@worenga
worenga / post-receive
Created October 5, 2012 00:46
Post-Receive hook for symfony2 repositories
#!/bin/bash
CURRENT_DIR="`pwd`"
REPO_NAME="$(basename "$CURRENT_DIR")"
if [ -d "/var/www/$REPO_NAME" ]; then
cd "/var/www/$REPO_NAME" || exit
unset GIT_DIR
@worenga
worenga / MyEventListener.php
Created March 27, 2012 11:18
Doctrine2 Event Listener
<?php
namespace My\Bundle\Listener;
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Events;
use Doctrine\ORM\Event\OnFlushEventArgs;
use Doctrine\ORM\Mapping\ClassMetadata;
use My\Bundle\Entity\Event;
<?php
namespace Blar;
use Doctrine\Common\EventSubscriber,
Doctrine\ORM\Events,
Doctrine\ORM\Event\OnFlushEventArgs,
Doctrine\ORM\EntityManager;
class AuditListener implements EventSubscriber {
@worenga
worenga / gist:2186735
Created March 24, 2012 18:59
Doctrine2: Unidirectonal One-To-Many Join Table
<?php
namespace MyCompany\MyBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* MyCompany\MyBundle\Entity
*