Onedrive client – Xubuntu


sudo apt-get install -y onedrive

Run onedrive and follow the configuration wizard.

Add the command onedrive -m to Autostart applications

Advertisements

Building angular app with source map fail with “CALL_AND_RETRY_LAST Allocation failed – JavaScript heap out of memory”

I’m building an Angular app with this command:

ng build --prod --configuration=prod --source-map

The versions of Angular and other packages were:

tanguy@tanguy-Aspire-E5-575G:~/Projects/Piximate/web$ ng version

Angular CLI: 6.1.2
Node: 8.10.0
OS: linux x64
Angular: 6.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.7.2
@angular-devkit/build-angular 0.7.2
@angular-devkit/build-optimizer 0.7.2
@angular-devkit/build-webpack 0.7.2
@angular-devkit/core 0.7.2
@angular-devkit/schematics 0.7.2
@angular/cdk 6.4.2
@angular/cli 6.1.2
@angular/material 6.4.2
@ngtools/webpack 6.1.2
@schematics/angular 0.7.2
@schematics/update 0.7.2
rxjs 6.2.2
typescript 2.9.2
webpack 4.9.2

There is a Github thread about this issue: https://github.com/angular/angular-cli/issues/5618
But it has never been resolved. However it contains some potential solutions.

What finally worked for me is the solution proposed in this comment: Increase the max size of Node.js for the command by running this:

node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --prod --configuration=staging --source-map

To make my life easier, I created an alias for this command in my package.json

 

// package.json

"scripts": {
  "ng-high-mem": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng",
  "build:prod": "npm run ng-high-mem -- build --prod --configuration=prod --source-map",
  ...
}

Note the double dash “–” before passing the arguments of the build. This is needed to ensure theses arguments are not swallowed by npm run and make sure they are passed to ng-high-mem

So I can build successfully with

npm run build:staging

 

Xubuntu – Logitech MX Master 2S keymap

Custom keymap for Logitech MX Master 2S mouse on Xubuntu 16.04.

First, install Solaar to see the battery level on the taskbar

sudo apt-get install solaar

 

To remap the keys, install

sudo aptitude install xbindkeys xautomation

Then, launch xev to get the keyboard or mouse event to bind

xev

Create the configuration file for xbindkeys

nano ~/.xbindkeysrc

Here is an exemple of this file that map the Back and Forward buttons to BackSpace and Return respectively

# Back button => BackSpace
"xte 'keydown BackSpace'"
 b:8

"xte 'keyup BackSpace'"
 b:8 + Release

# Forward button => Enter
"xte 'keydown Return'"
 b:9

"xte 'keyup Return'"
 b:9 + Release

To test your binding

xbindkeys -v

To start xbindkeys

xbindkeys

it should autostart automatically