Skip to content

Instantly share code, notes, and snippets.

View hinzundcode's full-sized avatar

Chris hinzundcode

View GitHub Profile
Wahrheitstafeln
1P1, 1A1
Aussagenlogik
1P2, 1A2, 2P3, 2A3, 2P2, 2A2
Quantoren
1P3, 1A3
Mengenoperationen
@hinzundcode
hinzundcode / jquery.bootstrapMenu.js
Created September 8, 2011 07:45
jQuery BootstrapMenu
/**
* jQuery BootstrapMenu
* Version 1.0.0
* Released under the MIT license.
*
* Usage:
* $(".topbar").bootstrapMenu({
* mousemove: true,
* cancel: true
* });
@hinzundcode
hinzundcode / myGIGA.user.js
Created July 18, 2012 23:23
GIGA UserScript um die Kacheln auf der Startseite durch eine TeaserBox zu ersetzen
// ==UserScript==
// @name myGIGA
// @version 1.0.3
// @include http://www.giga.de/
// ==/UserScript==
var main = function () {
var myGIGA = {
Teaser: function (title, url, image) {
this.title = title;
@hinzundcode
hinzundcode / gist:3194587
Created July 28, 2012 20:05
Handle ControllerCollection without HttpKernel and Events
<?php
error_reporting(E_ALL + E_STRICT);
require_once __DIR__.'/../vendor/autoload.php';
use Silex\Application;
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RequestContext;
<?php
namespace schokocappucino\Nameless\User\PasswordEncoder;
class CryptBlowfishPasswordEncoder implements PasswordEncoderInterface {
protected $cost = 10;
public function __construct($cost) {
if ($cost < 4 || $cost > 31)
throw new Exception('Invalid bcrypt cost parameter specified: '.$cost);
#include <ESP8266WiFi.h>
const char* ssid = "...";
const char* password = "...";
const IPAddress ip(10, 0, 0, 14);
const IPAddress gateway(10, 0, 0, 1);
const IPAddress subnet(255, 255, 0, 0);
const char* host = "10.0.1.1";
const int port = 8889;
@hinzundcode
hinzundcode / say
Created July 30, 2013 14:54 — forked from xandrucea/say
say -v 'pipe organ' Dum dum dee dum dum dum dum dee Dum dum dee dum dum dum dum dee dum dee dum dum dum de dum dum dum dee dum dee dum dum dee dummmmmmmmmmmmmmmmm
say -v Cellos Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo
@hinzundcode
hinzundcode / parser.php
Created November 4, 2013 14:53
Parse Gitolite config (for gitlist :)
<?php
class GitoliteConfigParser {
public function parse($config) {
$lines = explode("\n", $config);
// remove comments and spaces
$lines = array_filter(array_map(function ($line) {
$line = preg_replace('/#(.*)$/', '', $line);
return preg_replace('/^\s+/', '', $line);
PS1="\[\033[1;31m\]\u\[\033[0m\] in \[\033[1;32m\]\w\[\033[0m\] on \[\033[1;35m\]\h\[\033[0m\]\n$ "
export PS1
@hinzundcode
hinzundcode / Dockerfile
Created July 1, 2016 11:41
firefox over docker and vnc
FROM ubuntu
RUN apt-get update && apt-get install -y x11vnc xvfb firefox
RUN mkdir ~/.vnc
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
RUN bash -c 'echo "firefox"' >> /.bashrc
EXPOSE 5900
CMD ["x11vnc", "-forever", "-usepw", "-create"]
# on osx: $ open vnc://docker:<port>