Archive for March, 2018

[manjaro] edit PKGBUILD and install a package

March 30, 2018 Leave a comment

You try to install a package with “yaourt pkg_name” but the installation fails. How to edit the PKGBUILD file manually and then install the package?


$ cd /tmp
$ yaourt -G pkg_name
$ cd pkg_name
# modify the file PKGBUILD with your favourite text editor
$ makepkg -i

Where “pkg_name” is the name of the package you want to install.

Categories: manjaro Tags: , ,

pretty print a C# source code

March 29, 2018 Leave a comment

I wanted to print the page at, but the produced PDF was black and white, i.e. the syntax highlighting was lost. How to print a source code with colors?

I tried several browsers, several editors, but nothing worked. Then I found a LaTeX solution. The necessary files and the produced PDF output are here:

I put here the LaTeX source:

%% Define your header here.
%% See
\fancyhead[CO,CE]{C\# Summary}

\usepackage[usenames,dvipsnames]{color}  %% Allow color names

%% The listings package will format your source code
  breaklines=true, %% Wrap long lines



The LaTeX tip is from here.

Categories: csharp, latex Tags:

[steam] get a game for a cheaper price

March 25, 2018 4 comments

You want to buy a game on Steam for a cheaper price. There are sales on Steam but you don’t want to check it every day.

There is a very simple way to get notified when the desired game becomes cheaper. Log in to Steam and add the game to your wishlist. I thought that the wishlist was just a simple list and never clicked on it but it’s more than that! When a game on your wishlist becomes cheaper, you get an e-mail notification. It’s that simple.

I wanted to build a web app. for this purpose :) Then I talked about it with a friend and he told me that the Steam wishlist can do that…

Categories: games Tags: ,

Xbox 360 controller not detected

March 16, 2018 Leave a comment

I have a wired Xbox 360 controller that stopped working. Windows 7 doesn’t recognise it and it appears as an “unknown device”.

I tried everything: uninstall and reinstall the driver; reinstall the USB drivers that I got on a DVD for the motherboard; plug it in another USB slot. Nothing. After 1.5 hours, I found the solution: the cord has an inline release and it was not entirely connected… Damn. But the good news is that it works again :)

Lesson learned: if you have a problem with the controller, first check the inline release.


Steam API

March 12, 2018 Leave a comment

Let’s take this game: Fallout: New Vegas. How to get data about it using the Steam API?


Unfortunately it doesn’t contain the overall review of the game (“very positive”, “overwhelmingly positive”, etc.).


Categories: games Tags: ,