Git workflow for modern projects

After four years of a break for doing some management stuff and other non-development tasks I have decided to get back into coding (or at least to start thinking about getting back to it). First thing was to prepare development environment in general and refresh git flow knowledge in particular.

This article is a mixture of both my old article about Git+Gerrit workflows and Git workflow for Yii 2 contributors article. I assumed minimalist approach to make it possible to use this new workflow for virtually any Git-based project. Thus, I have purged most of, if not all of the things that are specific to Gerrit and Yii2.

Before continuing with this article, make sure that:

In addition, you may want to change the Git Bash’s prompt to something, you are more familiar with.

Read More “Git workflow for modern projects”

Compare of some family-like or child-control solutions

Having kids in these digital days may become a challenge. Especially, if you wish your sibling to get their hands on their first device — either a PC, Mac or some mobile stuff. Challenging, because soon you’ll discover how much you don’t know and how better your kid is than you! :>

Limiting access time and reviewing what is she or he watching, playing or reading is a must and soon you face the problem of remote family control.

Hope that this article will help you in this adventure.

Read More “Compare of some family-like or child-control solutions”

ISO image locked in Windows 10

After 25+ years of glorious development of Windows, witch-doctors at Microsoft village finally managed to discover that you can mount .iso image as fully-featured drive directly in system and you don’t need extra tools for this purpose:

The same group of maniacs smoked out too much weed and figured out that it will be so cool to not automatically unmount this image during system reset or shutdown.

Read More “ISO image locked in Windows 10”

My private Windows 10 check-list [updated]

Let’s say that I don’t like Windows 10. Mostly for the fact that a lot of things there are simply unusable or hard-to-use in the default configuration. And need to be changed in order to make them more usable. Since I have quite a few PCs to manage and have to go through this procedure on regular basis, I made my personal list of things you have to disable, uninstall, tweak up or change in Windows 10.

Look for the information in the corner — half an hour of a quick reading! This is really long and detailed article!

Update! Note that this article, written in April 2018 and targeting Windows 10 1511, is year later little bit outdated. If you’re using Windows 10 1903 then you may find certain things on these lists OK or otherwise not needing any change or tweak up.

Read More “My private Windows 10 check-list [updated]”

My private Microsoft Office check-list [updated]

Whether it is Office 2010 or 2013 (haven’t tried newer and already forgot about earlier) and whether it is on Windows 7, 8.1 or 10, the set of my preferred configuration options and elements is usually the same. So I decided to write it down here to keep track of it whenever I have to fresh-install Microsoft Office anywhere.

This article covers only configuration of each Office component that I use. For other things that I usually do or change during fresh-install of Office, please, refer to this article.

Note that this is an updated version of this post that includes items in the check-list for:

  • Office 2013 under Windows 7,
  • Office 2013 under Windows 10 and
  • Office 365 under Windows 10.

All of these versions ships with sometimes completely different configuration sets (even for Office 2013 under two different versions of Windows) and thus you may find many options listed in this article missing or already set to desired values.

Read More “My private Microsoft Office check-list [updated]”

Remove garbage from Windows 10

Even after years since initial publication, being mature and stable operating system right now, Windows 10 comes to your computer literally bloated with unnecessary stuff. And you need to clean it up by yourself. Certain things can be uninstalled “the normal way” (i.e. using Add/Remove programs panel). Some other requires more sophisticated moves.

Update! Note that this article, written in August 2018 and targeting Windows 10 1511 is now (October 2019) a little bit outdated. The general difference is that many things listed here as not removable the usual way in 1511 may be easily uninstalled using Add/Remove programs panel in Windows 10 1903.

Read More “Remove garbage from Windows 10”

Google Calendar: Quickly edit new event’s details

By an accident I have discovered a handy feature (bug?) in new Google Calendar’s interface:

  1. Point your mouse pointer to desired date and time.
  2. Press left mouse button and then quickly right mouse button.

This will add a new event to your calendar and redirect you directly into editing that new event’s details (without need of moving your mouse toward “More options” button and clicking it).

Read More “Google Calendar: Quickly edit new event’s details”

Shift+click on taskbar to quickly open program’s copy in Windows 7

So far, to quickly open a new copy of already running program or task I was doing this:

Right-click on program’s item in Windows taskbar + select name of that program from the context menu. Turns out there’s an even faster way of doing so: Click on program’s item while holding Shift button pressed.

Works in Windows 7. May work in other versions (though not tested). You may safely ignore this post, if this is absolutely obvious for you (wasn’t that obvious for me).

Show closed Jira tickets as last

For some of my JIRA filters (and for JIRA lists on some of my Confluence pages) I need to display all closed JIRA tickets as last and all in progress in the beginning of list. Using ORDER BY status failed because Closed isn’t neither first nor last status name when ordering status names alphabetically.

Searching Internet also didn’t help, but I managed to find a cool workaround:

ORDER BY resolution DESC

It assumes that any JIRA ticket in progress has resolution set to Unresolved which in JIRA means “empty value” and causes all tickets with such resolution to be displayed first and all tickets with Resolution != Unresolved to be displayed as last.

Replacement for mb_strimwidth() which is part of php-mbstring package

One of blogs in my WordPress network is using some old, free theme that was using mb_strimwidth() function. This function is part of php-mbstring package which turned out to be disabled by default in my hosting configuration for PHP 7.2 (it is enabled by default for PHP 5.6).

After enabling PHP 7.2 in my hosting configuration it turned out one of my blogs stopped showing content (showing those damn two small smilies instead). After enabling wp_debug mode it turned out that theme was using mb_strimwidth() that was part of disabled php-mbstring package.

The mb_strlen is not part of that package, seems to be part of core PHP and can be used as a workaround.

