There many angles to do this and here is mine.
And call fps() after each update in your main loop.
First check where is your keyboard mounted:
cat /var/log/Xorg.0.log | grep keyboard
For me its something like (II) evdev: ROCCAT ROCCAT Ryos MK Glow: Configuring as keyboard
Next pipe the output to a file and after count the “words”;
In one terminal where 2 is i guess (II) from the cat above :
cat /dev/input/event2 ~/keyboard.txt
And count the keypresses with:
echo $(( $(cat ~/keyboard.txt | wc -c) / 96))
A complete Gui tool : WhatPulse
Installing mongodb 3+ on Ubuntu 15.04+ has a hidden problem when trying to start the service.
Because ubuntu stopped pre-installing “upstart-sysv” the mongo service is unable to start.
So install and reboot after that mongo will run normally.
sudo apt-get install upstart-sysv
Trying to learn to work with VIM and pressing escape is not the most easy to reach button. So most people bind CapsLock to ESC, because its not used 99.9999% of the time.
First get your current keyboard option settings:
dconf read /org/gnome/desktop/input-sources/xkb-options
['grp_led:scroll', 'numpad:microsoft', 'grp:win_space_toggle']
So we need to add ‘caps:escape’
Play a random video from your videos folder.
You can exclude TV shows from the list.