Skip to content

Instantly share code, notes, and snippets.

@marcoiosif
marcoiosif / RefreshRolesSubscriber.php
Last active August 13, 2024 19:16
Symfony avoid log out after update roles
<?php
declare(strict_types=1);
namespace App\EventSubscriber;
use App\Entity\User;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
@marcoiosif
marcoiosif / TinderAutoLike.js
Last active October 26, 2022 20:58
Tinder AutoLike
/*
* Created on Nov 13 2021
* https://gist.github.com/marcoiosif
* Author Marco iosif Constantinescu
*/
class TinderAutoLike {
constructor(seconds) {
// Convertimos segundos a milisegundos
this.delay = seconds * 1000;