boy in white t shirt sitting on chair in front of computer

Shorthand notation for Yii commands

Developing PHP applications in Yii 2 makes you use Yii command-line commands quite often (for example for data migrations etc).

Since I am a Windows maniac, I have to type php yii before each command each and every time. A bit tiring. 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.

Read More “Shorthand notation for Yii commands”

Replace “new” Paint with Classic Paint

Deleting or moving selection in Paint reveals emptiness… that is alpha channel instead of (as for past 30+ years) background color.

This is one of many stupid things introduced in “new” Paint that comes to you along with 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 “Replace “new” Paint with Classic Paint”

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”