Normal.dot Word 365 template with macros and settings

In Word version prior Word 365 all you needed to do in order to customize Normal.dot template (i.e. change macros, styles, keyboard shortcuts) was:

  • Start Word with an empty doc or double click Normal.dotm in %APPDATA%\Microsoft\Templates
  • Change anything you want
  • Hit F12 and save new template under New.dotm
  • Exit Word, delete Normal.dotm and rename New.dotmNormal.dotm

This thing is one of many simple and obvious things that Microsoft made really difficult in Word 365.

If you have such file (personal template) that you have been using for years (like I do) and if you try to open it in Word 365 to add some new modification and then you save it then you will find that everything you changed (now and earlier) will be lost. For some stupid reason known only to Microsoft freaks.

Here is how to have modified Normal.dotm with all your settings in Word 365.

Read More “Normal.dot Word 365 template with macros and settings”

Your eyes are tired? Night Eye to the rescue!

Windows 11 finally introduces nearly full, system-wide support for black / dark user interface. It’s Microsoft, so you can’t except 100% success (Properties-like, delete confirmation and other system dialogs are still terribly and painfully white), but still.

Then the question comes: what about websites? Everything is so (peacefully to your eyes) dark… until you open your web browser and navigate to a first website.

The answer is: Night Eye browser extension.

They offer you a three months long free test period, but believe me or not, you only need just a few days (or sometimes even a couple of hours) to fall in love so deeply that you simply can’t imagine life without it!

Read More “Your eyes are tired? Night Eye to the rescue!”

Additional keyboard layout available in Windows

If, after installing Windows 10 or 11 and some languages, when you press Win+Space you see some additional keyboard language (the one that does not belongs to any installed language):

Then the solution is as simple as:

  1. Install that language (English (United Kingdom) in the above example)
  2. Go to language details and install the keyboard layout (Polish (Programmers) in here)
  3. Uninstall the whole just added language language pack

After that pressing Win+Space should reveal only languages and keyboard layouts that you have actually installed in your system.

Source: How to get rid of US language in Windows 11.

Export PuTTY settings or sessions out of Windows Registry

PuTTY stores all sessions in Windows Registry, not in a file, so if you want to export these and import on some other computer or account then follow these steps (source):

  1. Press Win+R to run Registry Editor in Windows
  2. Type or paste the following (and hit Enter to confirm):
regedit /E "C:\Trash\PuTTY Settings.reg" HKEY_CURRENT_USER\Software\SimonTatham

Adjust path after /E switch to match your expectations.

Execute the following (instead of above):

regedit /E "C:\Trash\PuTTY Sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

if you wish to export just sessions, not the entire configuration of PuTTY.

Double click exported .reg file in order to import sessions or settings on a new computer.

Source: How to Export and Import Putty Settings (by TechEarl -May 27, 2018)

The quickest way to add RestAPI to your Yii 2 app. Part 2

As explained in the previous article, the example given in Yii 2 Guide about turning regular MVC apps into RESTful one is of a low quality, as it mixes certain things (refer to the previous article for details).

This article deals with this problem and show how to enable REST in Yii 2 Advanced Project Template by adding REST UserController directly to frontend application in that template and thus allowing to server User model through RESTful approach.

Read More “The quickest way to add RestAPI to your Yii 2 app. Part 2”

Reducing PowerPoint presentation’s file size using brute-force method

Since Microsoft is Microsoft and the software produced by this company may surprise you in many ways, it may happen that the ideas given in the previous article turn out to be not enough. And file size of your PowerPoint presentation will still be too big.

In this case a more brutal method is needed.

Since every Microsoft Office document is in fact a .zip archive, we will try to reduce file size by direct modification or manipulation of the content of this file.

Read More “Reducing PowerPoint presentation’s file size using brute-force method”

Block all traffic from Russia to coming your site

Whether you want to say “no!” to Putin’s war or you just want to block Russian hackers from attacking your website, the solution is as easy as:

  1. Connect to your website via FTP and download current version for .htaccess file from there
  2. Make a copy of this file, just in case…
  3. Go to Country IP Blocks website
  4. Search for Russian Federation and check the checkbox next to it
  5. Scroll the page all the way up and make sure that Apache .htaccess Deny is selected
  6. Click Create ACL button and copy all the content from ACL Results list that will appear
  7. Paste it at the end of your .htaccess file and save the file
  8. Upload it back to your website via FTP overwriting the existing file

