Skip to content

Instantly share code, notes, and snippets.

FROM php:7.2.2-apache
LABEL Denis Georgiev
RUN useradd -ms /bin/bash -u 1337 sylar
RUN apt-get update \
&& apt-get install -y git zip unzip \
&& apt-get -y autoremove \
&& apt-get clean \
@sylarbg
sylarbg / module.config.php
Created November 21, 2015 17:19 — forked from Ocramius/module.config.php
Zend\Db adapter instantiation through Zend Framework 2 Di
<?php
return array(
'di' => array(
'definition' => array(
//teaching DI to use the factory
'class' => array(
'Zend\Db\Db' => array(
'methods' => array(
'factory' => array(
'adapter' => array(
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};