Skip to content

Instantly share code, notes, and snippets.

Zdeněk Drahoš zdenekdrahos

Block or report user

Report or block zdenekdrahos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
zdenekdrahos /
Last active May 19, 2020
Docker volumes - www-data Debian/Ubuntu + Alpine

Docker volumes - www-data Debian/Ubuntu + Alpine

Sharing host OS www-data directories as a volume is tricky for Alpine images. User ID (UID) and Group ID (GID) are different.

UID/GID Ubuntu Alpine
33 www-data xfs
82 - www-data
View MethodAnnotations.php
namespace Whatever;
// 10 Call to an undefined method Whatever\Swift_SmtpTransport::setUsername().
// 14 Call to an undefined method Whatever\Swift_SmtpTransport::setUsername().
class MethodAnnotations
public function __invoke()
zdenekdrahos /
Created Jul 23, 2016
phpqa - exit code experiments
$ phpqa --tools phpcs
[FileSystem\CleanDir] Cleaned build/
[FileSystem\FilesystemStack] mkdir ["build\/"]
[ParallelExec] /var/phpqa/vendor/bin/phpcs -p --extensions=php --standard=PSR2 --ignore=*/vendor/* "./" --report=checkstyle --report-file="build//checkstyle.xml"
1/1 [============================] 100%
[ParallelExec] '/var/phpqa/vendor/bin/phpcs -p --extensions=php --standard=PSR2 --ignore=*/vendor/* "./" --report=checkstyle --report-file="build//checkstyle.xml"' exited with code 1
[ParallelExec] Exit code 1 Time 0.25s
zdenekdrahos / status.html
Last active Feb 12, 2018
Scortes - jQuery, AJAX integration
View status.html
<html lang=cs><head><meta charset=utf-8 /></head><body>
<ul class="teams">
<li><a href='šice/status.html'>Muži</a></li>
<li><a href=' Újezd/Morašice/status.html'>Dorost</a></li>
<li><a href='šice/status.html'>Žáci</a></li>
<div id="scortes"></div>
<script src=""></script>
View bootstrap.php
// app/bootstrap.php
function getService($service, array $config = [])
return initApplication($config)->getService($service);
function initApplication(array $config)
View LatteWithGlobalVariables.php
namespace App;
use Latte\Engine;
class LatteWithGlobalVariables extends Engine
private $globals = [];
View config.rb
# disable layout
page ".htaccess.apache", :layout => false
# rename file after build
after_build do
File.rename 'build/.htaccess.apache', 'build/.htaccess'
View TransactionalDispatcher.php
use Doctrine\ORM\EntityManager;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class TransactionalDispatcher
/** @var EventDispatcherInterface */
private $dispatcher;
You can’t perform that action at this time.