Shorthand notation for Yii commands in Git Bash and Windows Terminal

Developing PHP applications in Yii 2 makes you use Yii command-line commands quite often (for example for migrations). Since I am a Windows maniac that uses XAMPP, I have to type:

php yii

before each command each and every time.

A bit tiring so I wanted to make this a little bit easy. For example, to be able to type:

y migrate

instead of:

php yii migrate

Getting there was quite easy for Windows scripts and using Windows Terminal. Things has got a little bit complicated when trying to achieve the same in PhpStorm. Which uses GitBash instead of Windows Terminal.

Read More “Shorthand notation for Yii commands in Git Bash and Windows Terminal”

Deleting or moving selection in Paint reveals emptiness…

…that is alpha channel instead of (as for past 30+ years) background color.

This is introduced in September 2023 software update and naturally cannot be turned off by means of changing anything in configuration. It is always one Microsoft way.

The easiest and fastest way of getting rid of this, is to get “old” Paint back.

Read More “Deleting or moving selection in Paint reveals emptiness…”

localStorage vs Firefox

For security (?) reasons (or because Mozilla developers are mentally retarded), for locally served files, Firefox is storing localStorage data per file, not per device (as it would do for domains and as other browsers does).

Sharing settings or any other data across two or more pages? Either throw Firefox to trash bin or forget it!

The solution is to detect, if you are working with mentally retarded browser and switch from localStorage to sessionStorage for it. But then, again, sessionStorage gets purged after browser or tab is closed. You will at least be able to transfer some settings (like if user want to have bigger font size or dark theme) between your locally severed pages, but the whole thing will ruin after they restart their browser.

Read More “localStorage vs Firefox”