Skip to content

Instantly share code, notes, and snippets.

Avatar

Lukáš Unger lookyman

View GitHub Profile
View 09-spusteni-supervizora-nahrazeni-casu-v-cronu-spusteni-cronu
#!/bin/bash
sleep 6
cd /var/www/prod/
echo "Syncing supervisor"
cp /var/www/prod/prodeti.cz/supervisor/prodeti.cz.conf /var/www/prod/supervisord.conf.d/
cp /var/www/prod/bigbrands.cz/supervisor/bigbrands.cz.conf /var/www/prod/supervisord.conf.d/
cp /var/www/prod/bigbrands.sk/supervisor/bigbrands.sk.conf /var/www/prod/supervisord.conf.d/
cp /var/www/prod/bambino.sk/supervisor/bambino.sk.conf /var/www/prod/supervisord.conf.d/
View TestCaseCreateMockDynamicReturnTypeExtension.php
<?php
declare(strict_types=1);
namespace PHPStan\Type\PHPUnit;
use Nette\PhpGenerator\ClassType;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
View grudlovina.php
<?php
use Nette\DI\Compiler;
use Nette\DI\Container;
use Nette\DI\ContainerLoader;
/**
* Nice and straightforward.
*
* @return Container
View test.php
// $container instance of Nette\DI\Container
$prefixes = ['render'];
$pattern = '#^(' . implode('|', $prefixes) . ')(.+)#i';
$presenterFactory = $container->getByType(Nette\Application\IPresenterFactory::class);
if (!$presenterFactory instanceof Nette\Application\PresenterFactory) {
exit;
}
foreach ($container->findByType(Nette\Application\IPresenter::class) as $service) {
View keybase.md

Keybase proof

I hereby claim:

  • I am lookyman on github.
  • I am lookyman (https://keybase.io/lookyman) on keybase.
  • I have a public key whose fingerprint is D0F4 F0A6 6F19 C457 7A5C BD1E CCEC C866 AF5A 1293

To claim this, I am signing this object:

View toggles.ajax.js
(function($, undefined) {
$.nette.ext(
'toggles',
{
init: function() {
this.initToggles();
var snippets;
if (snippets = this.ext('snippets', true)) {
snippets.complete($.proxy(function() {