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;

Schema

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 init.py - make sure you remove the .pyc files too.
  • Run python manage.py makemigrations. Django should see the empty migration directories and make new initial migrations in the new format.
  • Run python manage.py 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
    

Webfaction

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:

    ~/webapps/django_17/apache2/bin/restart
    
  • Remove django 1.6 from Websites-> yourdomain.com -> Contents.
  • Add new django 1.7 app to Websites-> yourdomain.com -> 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.

Friday, February 13, 2015

Countries list in JSON format

In my previous post I shared the list of US State, but in comments followers asked about the list of countries. So here is the list of 252 countries with ISO codes as abbreviation in JSON format:

Monday, February 9, 2015

US States in JSON format

I couldn't find a list of US State abbreviations and names that I could quickly use in Javascript. So I combined the list in JSON format for your convenient. You can use it as you wish.

Personal organizer with vimwiki

vim text editor logo

Emacs users enjoy org-mode as super organizer of personal notes, documentation, diary, tasks list and many other things. And I wanted the same features for Vim and recently I found it. Welcome vimwiki as your personal organizer. Here is the list of features, what you can do with vimwiki plugin:
  • Organize notes in multiple wiki files.
  • Link your ideas/notes with quick wiki links.
  • Manage to-do lists.
  • Write documentation with rich formatting.
  • Use tables to organize data.
  • Memorize events in diary.
  • Generate HTML from wiki files.
  • Multiple wiki support.

Tuesday, July 1, 2014

How to Install Arch Linux on Asus Chromebox

Asus Chromebox

I decided to write down the instruction how to install Arch Linux on Asus Chromebox. I replaced my Raspberry Pi with Asus Chromebox as TV media box recently and such instruction will be useful in the case if I want to repeat installation.
I just want to warn - it does not create dual boot with ChromeOS and it just replaces ChromeOS with Arch Linux. I’m fine with such result, because I don’t need ChromeOS on my TV. XMBC is my choice for a TV media box.

Monday, April 7, 2014

How to enable I2C (IIC) in Raspberry Pi

The simple instruction for enabling I2C interface in Raspberry Pi (Rasbian).

Tuesday, February 11, 2014

Coursera courses

At the beginning of February I've been enrolled for two courses:
The both of courses are fundamental for areas where my interest  is high. Lets see how I will accomplish that, because the previous attempts were no so good for me, so many distractions didn't allow me to finish them in 2013 year. I hope I will be motivated enough for the next 6 weeks.

Sunday, July 15, 2012

Links dump for July 15, 2012

Saturday, May 5, 2012

Python development environment for Ubuntu 12.04 Precise

Frankly, my upgrade for the newest release of Ubuntu 12.04 Precise broke my OS. And I didn't have any chance to recover it. So I just reinstalled Ubuntu and got fresh, but empty operation system. The last time when I did setup of Python development environment was one year ago. All my notes about this things were old and unsuitable for the latest Ubuntu release. This post is summary of my actions to setup Python development environment from scratch.
Install Python setuptools package:
sudo apt-get install python-setuptools python-pip
Install virtualenvwrapper:
sudo pip install virtualenvwrapper
Setup virtualenvwrapper:
mkdir -p ~/.virtualenvs
echo 'export WORKON_HOME=~/.virtualenvs' >> ~/.bashrc
echo 'export DJANGO_SITES_ROOT=$HOME/projects/' >> ~/.bashrc
echo 'source /usr/local/bin/virtualenvwrapper.sh' >> ~/.bashrc
source ~/.bashrc
Install Django extension for virtualenvwrapper. I have several Django projects, but if you aren't using Django, then you can skip this step:
sudo apt-get install git-core
mkdir -p ~/.virtualenvs/django-libs
cd ~/.virtualenvs/django-libs
git clone https://github.com/epicserve/django-environment.git
cd ~/.virtualenvs/django-libs/django-environment/django_env/bin/
install.py
Test virtualenvwrapper:
cd ~/projects
mkvirtualenv example
cd example && ls
Install PIL with JPEG, ZLib and FreeType support, if you aren't using PIL, then you can skip this step:
sudo apt-get install libjpeg62-dev zlib1g-dev libfreetype6-dev
cd ~/.virtualenvs/{project-name}
For 32-bit systems:
ln -s /usr/lib/i386-linux-gnu/libz.so ./lib/
ln -s /usr/lib/i386-linux-gnu/libjpeg.so ./lib/
ln -s /usr/lib/i386-linux-gnu/libfreetype.so ./lib/
For 64-bit systems:
ln -s /usr/lib/x86_64-linux-gnu/libz.so ./lib/
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so ./lib/
ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so ./lib/

