Disable Touchpad Tapping in Kubuntu

In Ubuntu (gnome) there is an easy graphical way to disable tapping on the touchpad. However, KDE lacks such thing. But lacking graphical configuration doesn’t mean this should be difficult. All you need is the gsynaptics package. The package provides a small utility called synclient. Now you can disable tapping by doing

 synclient TapButton1=0

To disable the tapping permanently you should use the following to run the command at the start of every KDE session.

echo "synclient TapButton1=0" > ~/.kde/env/disable-tapping.sh

NVidia driver fails to initialize after X restart

This is mainly a note to myself. Sometimes when the X server is restart it complains that nvidia driver couldn’t be initialized and that no screens were found. This may be a result of a version mismatch between X11’s and the kernel’s nvidia module. The solution is to

modprobe -r nvidia

before restarting the X server.

Blocking IP Range using UFW

Uncomplicated Firewall (ufw) is one of the greatest frontends to IPTables I’ve encountered. It is very simple to use and I just wish it was also available for Gentoo. Up until recently everything went smoothly for me and ufw, but we hit some rough waters when I’ve tried to block an IP range.

To block an IP or IP range in ufw you should do

sudo ufw deny from 188.162.67.197/21

Continue reading Blocking IP Range using UFW

An Early Release of the New cssrtl.py-2.0

It has been three years since I’ve released the original version of cssrtl.py (and two since it’s re-release). The old version did a nice job, but experience gained during that time led me to write from scratch a new version. I’ve detailed more than a month ago, the basic principles and ideas that guided me to design a better tool to help adapting CSS files from left-to-right to right-to-left.

The guidelines weren’t just empty words, they were written while working on the Hebrew adaptation to the Fusion theme and in the same time writing a new proof-of-concept version of cssrtl.py. The original intent was to release a more mature version of that code when it will be completed. However, due to the apparent shortage of time in the present and foreseeable future, I can’t see myself complete the project any time soon. So following the “release early” mantra, I’ve decided to release the code as-is. As I said, the code is in working state, but not polished, so it may be of benefit but may contain bugs. If you find any bugs or have any suggestions, I would be glad to hear.
Continue reading An Early Release of the New cssrtl.py-2.0

Simple AI Engine for the Oware Game

Sometime ago I worked with a friend on building an Oware game. I was supposed to build the AI engine, and he was supposed to build the user interface to it. Unfortunately, while AI engine interface I designed and a simple alpha-beta pruning engine was implemented, the project was never completed.

Screenshot of game session
Screenshot of game session

Continue reading Simple AI Engine for the Oware Game

Simple Histogram Widget for wxWidgets

When working on Open Yahtzee 1.10 (or what ever I’ll call the version after 1.9), I’ve written a simple histogram widget to be part of the new statistics dialog. I should emphasize the simple part, this widget was mean to display a simple histogram without requiring any special bloated ploting libraries. It doesn’t support all the fancy stuff, just plain histogram.

I’ve figured that a simple pie plot would better serve Open Yahtzee’s needs, so unfortunately this code will not be released as part of the program. While the code is not perfect, it’s functional and serves a good example of a custom widget. So I’ve felt pity letting it fall into oblivion in Open Yahtzee’s SVN repository, and I’ve thought it might come handy to someone else (or at least for me) if it will be easily accessible.

simple_histogram
Continue reading Simple Histogram Widget for wxWidgets