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.