Skip to content

Instantly share code, notes, and snippets.

View vonglasow's full-sized avatar
🎯
Focusing

vonglasow

🎯
Focusing
View GitHub Profile
@vonglasow
vonglasow / Data.php
Created January 31, 2014 10:17
Archi
<?php
namespace A;
use Zend;
class Data
{
protected $limit;
// ...
@vonglasow
vonglasow / gist:10021599
Last active August 29, 2015 13:58
traits properties
<?php
trait a {
public function getConfig()
{
return $this->world . '/config.php';
}
}
class B {
@vonglasow
vonglasow / .gitignore
Last active August 29, 2015 14:01
Hoa Http request
/vendor/
@vonglasow
vonglasow / Factory.php
Last active August 29, 2015 14:02
Factory
<?php
class Factory
{
public function create()
{
$this->context->create();
}
public function setContext($context)
@vonglasow
vonglasow / suffix.py
Created June 22, 2014 15:01
suffix.py
# -*- coding: utf-8 -*-
from hyde.plugin import CLTransformer
from hyde.fs import File
from operator import attrgetter
#Fork of lepture/suffix.py
class SuffixPlugin(CLTransformer):
"""
@vonglasow
vonglasow / Gof.php
Last active August 29, 2015 14:03
Conway
<?php
require_once __DIR__ . '/vendor/autoload.php';
class GameOfLife
{
const DEAD = 0;
const ALIVE = 1;
const X = 25;
@vonglasow
vonglasow / pomo.pl
Last active August 29, 2015 14:03
Get redmine issues title for pomojs
#!/usr/bin/perl
use strict;
use warnings;
use Carp;
use WWW::Mechanize;
use Mojo::DOM;
use String::ShellQuote;
@vonglasow
vonglasow / pre-commit.sh
Last active August 29, 2015 14:04
hook
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
@vonglasow
vonglasow / json.php
Created November 4, 2014 10:58
compiler
$sampler = new \Hoa\Compiler\Llk\Sampler\Coverage(
\Hoa\Compiler\Llk\Llk::load(
new \Hoa\File\Read($file->getPathName())
),
new \Hoa\Regex\Visitor\Isotropic(
new \Hoa\Math\Sampler\Random()
)
);
$json = array();
substr |||||||||||||||||||||||||||||||||||||||||||||||||||||||| 804ms, 100.0%
offset ||||||||||||||||||||||||| 359ms, 44.7%
Array
(
[substr] => 40696
[offset] => 1704
)
avonglasow@avonglasow(11:15:25):/tmp/bench$ php -v
PHP 5.4.4-14+deb7u2 (cli) (built: Jun 5 2013 07:56:44)
Copyright (c) 1997-2012 The PHP Group