monitor the CPU/memory usage of one single process

November 23, 2015 Leave a comment

I want to monitor a specific process. How much CPU does it use? How much memory does it eat?


$ top -p PID
# or
$ htop -p PID

The option “-p” stands for “pid’.

Tip from here.

Categories: bash Tags: , , , ,

convert a LibreOffice Calc/Excel stylesheet to .csv in command-line

November 21, 2015 Leave a comment

I have a stylesheet made with LibreOffice Calc / Excel. The extension of the file is .ods or .xls / .xlsx. How to convert it to .csv? From the command line, of course.

Convert an .ods file:

libreoffice --headless --convert-to csv file.ods

Convert an Excel file:

libreoffice --headless --convert-to csv file.xlsx

Tip from here.

If you use --convert-to html, then you get an HTML output.

Categories: bash Tags: , , ,

free Udemy courses

November 21, 2015 Leave a comment
Categories: Uncategorized Tags: , ,

VLC hotkeys that you must know

November 14, 2015 Leave a comment
a     - cycle aspect ratio (16:9, 4:3, etc.)
b     - cycle audio track
g, h  - adjust subtitle delay (down, up)
f     - fullscreen
space - pause

Full list here.

Categories: Uncategorized Tags: ,

always add a fucking abstract to your project

November 8, 2015 Leave a comment

When you write a scientific paper, you MUST add an abstract. Then comes an introduction, new results, and conclusion. Why is an abstract necessary? Because it sums up your work. If someone doesn’t want (or has no time) to read your whole paper, (s)he should be able to have an idea about your work just by reading the abstract. The abstract must describe clearly what this paper is about. Then the reader can decide: 1) “Hmm, sounds interesting, I’ll read it.”, or 2) “Ehh, who cares?”.

So, when you write a piece of code and you decide to share it with the world, then add an abstract! I’ve met so many projects that has no abstract and then I need to do my own research to figure out what it is, what it is good for, and why I would need it.

Let’s take a terrible example. Today I read about Babel.js and decided to visit the homepage to learn more about it. What kind of information can you find on the front page?

  • Babel is a JavaScript compiler
  • Babel transforms your JavaScript

That’s all! And there is a link to ES6 features. And from this someone should understand what it is for. Well, after this I still had no idea why I would need it. So I made a Google search and found a detailed blog post at that starts with this:

“Babel is a transpiler for JavaScript best known for its ability to turn ES6 (the next version of JavaScript) into code that runs in your browser (or on your server) today.” And then it shows an EXAMPLE. Babel converts this:

const input = [1, 2, 3];
console.log( => item + 1)); // [2, 3, 4]

into this:

var input = [1, 2, 3];
console.log( (item) {
  return item + 1;
})); // [2, 3, 4]

And now, 5 minutes later I know what it is for, but this info should have been on the FRONT PAGE of the project!

TL; DR: Just add a fucking abstract to your project. People will be grateful for that.

Categories: blog Tags: ,

position two windows next to each other

October 31, 2015 Leave a comment

Note: scroll down to Update #1 to see a built-in solution.

I’m playing with the Brackets text editor and it has a live preview feature, which means that as you edit an HTML code, you can see its effect immediately in the browser. You don’t need to save and refresh the browser to see every change. Pretty cool. So I wanted to tile my windows: Brackets on the left side, Firefox on the right side. How to do that?

Maybe there is a shortcut for this under Ubuntu, but under Manjaro I didn’t find it. But there is a cool project thet can do this for you called QuickTile (written in Python :)). Here is a great video tutorial on how to use it: .

In short
Install it and then you get a script called “quicktile“. Run it once and it generates a basic config file at “~/.config/quicktile.cfg“. I modified just one line in the config:

ModMask = <Control><Mod4>

Then start QuickTile in daemon mode: “quicktile -d“. Then you can place your windows by pressing Ctrl + left Super key (aka Windows key) + numbers on the number pad (on the right side). So for instance Ctrl + Super + 6 positions the current window to the right side.

To make it run after a reboot, put “quicktile -d” among your startup apps.



Update #1
Arrgh… Just when I finished this post, I found another video ( ), which shows that this feauture is available in newer XFCEs (from version 4.10). Open Settings Manager -> Windows Manager, and select the Keyboard tab. Scroll down to “Tile...” and you can assign hotkeys to the different positions.

Update #2
Under Ubuntu (using Unity) it works out of the box. The hotkey is Ctrl + Alt + numbers on the numeric pad.

Categories: manjaro Tags: , , live preview doesn’t work

October 31, 2015 Leave a comment

When using the text editor Brackets, the live preview feature doesn’t work under Manjaro.


sudo ln -s /usr/bin/google-chrome-stable /usr/bin/google-chrome

Tip from here.


Categories: manjaro Tags: ,

Get every new post delivered to your Inbox.

Join 85 other followers