Posts

Showing posts from February, 2026

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: ...

Tmux - work cases and tune up

Image
 Tmux - work cases and tune-up how to scroll rows in tmux terminal splited windows how to save sessions, layout, dirs and even progs state in tmux how to change horizontal split to vertical split in tmux how to add horizontal and vertical splits in tmux + key bindings how to exit tmux but leave session working  how to attach session to tmux how to know how many sessions you have For those who don't  aware what is it - this s terminal shell and you can install it for your distro like sudo apt-get install tmux  (for Debian like Ubuntu etc.) 1. How to scroll rows in tmux terminal spitted windows To scroll rows within a specific  tmux  split window (pane), you must first  enter  copy mode . This allows you to navigate and review the pane's scrollback buffer.   Scrolling with Keyboard Enter copy mode : Press your  tmux  prefix (default is Ctrl+b), then immediately press the [ key. An indicator in the top right of the pane will...

Adding not root user to Docker container

 Adding not root user to Docker container  in docker file: ARG USERNAME=containeruser ARG USER_UID=1000 ARG USER_GID=$USER_UID RUN groupadd --gid $USER_GID $USERNAME \     && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \     && chown -R $USER_UID:$USER_GID /home/$USERNAME     # [Optional] Add sudo support if needed     # && apt-get update && apt-get install -y sudo \     # && echo $USERNAME ALL=(root) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \     # && chmod 0440 /etc/sudoers.d/$USERNAME # Set the default user for all processes in the container (optional, but ensures everything runs as this user) # USER $USERNAME