Category Archives: Configuration

enable cors (standard ee – glashfish)

Simply create the filter:

 public class RestResponseFilter implements ContainerResponseFilter{
     public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException{
         responseContext.getHeaders().putSingle("Access-Control-Allow-Origin", "*");
         responseContext.getHeaders().putSingle("Access-Control-Allow-Credentials", "true");
         responseContext.getHeaders().putSingle("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
         responseContext.getHeaders().putSingle("Access-Control-Allow-Headers", "Content-Type, Accept");


Visual Studio code settings

Install the following plugins:

  1. vscode-icons
  2. Netbeans keymaps
  3. Vue.js extension pack

Disable the following settings (search in settings):

  1. Explorer autoreveal

Disable line annotations:

File ->Settings->Extensions->GitLens: disable Current line blame annotations


Enable zoom via mouse:

  1. Ctrl+Shift+P (or View->Command Palette…)
  2. Type Open User Settings
  3. Edit settings.json
  4. Add “editor.mouseWheelZoom”: true
  5. Save it.

Windows 8/2012 dark configuration

Here is how you can configure Windows 8/2012 to use a dark task bar with white letters:

  1. Install uxstyle
  2. Download Windows 8.1 Update1 RTM Dark Aero archive (memext mirror link)
  3. Decompress to C:\Windows\Resources\Themes
  4. delete the archive
  5. Right click Desktop → Personalize
    1.  Select Aero Dark MK IV Theme
    2. Click Color
      1. Click “show color mixer”
      2. Configure color as desired
  6. Optionally install classicshell


Keep Total Commander in memory

Total Commander is without doubt my favorite and most used application in Windows.

With the following settings combination you can configure Total Commander so that it remains in memory at all times. When you close TC, it will remain on tray. If you launch it via any method (button, shortcut etc) it will be restored. By pinning it to the taskbar you can launch it with Windows key.

In order to exit TC you can:

  1. hold shift down and click on the X button
  2. right click on the tray icon and select close

To configure the settings below, do the following:

  1. go to menu bar → Configuration → Change settings file directly
  2. For each setting, search for it’s name. If it is found, update it’s value accordingly. Otherwise, add the setting.

For more settings, consult the official wincmd.ini settings page

Setting 1: Allow only one copy of TC (per user)

Menu: Configuration → Options → Operation



Setting 2: Move icon to system tray when minimized

Menu: Configuration → Options → Operation



Setting 3: Close to tray

Menu: Unknown (read more)

For both Alt+F4 and X button methods, setting:




Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

You have a Linux distribution with Xorg and you have configured the keyboard layout switcher to use alt+shift to switch between languages. But once you do that, keyboard shortcuts that use alt+shift+<key> combinations cannot be used. The same could happen if you have selected ctrl+shift as a shortcut to change language which disables all ctrl+shift+<key> combinations.

Continue reading Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

Enable CORS to Tomcat

CORS (CORS flowchart) is quite complex to understand but you absolutely need it if you want to write an app in “modern” javascript frameworks like angular.

The simplest way to enable CORS to Apache Tomcat for development is to:

  1. create web.xml (if it does not exist already)
  2. add the included filter. An example is shown below:


How to block viber ads on your PC

Here is a simple way to block viber ads:

  1. First use this post to find where your hosts file is.
  2. Edit the file as administrator and add the following lines: ads.*

Hint: You can use notepad++ to edit the file and it will automatically switch to administrator mode.

Clock messed up when dual booting

The problem:

  • Linux store the time on the hardware clock as UTC by default
  • Windows store the time on the hardware clock as the local time by default

Since both operating systems access the hardware clock you may encounter problems when you dual boot between them.

A comment for the geeks:

The advantage of having the hardware clock as UTC is that you don’t need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets. Continue reading Clock messed up when dual booting