Posts

Showing posts with the label howto

How to forget to run php ./vendor/bin/drush cr for ever

Image
How to forget to run php ./vendor/bin/drush cr for ever Yes, it is possible to automatically run   php ./vendor/bin/drush cr   on file save, typically by using file-watching tools like   nodemon ,   entr , or IDE-specific plugins (e.g., VS Code "Run on Save"). These tools detect file changes in your Drupal directory and execute the drush command to clear the cache.   Using  nodemon  (Node.js): Install  nodemon  and run: nodemon --watch web/modules --watch web/themes --ext php,yml,twig --exec "php ./vendor/bin/drush cr" Using  entr  (Unix tool): find . -name "*.php" -o -name "*.yml" -o -name "*.twig" | entr -p php ./vendor/bin/drush cr IDE Extension (VS Code): Install an extension like "Run on Save" and configure it to trigger  php ./vendor/bin/drush cr  when PHP, YML, or TWIG files are saved. Performance:  Automatically clearing cache on every save can slow down development, especially with large projects. Pathing: ...

Advanced work with git stash

Advanced work with git stash In Git, the most recent stash is  always  assigned the index  0 , appearing as  stash@{0} . When you create a new stash, all existing stashes are pushed down the stack (e.g., the previous  0  becomes  1 ).   1. Identify which stash is yours To see all your stashed entries and their assigned numbers, use: git stash list   This will output a list like this: stash@{0}: WIP on master: 4fd1101...  (Latest) stash@{1}: On develop: updated files...   2. View contents without applying You can inspect the contents of any stash entry using the  show  command. View a file summary (stat): git stash show stash@{0} (Shows only the list of files changed and the number of insertions/deletions) View full code changes (diff): git stash show -p stash@{0} (The  -p  or  --patch  flag shows the actual line-by-line code changes) View untracked files: git stash show --include-untracked stash@{0} Vie...

VSCode stuck on "Scanning folder for git repositories" how to fix

VSCode stuck on "Scanning folder for git repositories" how to fix Search in extesions for @builtin git look at  "Git integration for Visual Studio Code" disable it push reload extensions enable it again.

Interesting frontend repos

Interesting frontend repos (libs) react-toastify -  react notification library (really cool) - howto article here  https://www.npmjs.com/package/slugify - slug the string puppeteer -  Puppeteer is a JavaScript library which provides a high-level API to control Chrome or Firefox over the  DevTools Protocol  or  WebDriver BiDi . Puppeteer runs in the headless (no visible UI) by default https://github.com/creativetimofficial/ct-nextjs-material-kit-pro  - Material UI for NextJs expressjs/body-parser - Node.js body parsing middleware. Parse incoming request bodies in a middleware before your handlers, available under the req.body property. https://github.com/sachinchoolur/lightGallery - great Gallery and Slider - lightGallery !  https://www.npmjs.com/package/react-google-autocomplete - Google Autocomplete for React https://www.npmjs.com/package/qs -  A querystring parsing and stringifying library with some added security. And great article h...