I'm a full stack web developer and here is the place, where I collect useful information about developing cool web services and sites.

My favorite technologies are:

  • PHP: Drupal Content Management Framework, Symfony Framework.
  • JavaScript: Strapi Node.js framework, Vue.js frontend, Quasar.
  • System administration: Debian/Ubuntu Linux, SaltStack, Docker.

More about me »

Recent posts:

Quick way to create an own patch for composer package of Drupal module and other projects

Very often we need to quickly change something in source files of composer package (for example some Drupal module), and generate a patch with those changes.

This can be done via those steps, using drupal/search_api_solr composer package as example :

Using systemd as user service manager with systemctl and journalctl in userspace

Common systemd usage is to manage global linux services, that can be created/modified only with root/sudo credentials.

But systemd have the great user mode, that allow to create and control any services without sudo permissions, that runs as user owner, we simply need to add the `--user` argument.

For allow to start user services on system boot, you must one-time launch the command for needed user: sudo loginctl enable-linger LOGIN


Delete all available tables on PostgreSQL database without schema permissions

    r RECORD;
    FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = current_schema()) LOOP
        EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(r.tablename) || ' CASCADE';
END $$;

This query will delete all available tables for current user and schema, without needs to have SCHEMA privileges.

The most popular solution via:


Often shows the error, because of missing owner permissions or other restrictions:


How to eval PHP code via drush without escaping quotes routine

Very often there is a need to execute via drush eval command the PHP code with both single and double quotes, something like this:

echo "Hello, '$username'!"; 

This can be quickly done without manually adding slashes to each quote in PHP code via this bash trick:

PHP=`cat <<'EOF'
echo "Hello, '$username'!"; 
EOF`; drush ev "$PHP"

Instead of single line of PHP code, you can insert long multi-line part of code, without carrying about escaping quotes.


Quick way to install SaltStack minion on Debian / Ubuntu Linux

Here is bash commands to quickly install salt-minion to Ubuntu / Debian systems:


hostnamectl set-hostname $HOSTNAME

cd /tmp && wget -O - https://bootstrap.saltproject.io | bash && rm ./bootstrap-salt.log

echo "master: $MASTER
" > /etc/salt/minion.d/$BRAND.conf

echo "$HOSTNAME" > /etc/salt/minion_id

service salt-minion restart


How to view and revert installed schema version of module in Drupal 8, 9

After executing hook_update_N functions, Drupal stores last version of installed updates in his key-value storage, if update function executed without exceptions.

You can simply lookup installed version via command-line drush command:

drush ev "var_dump(drupal_get_installed_schema_version('my_module'))"

Sometimes you may need revert version to previous, for re-apply updates, or repeat updates, if they previously executed with problems.

You can set previous version of Drupal module schema version via this cli drush command:


How to disable auto switching Bluetooth from A2DP to HSP profile on Skype calls in Linux

If you use Bluetooth headset, you probably have bad quality of voice in VoIP calls via Skype and other apps. This happens on Linux and on Windows too.

This happens because when an application starts a call - it create a recording stream with property media.role=phone (telephony applications should set that property for their streams), and PulseAudio switch profile of your Bluetooth Headset from A2DP (Stereo high-quality one-way channel) to HSP/HFP (Mono low-quality 2-way channel for voice-only).