Sure, this is not the ultimate solution. Use of proxy servers, Tor networks, botnets and other techniques for spoofing actual IP address will get them through your “so called firewall”. Also, IP address assigmnets changes often, so Country IP Blocks database might already be out-dated (if fact, it is). But, hey!, it’s always something. As good for the start as anything else. And surely better than doing nothing.

Read More “Block all traffic from Russia to coming your site”

Start Office 365 apps with a document

Office 365 off-line apps brings new start-up behavior of showing a summary screen instead of starting with an empty document open. If you like the “old” behavior then there’s a very easy way to achieve this:

  1. Open Word / Excel / Power Point
  2. Go to OptionsGeneralStart up options
  3. Uncheck the Show the Start screen when this application starts item
  4. Click OK to confirm

Restart app to see the effect.

Reverse dates in filenames using Total Commander’s multi-rename tool

Multi-rename tool in Total Commander is fantastic (when you know how to use it) and it saved my ass (before manually renaming many files) in many scenarios, including some very specific or even weird ones.

This scenario is one of such.

I had dates written directly as a part of filename, i.e.: Document name (DD-MM-YYYY).jpg, but (as shown) starting with day and ending with year. I had to reverse them, but only dates, keeping the rest of file untouched — i.e. Document name (YYYY-MM-DD).jpg.

At first, I thought that this time I will be forced to do this manually. But, I recalled multi-rename tool’s documentation and its small part about backward characters counting (i.e. from end of filename).

Read More “Reverse dates in filenames using Total Commander’s multi-rename tool”

Doing IT in Switzerland

I have a chat with a HR guy from Switzerland. He gave me some wages for the IT (May 2021; post-COVID!):

Most likely gross, but still… Swiss IT is doing good. Really, good…

Various wako problems with Alt+Tab and Microsoft products

Ever since Windows exists there was a very handy Alt+Tab combination to quickly switch between open applications. Nowadays, when people are using many screens for single computer it might be less often used, but still is very familiar and handy.

Not for so long time, but still for quite long, Microsoft is doing everything to make that simple, obvious and easy to understand combination work as wrong as possible in their products, so from time to time you may run into a really weird behaviour. For example:

Fortunately these inconsistencies and workflow breakers exists only in certain Microsoft products and are easy to fix.

Read More “Various wako problems with Alt+Tab and Microsoft products”

MEGA — file sharing and cloud storage far above average

The IT world grows, big data becomes your everyday’s pal. Whether you are a developer or project manager, you need to store more and more data each and every day. Getting a good quality and reliable solution becomes a bit challenge. To help you with that I wanted to tell you a bit about MEGA service.

I found it by a complete coincidence (I am not getting paid for this post!) — a friend has shared a file with me. I dug into details and found it interesting. In my opinion MEGA is far better than most file sharing services and can challenge even well known cloud storage options like Google Drive, Dropbox or OneDrive.

So, what makes MEGA that unique? In short: command-line tool, NAS support, mobile apps, browser’s extensions and many more.

Read More “MEGA — file sharing and cloud storage far above average”

Force Microsoft Edge to safe images with .jpg instead of .jfif extension

There are million of guides in the Internet on how to correct this stupid default behavior that happens in Microsoft Edge nearly every time and in Google Chrome from time to time. But all these solutions requires you to read through long block of text or watch 2-3 minutes long video while solution is actually ultra-fast.

  1. Start > type regedit > hit Enter
  2. Paste Computer\HKEY_CLASSES_ROOT\MIME\Database\Content Type\image/jpeg to address bar > hit Enter
  3. Double click on Extension > paste .jpg > hit Enter

And… you’re done! Restart Edge to see the effects. No more .jpg files saved with stupid .jfif extension.

File upload blocked despite ALLOW_UNFILTERED_UPLOADS set to true

