Sunday, October 22, 2017

How to enable touchpad taps in Ubuntu 17.10

After installing a new version of Ubuntu 17.10 I've found that my touchpad doesn't work properly. It doesn't click when I tap. 

It took for a while to figure out that a new version switched from "xorg-synaptics" to "libinput". And for some interesting reasons "libinput" doesn't have tap to click enabled by default. So long story is short, here is a recipe to enable it:

1. Add following option to touchpad section in "/usr/share/X11/xorg.conf.d/40-libinput.conf"
   Option "Tapping" "true"
2. Reboot and enjoy your touchpad again.

Saturday, April 18, 2015

Connect ATmega328 with HC-05 (ZS-040) Bluetooth module

Parts list

  • ATMega328 (I use handy Arduino Nano);
  • HC-05 (ZS-040) Bluetooth module (EGBT-045MS);
  • 1K Ohm and 2K Ohm resistors;


HC-05 or ZS-040 Bluetooth module is based on EGBT-045MS chip and has following pins on board:
  • STATE - HIGH when module is connected;
  • RXD - data input pin;
  • TXD - data output pin;
  • GND - ground pin;
  • VCC - power input pin;
  • EN - Unknown pin. It should be connected to pin 34 of EGBT-045MS Bluetooth module, but it seems it doesn't work in preferred way;

Saturday, March 28, 2015

How to upgrade Django 1.6 to Django 1.7

  • Update django package:

    pip install -U Django
  • Remove 'south' from INSTALLED_APPS.
  • Delete all your (numbered) migration files, but not the directory or - make sure you remove the .pyc files too.
  • Run python makemigrations. Django should see the empty migration directories and make new initial migrations in the new format.
  • Run python migrate. Django will see that the tables for the initial migrations already exist and mark them as applied without running them. (Only matching table names are checked; not their full schema
  • it’s up to you to make sure the existing schema is up to date with your models!)
  • Uninstall south package:

    pip uninstall south
  • Update requirements.txt file:

    pip freeze > requirements.txt


I'm using a great Python hosting - Webfaction. So here is short notes how to upgrade existing deployed application to Django 1.7.

  • Create new application with Django 1.7
  • Copy project folder from old Django 1.6 application to new Django 1.7 application.
  • Modify httpd.conf accordingly with new folder structure.
  • Stop existing existing application with django 1.6.
  • Restart new django 1.7 application:

  • Remove django 1.6 from Websites-> -> Contents.
  • Add new django 1.7 app to Websites-> -> Contents.

Done. Check how it works.

PS: And don't forgot to update fabric deployment file accordingly.

Friday, March 20, 2015

How to set up and run unit tests in ClojureScript

This tutorial covers initial setup of a development environment to run unit tests in ClojureScript project.

Thursday, March 5, 2015

Vimium - Hacker's browser

Vimium is Google Chrome and Chromium extension, which brings Vim-like navigation to your browser. You can install it from Chrome Web Store or from a source code.