Javascript Performance: What is the fastest no-op implementation

Feb 21, 2016
Test code:
  window.testArr = [];

  Benchmark.prototype.setup = function() {
    var NOOP1 = Function();
    var NOOP2 = function() {};
    var NOOP3 = new Function;
    var NOOP4 = Function.prototype;
    var NOOP5 = function() {return;};
    var NOOP6 = function() {return null;};
    function NOOP7() {}
    window.testArr.length = 0;
See test details on

Performance differences may vary between 0 and 13%. And the verdict is: No-op function is not bottleneck for sure.

Facebook Focus Mode

Jan 29, 2016

From time to time it is hard to stay focused on work. In my observation Facebook takes the most of my unproductive time. Blocking it was not fixing the problem, sometimes I need to use Facebook Chats.

I wrote a Chrome extension to hide everything but chat on Facebook. It also makes a chats bigger. Now I want to share it with you :-)

Windows 10: Fixing Photoshop crashes

Jan 26, 2016

After switching from my old Adobe Photoshop CS3 to Photoshop CC 2015, it started crashing very often with following message:

LoadLibrary failed with error 1114: A dynamic link library (DLL) initialization routine failed.

How fraudulent websites makes you click Facebook's "Like" or "Share" button

Jan 20, 2016

If you're using some social network service like Twitter, Facebook, Google+ you've probably seen your friends posting weird click-bait sites. Maybe you've felt into the trap too.

I've prepared simple demo website that reveals how is it possible, you click "Like" button without even knowing it:

The worst thing is: It's extremely easy to prepare such website. Attacker can make you to click "Share", "Like", "Share on the group, you're member of".

How to protect my accounts?

Disable 3rd party cookies

Like button will be there, but you won't be signed in.

Configure AdBlock/uBlock to disable specific 3rd party services

This will boost your security and limit data transfer. Like/share boxes won't load at all.

• Never click anything on suspicious websites.

Browsers protects us with disabling most of javascript actions, before user clicks. This solution removed annoying pop-ups almost completely. But when you click somewhere, you're not secure anymore.

Easy picking the best photos with IrfanView and NodeJS

Dec 28, 2015

On vacation time I take hundreds of photos, most of them are duplicates or not-really-interesting. I was looking for photo viewer that has option to select best pictures, to place in digital photo frame... Didn't found any so I made it myself with IrfanView and NodeJS

Git pro-tips

Jul 9, 2015
### Easiest way to make diff file:
git diff master HEAD > patch.diff
### restore diff:
git apply untitled.diff

### Easy squash commits into one

### list all commit authors:
git log --all --format='%cN <%cE>' | sort -u

### change commit author
git commit --amend --author "New Author Name <>"

### git for Windows:

Total Commander pro-tips

Jul 4, 2015

Use Windows-style shortcut (F2) for renaming:

1. Configuration - Options, Misc.
2. In 'Redefine hotkeys' choose F2 key, then click on magnify glass to the right from Command field and choose cm_RenameOnly from list (you can type part of command name to filter items). Click OK.
3. Click green check mark button to the right from magnify glass button.
4. Enjoy!

Type to search filename instead of writing in command line:

1. Go to Configuration -> Options
2. Select "Quick Search" in the left column
3. Tick "Letter only"
4. Click "OK" and that's all!

Check directory size:

It's really simple, just select directory and press [ SPACE ]

ps. For Linux Users: Double Commander is almost as good as Total Commander :-)

To be continued...