Some file types are reporting its MIME type different than it is associated with given file extension in WordPress database. Such file upload will be blocked for security reasons (.epub file in my case):

X.epub: Sorry, this file type is not permitted for security reasons

A special ALLOW_UNFILTERED_UPLOADS flag is used in WordPress in such situations. You should try it first. If you still have not satisfying results (i.e. you still can’t upload a file of certain type) then it may mean some MIME table changes made by either your plugin or theme or even a nasty bug in WordPress itself.

In all cases, using must-use plugin with some small filter should solve the problem.

Read More “File upload blocked despite ALLOW_UNFILTERED_UPLOADS set to true”

Uploading MIME-conflicted ebooks and files to WordPress

Starting with 5.0.1 version WordPress introduced an additional security check, where file’s MIME type must match extension. So an attempt to upload any executable file file with .jpg extension will fail with:

Sorry, this file type is not permitted for security reasons

This can be a real pain when trying to upload certain ebook format, because this is exactly the case — a MIME-type conflicted with extension (at least as seen by WordPress). For example: Kindle’s .azw3 files declares itself (content; look inside) as BOOKMOBI. Or .epub format which has application/epub+zip as MIME-type and being a modified version of .zip file or actually a regular .zip file with some predefined content.

There are some ways to workaround this (discussed here), however, not all of them works, sorry!

Read More “Uploading MIME-conflicted ebooks and files to WordPress”

Removing some lines from .srt subtitle files

The .srt format seems to be most popular for storing subtitles for corresponding video files. It is very flexible (allowing you to define begin and end of displaying each phrase to the level of single frame).

One big disadvantage of this format is that it is indexed. Meaning that each following line has a consequential numbering. You cannot simply delete let’s say line number 511 (as you would do in case of .txt or other subtitle file formats), because you’d have to renumber manually all following lines. Which, in case of modern movies, can have up to 1000-2000 lines.

Thus, if you wish to get rid of some line or lines (i.e. sound-like sentence) you must either use some designated software that will do the auto-renumbering of the following lines (not covered in this article) or do this manually, keeping some tips in your mind.

Read More “Removing some lines from .srt subtitle files”

Quickly find shortcut-related commands in Word

The Ctrl+Alt+D keyboard shortcut in Word 2010, for inserting endnote, was pissing me off quite much. I wanted to un-assign or re-assign it. But I had a real trouble finding it among all keyboard shortcuts. Mostly, because Word sometimes is using totally misleading codenames for corresponding operations.

By an accident I found a quick workaround to this problem.

Read More “Quickly find shortcut-related commands in Word”

Restore not working Windows Spotlight

Windows Spotlight is a Windows 10 feature that displays you a beautiful images on your lock screen along with some location’s information and from time to time, some tips. On contrary to some users, I really like this feature and prefer to have different lock-screen image each day instead of the same dully picture.

When Windows Spotlight stops working there are several solutions in order to restore it.

If you’re lucky, the simplest one will give you expected results and you’re done in a matter of seconds. If you’re unlucky, you’ll end up messing up with Windows PowerShell, for which you need administrator privileges.

Read More “Restore not working Windows Spotlight”

My first Zoom.us experience

Current situation forces us to switch from face-to-face meetings into on-line experience. I was forced to lead my courses this way. Today I had first attempt and wanted to share some info on how it went.

I decided to use Zoom.us, because I had some previous a bit less positive experience with Microsoft Teams and quite very bad experience with Cisco Webex. And thus I wanted to try something else or different. Zoom.us was first that came on my list after removing Teams and Webex from this list. It was also very important to me that free version offers quite a lot and paid version isn’t that expensive at all.

If you’re new to on-line meetings topic then this article might be useful to you. If you have been using this kind of services previously or have otherwise experience in this area then you may not find much value here.

Read More “My first Zoom.us experience”

Using Yii2’s DetailView in a little bit more advanced way

The simplest and easiest way of rendering DetailView is to declare model and attributes list. This will renders each listed model’s attribute in a cool-looking, responsive table.

This article contains examples and solutions for going a little bit beyond that and using DetailView in a little bit more advanced way.

Read More “Using Yii2’s DetailView in a little bit more advanced way”