pip install PIL
I'm big fan of Vim, so here is steps for Vim also:
sudo apt-get install vim.gtk
Install Pathogen plugin:
mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -so ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
add to ~/.vimrc file:
call pathogen#infect()
Install Fugitive for Git support and Python-mode for all Python stuff in Vim:
cd ~/.vim/bundle
git clone git://github.com/tpope/vim-fugitive.git
git clone git://github.com/klen/python-mode.git
Install super-fast Command-T plugin for opening files in Vim:
cd ~/.vim/bundle
git clone git://git.wincent.com/command-t.git
cd ~/.vim/bundle/command-t
rake make
That's all folks. I will keep this post updated for a while.
And If you have any comments and suggestions, please, post them in comments. Thanks.

Monday, February 13, 2012

Онлайн курсы

Стэнфордские онлайн курсы 

  • http://www.cs101-class.org/ - Базовый курс Computer Science (базовые алгоритмы и понятия)
  • http://www.infotheory-class.org/ - Теория информации (алгоритмы и структуры данных для хранения, сжатия и передачи информации)
  • http://www.modelthinker-class.org/ - Теория моделирования (создание и управление моделями данных)
  • http://jan2012.ml-class.org/ - Теория машинного обучения (самообучаемые алгоритмы)
  • http://www.saas-class.org/ - Программное обеспечение как сервис (теория и практика построения SaaS)
  • http://www.hci-class.org/ - Теория взаимодействия человека с компьютером (проектирование пользовательских интерфейсов, юзабилити)
  • http://www.nlp-class.org/ - Обработка текста натуральных языков (лексический, семантический и синтаксический анализ текста)
  • http://www.game-theory-class.org/ - Теория игр (статистика, вероятности, стратегии, стохастический анализ)
  • http://www.pgm-class.org/ - Графическое моделирование (цепи Маркова, Байесовские сети, пересекается с Теорией машинного обучения)
  • http://www.crypto-class.org/ - Криптография (различные алгоритмы шифрования)
  • http://www.algo-class.org/ - Проектирование и анализ алгоритмов (фундаментальные понятия для проектирования алгоритмов, сортировка, поиск и т.д.)
  • http://www.security-class.org/ - Базовый курс компьютерной безопасности (проектирование и анализ систем безопасности для программ)
  • http://www.vision-class.org/ - Компьютерное видение (алгоритмы обработки изображений и видеопотока)


MIT онлайн курсы



Другие

Thursday, January 12, 2012

Light gray color schema for VIM

I got bored with default dark desert color schema in VIM. So I decided to get some light gray color schema in Internet, but I didn't find any usable for me schema. Only "Peak Sea Color" schema was near of my wishes. And after several attempts of adopting this schema, I got the color schema which is satisfied me a lot. I made changes only for light background case. May be somebody will be interesting with this color schema. You can get this color schema from my GitHub repository - https://github.com/andreybratukhin/peakseacolor. Enjoy.


To enable the scheme, you need put the peaksea.vim in your $HOME/.vim/colors/ (or %HOME%\vimfiles\colors for Windows) and put in ~/.vimrc the following:

if !has("gui_running")
    set t_Co=256
endif
set background=light

colorschema peaksea


UPDATE: I found very useful website, where you can create custom color schema for VIM - http://www.bilalquadri.com/villustrator/.

Monday, March 28, 2011

AspectJ training

On previous week I held yet another training for our developers in Donetsk's office of Exadel. And I want to thank of Dmitry Chidzikov (Дмитрий Чижиков) for slides that he presented on February meet of Coffe'n'Code. I've used some of slides of Dmitry in my training's presentation. Thanks a lot.
See above my slides.
Aspect-Oriented Programming

Friday, February 4, 2011

Part 1 - JBoss Seam and component model

Это слайды к тренингу по JBoss Seam, который я провел на этой неделе.

Sunday, September 5, 2010

GNU Emacs Starter Kit

I have tried several text editors before - vim, Kate, notepad++ and some others. But I didn't find the editor, that had such power as Emacs. GNU Emacs is the extensible, customizable, self-documented and cross-platformed text editor. Emacs text editor are most popular with software developers, just like me. And I found some fun and cool features in this editor for me.

But Emacs is annoying for the first blush. To improve that situation I have installed Emacs Starter Kit. The main killing feature of Starter Kit is the package installer. Also you can find useful predefined key bindings and packages. All is ready out of box.

Official Site of GNU Emacs - http://www.gnu.org/software/emacs/

Instruction for installing Emacs Starter Kit - http://github.com/technomancy/emacs-starter-kit