### Archive

Archive for December, 2015

## 2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.

Here's an excerpt:

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 140,000 times in 2015. If it were an exhibit at the Louvre Museum, it would take about 6 days for that many people to see it.

Categories: Uncategorized Tags: ,

## [manjaro] xbox 360 controller

Question
For Xmas I bought an Xbox 360 (wired) controller for me. It’s really good :) It works well under Windows but how to use it under Manjaro?

When I started Manjaro, the led on the central button (“ring of light”) was blinking and the controller didn’t work. I tried it with some games on Steam but nothing happened. Then I noticed that if I unplug and reconnect the controller, then it starts working :) Actually, the cord has an inline release and it’s simpler to disconnect and reconnect this inline release. After this the led stopped blinking and its second quadrant started to glow.

Now the controller worked with the games but I could also move the mouse pointer with the controller. It was disturbing in the games so I had to create the following file:

/etc/X11/xorg.conf.d/50-joystick.conf :

Section "InputClass"
Identifier "joystick catchall"
MatchIsJoystick "on"
MatchDevicePath "/dev/input/event*"
Driver "joystick"
Option "StartKeysEnabled" "False"       #Disable mouse
Option "StartMouseEnabled" "False"      #support
EndSection


Restart the machine and you are done. Some tutorials suggest the “xboxdrv” package but I didn’t need that. The kernel in Manjaro includes the “xpad” kernel module and it worked well for me.

There was another problem: while I was playing, after some time the screensaver kicked in. The “caffeine-ng” package solved this issue (see also this post).

Categories: games, manjaro Tags: , , ,

## [manjaro] spideroak icon missing on system tray

Problem
I also use SpiderOak (similar to Dropbox) and it starts automatically but it doesn’t appear on the system tray.

Solution
Launch it with some delay. I put the following script in the list of “Application Autostart”:

#!/usr/bin/env bash

sleep 30
/usr/bin/SpiderOakONE &


It did the trick.

Categories: manjaro Tags: , ,

## LaTeX: horizontal line

\newcommand\sep{\noindent\rule[0.5ex]{\linewidth}{1pt}}


Usage:

text

\sep

go on


## resize an .mkv file

Problem
I wanted to play a 720p .mkv file on an old laptop but it was painfully slow. How to reduce the quality of an .mkv file?

Solution
I found the solution here. The following worked for me:

\$ ffmpeg -i Movie.mkv -vf scale=-1:360 -c:v libx264 -crf 18 -preset veryslow -c:a copy MyMovie_360p.mkv


Visit the link above for an explanation of the parameters.

Categories: bash Tags: , , , ,

## open PDF at a given page

Problem
From the command line you want to open a PDF file at a given page.

Solution
My favourite PDF viewer was okular but I didn’t find this option. But evince supports it:

evince -p 200 ehh.pdf


Where “-p” means “page”.

Categories: bash Tags: , , ,

## battle test your server with siege

Warning! Use siege only on your sites since it can be interpreted as a DDOS attack.