IntelliJ use system proxy settings

  • Go to the IntelliJ installation folder and open the bin-directory
  • Add “-Djava.net.useSystemProxies=true” at the end of the idea64.vmoptions file (without 64 on a 32-bit system)
  • Restart IntelliJ and configure it to automatically configure proxy (Settings > Appearance & Behavior > System Settings > HTTP Proxy)

hwclock problems with dual boot

My English version of Windows 10 and Ubuntu 16.04 could not agree whether my hwclock is UTC or not. So booting either Window or Linux changed my hwclock and then the time in the other OS was wrong. So I changed my hwclock to UTC and told Windows and Linux that my clock is set to UTC:

Windows:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001

Linux:

Open the file (as superuser)

/etc/default/rcS

and add or change UTC=yes

Static IP-Configuration

In this example eth0 should get a static ip. This can be done by editing
/etc/network/interfaces:

allow-hotplug eth0
iface eth0 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    gateway 192.168.0.1
    dns-nameservers 192.168.0.1

This is the entry to configure gateway and dns-server.

Rotate Monitor under Linux

I have a pivot monitor and want to set it up correctly. First you get a list of your connected displays with the command

xrandr -q

This says something like

HDMI-0 connected 1920×1200+1920+0 (normal left inverted right x axis y axis) 593mm x 371mm
1920×1200     59.95*+  59.88
1920×1080     60.00    59.94    50.00    60.05    60.00    50.04
1680×1050     59.95
1600×1200     60.00
1440×900      59.89
1400×1050     59.98
1280×1024     75.02    60.02
1280×960      60.00
1280×720      60.00    59.94    50.00
1152×864      75.00
1024×768      75.03    70.07    60.00
800×600       75.00    72.19    60.32    56.25
720×576       50.00    50.08
720×480       59.94    60.05
640×480       75.00    72.81    59.94    59.93
480×576       50.00
480×480       59.94

And if you have more than one displays this is repeated with e.g. HDMI-1 if bot are connected via HDMI. For display port it says DP-0 and so on.

To rotate this display there are the the following commands:

# set to normal rotation again
xrandr --output HDMI-0 --rotate normal

# rotate 90° left
xrandr --output HDMI-0 --rotate left

# rotate 90° right
xrandr --output HDMI-0 --rotate right

 

Magento 2 always_populate_raw_post_data

Magento 2 complained that I should set always_populate_raw_post_data  to -1. Changing the php.ini didn’t help. The solution was to add

php_value always_populate_raw_post_data -1

to my VirtualHost (directly after the AllowOverride of the DocumentRoot-directory config).

Enterprise Architect 11/12 under Wine

To install EA under Linux with wine there are a few steps to take before it works and you are able to run EA plugins:

  • Install winetricks
  • Prepare a 32bit wine runtime with WINEARCH=win32 WINEPREFIX=~/.wine winecfg (just click ok in the dialog)
  • winetricks allfonts (this exited with an exit code on my machine, but this was no problem)
  • winetricks msxml3 mscml4 mdac28
  • winetricks dotnet40 corefonts (needed for plugins – not sure if corefonts is necessary)
  • After that you can install your .exe files with wine xyz.exe and .msi files with wine msiexec /i abc.msi

Infos taken from Sparx Systems and Wine.

Update gem behind proxy

I tried to update gem behind a proxy and got the following error message:

sudo gem update --system
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ETIMEDOUT: Connection timed out - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/specs.4.8.gz)

Though the http_proxy and https_proxy (also in upper case) was set it didn’t work.  Trying to set the proxy directly in the command did the trick:

sudo gem update --http-proxy=<the proxy> --system

Ubuntu 15.10 “error: symbol ‘grub_efi_find_last_device_path”

Updating to the latest grub version (at the moment 2.02~beta2-29ubuntu0.3) leads to “error: symbol ‘grub_efi_find_last_device_path’ not found” when I try to start Windows on my dual boot system having Ubuntu 15.10 next to Windows 10.

This can be fixed by downgrading to the version before the latest one in the ubuntu repository till this bug is fixed.

Here is how I downgraded my grub installation:

sudo apt-get install grub2-common=2.02~beta2-29ubuntu0.2 \
  grub-common=2.02~beta2-29ubuntu0.2 grub-efi-amd64=2.02~beta2-29ubuntu0.2 \
  grub-efi-amd64-bin=2.02~beta2-29ubuntu0.2

sudo apt-mark hold grub-common grub-efi-amd64-bin grub2-common grub-efi-amd64

Without the hold line apt would install the latest version on the next upgrade. As soon as the bug is fixed you can remove the hold mark with

sudo apt-mark install grub-common grub-efi-amd64-bin grub2-common grub-efi-amd64

Configure Redis-Cache in Magento 2

To use redis for caching in magento2 I added the following part in app/etc/env.php:

  'cache' => 
  array (
    'frontend' => 
    array (
      'default' => 
      array (
        'backend' => 'Cm_Cache_Backend_Redis',
        'backend_options' => 
        array (
          'server' => '127.0.0.1',
          'port' => '6379',
          'persistent' => '',
          'database' => '0',
          'force_standalone' => '0',
          'connect_retries' => '1',
          'read_timeout' => '10',
          'automatic_cleaning_factor' => '0',
          'compress_data' => '1',
          'compress_tags' => '1',
          'compress_threshold' => '20480',
          'compression_lib' => 'gzip',
        ),
      ),
      'page_cache' => 
      array (
        'backend' => 'Cm_Cache_Backend_Redis',
        'backend_options' => 
        array (
          'server' => '127.0.0.1',
          'port' => '6379',
          'persistent' => '',
          'database' => '1',
          'force_standalone' => '0',
          'connect_retries' => '1',
          'read_timeout' => '10',
          'automatic_cleaning_factor' => '0',
          'compress_data' => '0',
          'compress_tags' => '1',
          'compress_threshold' => '20480',
          'compression_lib' => 'gzip',
        ),
      ),
    ),
  ),