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
View MethodAnnotations.php
<?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
zdenekdrahos / bash.sh
Created Jul 23, 2016
phpqa - exit code experiments
View bash.sh
$ 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
[phpqa]
+-------+----------------+--------------+--------+-------------+
@zdenekdrahos
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='https://scortes.rozpisyzapasu.cz/api/533A1A/2015/Morašice/status.html'>Muži</a></li>
<li><a href='https://scortes.rozpisyzapasu.cz/api/530C2B/2015/H. Újezd/Morašice/status.html'>Dorost</a></li>
<li><a href='https://scortes.rozpisyzapasu.cz/api/533E2A/2015/Morašice/status.html'>Žáci</a></li>
</ul>
<div id="scortes"></div>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
View bootstrap.php
<?php
// app/bootstrap.php
function getService($service, array $config = [])
{
return initApplication($config)->getService($service);
}
function initApplication(array $config)
{
View LatteWithGlobalVariables.php
<?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'
end
View TransactionalDispatcher.php
<?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.