Skip to content

Instantly share code, notes, and snippets.

View isalmanhaider's full-sized avatar
👨‍💻
Exploring Drupal 10/11, Symphony 7, PHP 8.3, GenAI

Salman Haider isalmanhaider

👨‍💻
Exploring Drupal 10/11, Symphony 7, PHP 8.3, GenAI
View GitHub Profile
let debounce = function (cb, delay) {
let timer;
return function () {
let context = this;
clearTimeout(timer);
timer = setTimeout(() => {
cb.apply(context, arguments);
}, delay);
};
};
@isalmanhaider
isalmanhaider / clean_permissions.php
Last active February 13, 2024 19:04
clean_permissions.php
<?php
/**
* @file
* Script to help cleanup the not existing permissions from your roles.
*
* @code
* drush scr clean_permissions.php
* drush -y cex
* @endcode
*