Category Archives: Configuration

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:

Onlyonce=1

Setting 2: Move icon to system tray when minimized

Menu: Configuration → Options → Operation

Setting:

TrayIcon=1

Setting 3: Close to tray

Menu: Unknown (read more)

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

MinimizeOnClose=3

 

 

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:
<filter>
  <filter-name>CorsFilter</filter-name>
  <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
  <init-param>
    <param-name>cors.allowed.origins</param-name>
    <param-value>*</param-value>
  </init-param>
  <init-param>
    <param-name>cors.allowed.methods</param-name>
    <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
  </init-param>
  <init-param>
    <param-name>cors.allowed.headers</param-name>
    <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
  </init-param>
  <init-param>
    <param-name>cors.exposed.headers</param-name>
    <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
  </init-param>
  <init-param>
    <param-name>cors.support.credentials</param-name>
    <param-value>true</param-value>
  </init-param>
  <init-param>
    <param-name>cors.preflight.maxage</param-name>
    <param-value>10</param-value>
  </init-param>
</filter>
<filter-mapping>
  <filter-name>CorsFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

 

References:

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