Skip to content

Instantly share code, notes, and snippets.

View ducho's full-sized avatar

Ducho ducho

  • Freelancer
  • Bratislava, Slovakia
View GitHub Profile
@ducho
ducho / resume.json
Last active December 2, 2025 14:50
{
"basics": {
"name": "Dušan Schiffel",
"image": "https://media.licdn.com/dms/image/v2/D4D03AQEcpR_qywk54g/profile-displayphoto-crop_800_800/B4DZoMuJqMGkAI-/0/1761150016851?e=1766016000&v=beta&t=zIQwyNOx3RquBx3rS0iSiebLgc7gCAvt5Wvp0TBjKAE",
"label": "Senior PHP/Symfony Engineer · Backend & Systems Architect · DevOps & AI Automation Specialist",
"email": "dusan@schiffel.sk",
"phone": "+421950280832",
"url": "https://www.schiffel.sk",
"location": {
"city": "Trenčín",
server {
server_name app.localhost;
root /app/public;
location / {
# try to serve file directly, fallback to index.php
try_files $uri @rewriteapp;
}
location @rewriteapp {
@ducho
ducho / EntityEventSubscriber
Created June 20, 2023 18:20
Working subscriber
<?php
declare(strict_types=1);
namespace App\EventSubscriber;
use Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface;
use Doctrine\ORM\Event\OnFlushEventArgs;
use Doctrine\ORM\Event\PostFlushEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use Doctrine\ORM\Events;
#[Route('/{id}/edit', name: 'airport_edit', methods: ['GET', 'POST'])]
public function edit(Request $request, Airport $airport): Response
{
$form = $this->createForm(AirportType::class, $airport);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->entityManager->flush();
return $this->redirectOrResponse($request);
<?php
declare(strict_types=1);
namespace App\Handler;
use Doctrine\ORM\EntityManagerInterface;
use Monolog\Handler\AbstractProcessingHandler;
use Monolog\LogRecord;
use Satur\DatabaseBundle\Entity\Log;
use Symfony\Bundle\SecurityBundle\Security;
@ducho
ducho / EntityEventSubscriber
Created June 20, 2023 18:06
EntityEventSubscriber
<?php
declare(strict_types=1);
namespace App\EventSubscriber;
use Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use Doctrine\ORM\Events;
use Doctrine\Persistence\Event\LifecycleEventArgs;
use Psr\Log\LoggerInterface;
<?php
namespace App\Form;
use App\Entity\Domain;
use App\Entity\EmailVirtual;
use App\Entity\EmailVirtualDestination;
use App\Repository\EmailVirtualRepository;
use App\Service\CurrentDomainService;
use Symfony\Component\Form\AbstractType;
@ducho
ducho / gist:16db38921127bc259d09469cea0815e6
Created August 24, 2022 16:44
EmailVirtualType - Email Forwarding
<?php
namespace App\Form;
use App\Entity\Domain;
use App\Entity\EmailVirtual;
use App\Entity\EmailVirtualDestination;
use App\Repository\EmailVirtualRepository;
use App\Service\CurrentDomainService;
use Symfony\Component\Form\AbstractType;
@ducho
ducho / sortable_controller.js
Created October 15, 2021 07:31
Sortable Stimulus Controller for nested sortable component
import Sortable from "stimulus-sortable"
export default class extends Sortable {
connect() {
super.connect()
this.defaultOptions
}
async end({ item, newIndex }) {
@ducho
ducho / gist:4f3ac2b11a87a8603d7d30064a57b29f
Created January 30, 2019 09:17 — forked from carlos8f/gist:b09a734cf626ffb9bb3bcb1ca35f3db4
zenbot sim result, BTC-USD, 90 days, 195.45% profit, 61.06% over buy/hold
2017-05-11 16:00:00 1832.97 USD -0.06% 619.75 + 0.0447 null 1.91% 0.031060 BTC 2897.41 USD 195.43% +61.48%
{ days: 90,
profit_stop_enable_pct: 10,
profit_stop_pct: 1,
sell_rate: -0.006,
trend_ema: 36,
period: '1h',
strategy: 'trend_ema_rate',
sell_stop_pct: 4,
buy_stop_pct: 0,