Read More “Replacement for mb_strimwidth() which is part of php-mbstring package”

Tasker: An ultimate automation tool for Android

Meet Tasker, a state-of-art automation tool for Android that can:

  • turn on GPS when Google Maps starts; turn it off when Google Maps closes,
  • show a list of your music apps when you plug in headphones,
  • turn off pattern lock while on home WiFi,
  • read incoming text messages aloud,
  • even more,
  • a lot of more,
  • even a lot of more.

It isn’t free (of course!). I costs… 5 bucks. But it is worth every damn cent spent on it!

And, if above is still not enough for you…

Read More “Tasker: An ultimate automation tool for Android”

Quickly forward Outlook message as a file

If you wish to forward any Outlook message as a file you can use copy/paste features:

  1. Find and select (on message list) message that you want to forward as a file.
  2. Press Ctrl+C to copy selected message to clipboard.
  3. Hit Ctrl+N to start a new message (or Ctrl+R to respond to some other message).
  4. Click anywhere within main text window (or press Tab three times to get there).
  5. Press Ctrl+V to attach copied message as a file (paste it from Clipboard).

That’s all, folks! :>

Sometimes, I need to forward message no x in my message list as a file attached in response to message no x-1 (the next coming in, since I have message list ordered by date). For this reason I use an ultra fast combination of: Ctrl+C | | Ctrl+R | Tab+Tab+Tab | Ctrl+V | Ctrl+Enter.

Handy regular expressions

This is just a memo for myself to remember all regular expression that I often use:

  1. Remove sh*t from movie’s subtitles (there’s a longer article on this topic here):
  2. Other:

Surround with / for JavaScript (and JSON?). Thus first example (\(([^)]+)\)) becomes /\(([^)]+)\)/.

Probably no use for anyone else except me, sorry! :>

Getting rid of forsaken “winmail.dat” sent by Microsoft Outlook

In many situations or scenarios Microsoft Outlook, instead of regular (consumable by other mail clients) meeting invitations can start sending “windmail.dat” instead. This is a proprietary format that other mail clients (like Thunderbird, Mac mail clients, web clients) ignore as not readable.

List of situations and configuration switches that may cause Outlook to behave like this is long. And so is the solution list. In my case only the most aggressive solution worked.

Read More “Getting rid of forsaken “winmail.dat” sent by Microsoft Outlook”

Say bye, bye to website screenshot stuff. Chrome DevTools 62 are here!

If you’re using any kind of software or browser’s plugin for capturing entire website, viewport areas longer than current screen or just a small pieces of website then with new Google Chrome DevTools 62 you can say bye, bye to all of them!

You can now capture screenshot of selected node (which includes capturing entire page, as I’ll show you) directly in DevTools in Google Chrome 62.

It is said that you can also capture a screenshot of selected part of viewport, but I managed to get this working only two times per ten on less than 10% of websites. Thus, I decided to not write about it.

Read More “Say bye, bye to website screenshot stuff. Chrome DevTools 62 are here!”

One-line UTF-8 encoded text files in Total Commander…

…are not correctly detected by it’s internal Lister viewer.

They’re detected as binary files in this case and if they contain any character from outside Latin range, Lister will most likely display such characters incorrectly (Total Commander does not do automatic UTF-8 detection in binary mode). According to TC’s author this is a correct and expected behavior.

Lister needs at list one line brake to correctly detect text file as UTF-8 encoded.

New Outlook’s calendar meeting with default signature

One of many wrongs, fuckups and things that are missing in Microsoft Outlook is the fact that you can’t set default signature for every new calendar meeting invitation, as you’d do for any new email message.

Things gets even worse as you dig through the problem and realize that Outlook developers were stupid enough to force you to design a whole new meeting template instead of just giving you an option to enable or disable this feature (as — again — it works in case of emails).

This guide is a redesigned version of this Stack Overflow answer (or actually this comment).

Read More “New Outlook’s calendar meeting with default signature”

HP LaserJet Pro M426fdn settings and factory reset

When running my HP LaserJet Pro M426fdn for the first time I didn’t removed touchscreen foil and my finger slipped over when selecting location of my printer. I ended up with having proper language but location set to Estonia and some reports (like Google Cloud Print configuration leaflet) printed in cyrylic.

Unfortunately, due to extreme stupidity of HP engineers you can only change language of your printer using standard configuration menu. But, in order to change location of the printer you have to perform a full factory reset of your hardware.

And here my problems started, because none of the solution I found seemed working on my printer.

Read More “HP LaserJet Pro M426fdn settings and factory reset”

Add one or more folders to .zip archive

To add single directory (with all files and sub-directories) simply execute:

zip -r zip_file_name.zip name_of_your_directory

To add all contents of current directory (again, recursively) call instead:

zip -r zip_file_name.zip *

While to add two or more directories (but not all) in current directory — list them:

zip -r zip_file_name.zip directory_a directory_b directory_c

Call just zip to see all switches, options etc.

Limit Android-based device functionality to an absolute minimum

If you ever need to turn some Android-based device (like a spare tablet) into single-function device (like auto-started browser with precisely selected website and all other functions disabled) then there’s a great article at Android Enthusiasts that explains in quick, sharp words, what you need to achieve this (some time and cash).

Read More “Limit Android-based device functionality to an absolute minimum”

chown: Recursively change owner of all files and folders

Sometimes QNAP changes file owner to admin:administ (actually to admin:administratorsadmin user in administrators group) which may cause some troubles on certain FTP operations when you’re logged in to QNAP’s FTP server with user different than admin (using this user to operate on FTP is a quite great mistake and you should always use other, less privileged user for this).

Using chown command you can easily fix this.

Read More “chown: Recursively change owner of all files and folders”