<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1156652312374518175</id><updated>2012-02-10T16:58:31.517+07:00</updated><category term='apache'/><category term='table'/><category term='jQuery'/><category term='javascript'/><category term='mysql'/><category term='php'/><category term='sqlite'/><category term='flash-player'/><category term='mac os x'/><category term='GAE'/><category term='auth'/><category term='bash'/><category term='django'/><category term='oracle'/><category term='netbeans'/><category term='firefox'/><category term='{less}'/><category term='inheritance'/><category term='xcode'/><category term='blogger'/><category term='PostgreSQL'/><category term='filesystem'/><category term='css'/><category term='git'/><category term='plugin'/><category term='python'/><category term='bookmarklet'/><category term='extension'/><category term='html'/><category term='xpath'/><category term='script'/><category term='windows'/><category term='vim'/><category term='ubuntu'/><category term='mercurial'/><title type='text'>Developer's notes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.boris.co/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.boris.co/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2505505967149633348</id><published>2012-02-10T16:58:00.003+07:00</published><updated>2012-02-10T16:58:31.532+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='{less}'/><title type='text'>{less} mix function error</title><summary type='text'>Documentation tells mix function takes only two parameters, @color1 and @color2. Actually there is a mistake. The correct function definition is


mix(@color1, @color2, value)

, where value denotes how much of @color1 should appear in the result color.
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2505505967149633348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/02/less-mix-function-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2505505967149633348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2505505967149633348'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/02/less-mix-function-error.html' title='{less} mix function error'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8792276606543546095</id><published>2012-02-07T13:23:00.000+07:00</published><updated>2012-02-07T13:23:07.464+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>Trap Ctrl C in Bash</title><summary type='text'>#!/bin/bash

# call trapped in case Ctrl+C pressed
trap trapped INT

function trapped() {
    echo "CTRL-C pressed"
}

while true; do
    sleep 1
    echo -n "."
done
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8792276606543546095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/02/trap-ctrl-c-in-bash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8792276606543546095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8792276606543546095'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/02/trap-ctrl-c-in-bash.html' title='Trap Ctrl C in Bash'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3964247685620624848</id><published>2012-02-03T23:25:00.001+07:00</published><updated>2012-02-03T23:25:47.921+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Setup Apache2's mod_wsgi on Ubuntu</title><summary type='text'>If you get this when restarting Apache2 on Ubuntu
Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.it means you don't have mod_wsgi module installed.

These commands install and enable it.
sudo apt-get install libapache2-mod-wsgi
sudo a2enmod mod-wsgi
sudo /etc/init.d/apache2 restart
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3964247685620624848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/02/setup-apache2s-modwsgi-on-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3964247685620624848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3964247685620624848'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/02/setup-apache2s-modwsgi-on-ubuntu.html' title='Setup Apache2&apos;s mod_wsgi on Ubuntu'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-5216342247941630782</id><published>2012-02-03T21:56:00.000+07:00</published><updated>2012-02-03T21:56:45.898+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Perl warning about locale in Ubuntu</title><summary type='text'>If you get this warning
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = (unset),
 LC_ALL = (unset),
 LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
it can be fixed with
locale-gen en_US.UTF-8
dpkg-reconfigure locales</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/5216342247941630782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/02/perl-warning-about-locale-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5216342247941630782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5216342247941630782'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/02/perl-warning-about-locale-in-ubuntu.html' title='Perl warning about locale in Ubuntu'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8788356425576214999</id><published>2012-02-03T19:23:00.000+07:00</published><updated>2012-02-03T19:41:30.307+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Get Graphite run for a Django project</title><summary type='text'>This post is intended first of all to memorize my experience of getting the Graphite system work.




Graphite system

Graphite is designed to install itself in /opt/graphite. There is no way to change it without getting a pain in the ass. I chose to install it in Ubuntu in VM without touching my system. Here we go to install Graphite.

Getting sources
mkdir -p ~/tmp/graphite-install/
cd ~/tmp/</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8788356425576214999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/02/get-graphite-run-for-django-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8788356425576214999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8788356425576214999'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/02/get-graphite-run-for-django-project.html' title='Get Graphite run for a Django project'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3471820503446227406</id><published>2012-02-01T14:52:00.000+07:00</published><updated>2012-02-01T14:52:25.541+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac os x'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Install RabbitMQ</title><summary type='text'>install server itself (using port)

MacOs X:
sudo port install rabbitmq-server
Ubuntu:
sudo apt-get install rabbitmq-server
create user, vhost and set some permissions:
rabbitmqctl add_user username password
rabbitmqctl add_vhost /vhost
rabbitmqctl set_permissions -p /vhost username ".*" ".*" ".*"
done.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3471820503446227406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/02/install-rabbitmq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3471820503446227406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3471820503446227406'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/02/install-rabbitmq.html' title='Install RabbitMQ'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1269655319099663407</id><published>2012-02-01T14:46:00.000+07:00</published><updated>2012-02-01T14:47:00.478+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>OSError: [Errno 38] Function not implemented</title><summary type='text'>Server: Ubuntu 11.04

Run celeryd with info log level

$ ./manage.py celeryd -l info
[2012-02-01 01:16:45,779: ERROR/MainProcess] Unrecoverable error: OSError(38, 'Function not implemented')
Traceback (most recent call last):
  File "/var/www/th4x/.env/lib/python2.7/site-packages/celery/worker/__init__.py", line 268, in start
    component.start()
  File "/var/www/th4x/.env/lib/python2.7/</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1269655319099663407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/02/server-ubuntu-11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1269655319099663407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1269655319099663407'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/02/server-ubuntu-11.html' title='OSError: [Errno 38] Function not implemented'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-52160428894145609</id><published>2012-01-16T15:27:00.001+07:00</published><updated>2012-01-16T15:30:19.486+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac os x'/><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><title type='text'>PostgreSQL autostart on Mac OS X</title><summary type='text'>I installed PostgreSQL 9.0 from „One Click Installer” and didn't want it to launch as system starts.



As PostgreSQL has been installed launchctl takes responsibility to take care of always running PostgreSQL daemon. /Library/LaunchDaemons/com.edb.launchd.postgresql-9.0.plist file sets up the daemon's behavior.


There are two options that can prevent the daemon after start up.
&lt;key&gt;Disabled&lt;/</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/52160428894145609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/01/postgresql-autostart-on-mac-os-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/52160428894145609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/52160428894145609'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/01/postgresql-autostart-on-mac-os-x.html' title='PostgreSQL autostart on Mac OS X'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-6878183505361863356</id><published>2012-01-04T12:48:00.000+07:00</published><updated>2012-02-07T13:23:46.949+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>Tab-completion for django-admin.py and manage.py</title><summary type='text'>Download django_bash_completion file and save in some convenient place in your system. In .bash_profile (or .bashrc if it doesn't envoke .bash_profile) add
. ~/path/to/django_bash_completion
Settings will take effect the next time you log in.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/6878183505361863356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2012/01/tab-completion-for-django-adminpy-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6878183505361863356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6878183505361863356'/><link rel='alternate' type='text/html' href='http://www.boris.co/2012/01/tab-completion-for-django-adminpy-and.html' title='Tab-completion for django-admin.py and manage.py'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4805216579977530747</id><published>2011-12-27T18:34:00.000+07:00</published><updated>2012-01-18T10:07:11.225+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='table'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Autoselection of checkboxes in a table</title><summary type='text'>The code doing selection

(function() {
    var toggleSelect = $("#toggle_select"),
        checkboxes = $("#table tbody input[type=checkbox]");
    toggleSelect.click(function() {
        checkboxes.attr('checked', $(this).is(":checked"));
    });
    checkboxes.click(function() {
        toggleSelect.attr('checked', checkboxes.length === checkboxes.filter(':checked').length);
    })
})()


A </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4805216579977530747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/12/autoselection-of-checkboxes-in-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4805216579977530747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4805216579977530747'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/12/autoselection-of-checkboxes-in-table.html' title='Autoselection of checkboxes in a table'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2290643307333139633</id><published>2011-12-06T16:35:00.000+07:00</published><updated>2012-01-18T10:07:11.178+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Activate VE from Django's manage.py</title><summary type='text'>To transparently activate virtual environment from project's manage.py insert the code below right after #!/usr/bin/env python


activate_this = '/ABSOLUTE/PATH/TO/ENVIRONMENT/FILES/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2290643307333139633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/12/activate-ve-from-djangos-managepy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2290643307333139633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2290643307333139633'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/12/activate-ve-from-djangos-managepy.html' title='Activate VE from Django&apos;s manage.py'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-6785013616851546670</id><published>2011-10-20T12:15:00.000+07:00</published><updated>2012-01-18T10:07:11.250+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Madly follow PEP8 with git help</title><summary type='text'>If you intended or are obliged to strictly comply to PEP8 it may be useful to have a git hook that takes care of checking your code before you have committed and prevents you from amending previous commit again and again.

So, in .git/hooks/ directory of your repository create a file with name pre-commit and put

#!/bin/sh

# comma-separated list of files and directories which are not for </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/6785013616851546670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/10/madly-follow-pep8-with-git-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6785013616851546670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6785013616851546670'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/10/madly-follow-pep8-with-git-help.html' title='Madly follow PEP8 with git help'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3549874104782510935</id><published>2011-10-15T15:13:00.000+07:00</published><updated>2012-01-18T10:07:11.199+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarklet'/><title type='text'>Word and text translation bookmarklet</title><summary type='text'>Sometimes (I hope rarer and rarer :)) I need to translate an unknown foreign word on the page. I used to select it, open Google Dictionary Translate, paste it, set source and destination languages if needs and only then press the button to translate it.

Some time later I discovered bookmarklets. I liked the approach and made one for myself.

Drag this link En&lt;&gt;Ru the bookmark panel to be able </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3549874104782510935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/word-translator-bookmarklet.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3549874104782510935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3549874104782510935'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/word-translator-bookmarklet.html' title='Word and text translation bookmarklet'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-7619832231819004425</id><published>2011-10-14T11:53:00.000+07:00</published><updated>2012-01-18T10:07:11.274+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac os x'/><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><title type='text'>Uninstall XCode</title><summary type='text'>To uninstall XCode from Mac OS X run in terminal:
sudo /Developer/Library/uninstall-devtools –mode=all</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/7619832231819004425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/10/uninstall-xcode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7619832231819004425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7619832231819004425'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/10/uninstall-xcode.html' title='Uninstall XCode'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4801343009962598346</id><published>2011-10-12T10:32:00.000+07:00</published><updated>2012-01-18T10:07:11.220+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac os x'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Upgrading Mac OS X to Lion and dealing with virtualenv</title><summary type='text'>I happened to have successfully upgraded my Snow Leopard to Lion. It looks nicer, softer and so forth. But I depend on my MacBook Pro in my work and have to have everything working.

Actually after upgrade everything were broken: python did not work properly, system paths were set in their defaults. So it was absolute mess.

First, as I learned it from Snow Leopard, I have downloaded new XCode </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4801343009962598346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/10/upgrading-mac-os-x-to-lion-and-dealing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4801343009962598346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4801343009962598346'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/10/upgrading-mac-os-x-to-lion-and-dealing.html' title='Upgrading Mac OS X to Lion and dealing with virtualenv'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8370356725068652382</id><published>2011-10-06T23:38:00.000+07:00</published><updated>2012-01-18T10:07:11.286+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>CKEditor autosave plugin</title><summary type='text'>If you need autosave function for the CKEditor I made a plugin. It allows to save automatically the work as you've stopped typing.

UPD  Oct 6, 2011: Plugin has moved to GitHub.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8370356725068652382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/04/ckeditor-autosave-plugin.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8370356725068652382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8370356725068652382'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/04/ckeditor-autosave-plugin.html' title='CKEditor autosave plugin'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3143381065437712021</id><published>2011-08-15T16:40:00.000+07:00</published><updated>2012-02-07T13:23:46.940+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>Avoid command repeating in Bash</title><summary type='text'>If you are already done with mess of the same commands in bash history, just put that in your ~/.bashrc


export HISTCONTROL=ignoredups:erasedups


ignoredups prevents the history from duplicates
erasedups if a command is already in the list it will be removed at the old position and put in the beginning of the history list</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3143381065437712021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/08/avoid-command-repeating-in-bash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3143381065437712021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3143381065437712021'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/08/avoid-command-repeating-in-bash.html' title='Avoid command repeating in Bash'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3303418017646560082</id><published>2011-08-03T18:50:00.000+07:00</published><updated>2012-01-18T10:07:11.194+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='auth'/><title type='text'>Clients of the webservice</title><summary type='text'>Some time ago my iPhone happened to get lost. There were many clients of well known services installed and all of them had been logged in and most part of them had their passwords saved. To prevent access from my lost phone I had to change password for almost all services I used.

Clients should avoid using re-authentication with login and password. It implies saving them on the client side. </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3303418017646560082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/08/clients-of-webservice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3303418017646560082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3303418017646560082'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/08/clients-of-webservice.html' title='Clients of the webservice'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-435736305671974331</id><published>2011-06-30T16:02:00.000+07:00</published><updated>2012-01-18T10:07:11.210+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Yesterday date</title><summary type='text'>$yesterday = date('Y-m-d', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")))

UPD: (thanks to stamm)
$yesterday = date('Y-m-d', strtotime('- 1 day')); </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/435736305671974331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/09/yesterday-date.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/435736305671974331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/435736305671974331'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/09/yesterday-date.html' title='Yesterday date'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8488336096949037886</id><published>2011-06-28T14:15:00.000+07:00</published><updated>2012-01-18T10:07:11.292+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Kwargs in Python</title><summary type='text'>Recently I noticed that function cannot accept unicode strings as parameter names given in kwargs. They must be converted to strings.

I made a sample script
import sys

print "Version: %d.%d.%d\n" % sys.version_info[:3]

string_params = {'a':1, 'b': 2}
unicode_params = {u'a':1, u'b': 2}

def f(a,b):
 print "params: ", a, b

print "Run with string params:"
f(**string_params)

print "\nRun with </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8488336096949037886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/06/kwargs-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8488336096949037886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8488336096949037886'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/06/kwargs-in-python.html' title='Kwargs in Python'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4332125428056867110</id><published>2011-06-28T11:09:00.000+07:00</published><updated>2012-01-18T10:07:11.204+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><title type='text'>Disable Firefox cache for developing</title><summary type='text'>To disable caches while you're developing and testing in Firefox:
Type about:config in FF address bar;
Set to false the following params:
network.http.use-cache
browser.cache.offline.enable
browser.cache.disk.enable

browser.cache.disk_cache_ssl

browser.cache.memory.enable
Beware, it totally disables cache in FF!</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4332125428056867110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/06/disable-firefox-cache-for-developing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4332125428056867110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4332125428056867110'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/06/disable-firefox-cache-for-developing.html' title='Disable Firefox cache for developing'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-713037657431198772</id><published>2011-06-27T18:03:00.000+07:00</published><updated>2012-01-18T10:07:11.263+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Make string html-safe</title><summary type='text'>To make a string HTML-safe (convert &amp; to &amp;amp;, &gt; to &amp;gt; and so forth):

&gt;&gt;&gt; import cgi
&gt;&gt;&gt;
&gt;&gt;&gt; test_string = "This is &lt;unsafe&gt; string &amp; it contains wrong symbols"
&gt;&gt;&gt;
&gt;&gt;&gt; print cgi.escape(test_string)
This is &amp;lt;unsafe&amp;gt; string &amp;amp; it contains wrong symbols
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/713037657431198772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/06/make-string-html-safe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/713037657431198772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/713037657431198772'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/06/make-string-html-safe.html' title='Make string html-safe'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4812602916179925365</id><published>2011-06-22T12:49:00.000+07:00</published><updated>2012-01-18T10:07:11.232+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>Run Django via WSGI without web server</title><summary type='text'>Recently I faced a problem - I needed to test updated Django WSGI-runner script. But I didn't have a web server on my computer. And I didn't want to install it. So, how to deal with that?

I found out about Werkzeug. It was supposed to solve my issue. To install it run system-wide
sudo pip install werkzeugI made a runner script run.py that makes a dev server with Werkzeug and voila:

run.py
from </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4812602916179925365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/06/run-django-via-wsgi-without-web-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4812602916179925365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4812602916179925365'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/06/run-django-via-wsgi-without-web-server.html' title='Run Django via WSGI without web server'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8263018605159679351</id><published>2011-05-27T10:39:00.000+07:00</published><updated>2012-01-16T15:30:19.552+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><title type='text'>Adding a new user</title><summary type='text'>To create a new Postgres user.
First, create a new Linux user:
sudo useradd -M -N username # (do not create hoMe dir; do not add to group "userName")
sudo passwd username # enter password 'username'
And add user with the same name to Postgres:
psql -h 127.0.0.1 -p 5432 -U username -W -d template1 # insert your hostname and port if different In psql:
CREATE USER username WITH PASSWORD 'username';
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8263018605159679351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/05/adding-new-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8263018605159679351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8263018605159679351'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/05/adding-new-user.html' title='Adding a new user'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-985713051282842225</id><published>2011-04-11T12:51:00.000+07:00</published><updated>2012-02-07T13:23:46.962+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>How to satisfy dependencies for your python projects</title><summary type='text'>You need a text file in your project with your dependencies, i.e. REQUIREMENTS, with a list of packages your project depends on.

PIP's requirement file format (detailed):
&lt;package-name&gt;[==&lt;version&gt;]
-e &lt;repository address&gt;#egg=&lt;desirable-package-name&gt;
And when you need to init the project in a new place you'd like to run:
# init or activate a virtual environment
(virtual-env)$ pip install -r </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/985713051282842225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/04/how-to-satisfy-dependencies-for-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/985713051282842225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/985713051282842225'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/04/how-to-satisfy-dependencies-for-your.html' title='How to satisfy dependencies for your python projects'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-7293069104074591746</id><published>2011-04-07T17:22:00.001+07:00</published><updated>2012-02-07T13:23:46.954+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Python's virtual environment</title><summary type='text'>You probably would like to use separate sets of packages for your projects and whilst not to spoil your system's environment. This problem can be solved by using virtual environments.

Make initial setup:

install pip and virtualenv:sudo easy_install pip virtualenv
install virtualenvwrapper:sudo pip install virtualenvwrapper

To configure virtualenvwrapper:

Create a directory for the virtual </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/7293069104074591746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/04/pythons-virtual-environment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7293069104074591746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7293069104074591746'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/04/pythons-virtual-environment.html' title='Python&apos;s virtual environment'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2826311636692024138</id><published>2011-04-02T00:29:00.000+07:00</published><updated>2012-02-07T13:23:46.935+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Big brother is watching you</title><summary type='text'>Do you doubt whether Google knows about your Wi-Fi router location? Try this on your *nix-machine:

iwlist wlan0 scan | sed -n 's/.* Address: //p;T;s/ //g;q' | sed 's/.*/{version:1.1.0,host:maps.google.com,request_address:true,address_language:'${LANG/.*/}',wifi_towers:[{mac_address:"&amp;",signal_strength:8,age:0}]}/' | curl -sX POST -d @- www.google.com/loc/json | sed -e 'h;s/.*latitude":\([^,]*\).</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2826311636692024138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/04/big-brother-is-watching-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2826311636692024138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2826311636692024138'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/04/big-brother-is-watching-you.html' title='Big brother is watching you'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-6370936973417057017</id><published>2011-03-30T21:49:00.000+07:00</published><updated>2012-01-18T10:07:11.244+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>To upgrade PIP to the latest version</title><summary type='text'>sudo easy_install -U pip</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/6370936973417057017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/03/to-upgrade-pip-to-latest-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6370936973417057017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6370936973417057017'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/03/to-upgrade-pip-to-latest-version.html' title='To upgrade PIP to the latest version'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-454002594940679755</id><published>2011-03-25T15:27:00.000+07:00</published><updated>2012-01-18T10:07:11.215+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><title type='text'>Vim necessary commands</title><summary type='text'>Reload the file with selected encoding:
:e ++enc=&lt;encoding&gt;</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/454002594940679755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/03/vim-necessary-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/454002594940679755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/454002594940679755'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/03/vim-necessary-commands.html' title='Vim necessary commands'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-5473987092704632658</id><published>2011-02-25T16:12:00.000+07:00</published><updated>2012-01-18T10:07:11.238+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Force FF not to fill up input by its 'memorized' state after refresh</title><summary type='text'>If it is a very annoying thing for you, use autocomplete="off" for every input you want to avoid memorizing.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/5473987092704632658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/02/force-ff-not-to-fill-up-input-by-its.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5473987092704632658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5473987092704632658'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/02/force-ff-not-to-fill-up-input-by-its.html' title='Force FF not to fill up input by its &apos;memorized&apos; state after refresh'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-7811399459043100669</id><published>2011-02-16T16:58:00.000+07:00</published><updated>2012-01-18T10:07:11.280+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>Patching with git diff</title><summary type='text'>To create patch file:

git diff --no-prefix &gt; filename
To apply it:

patch -p0 &lt; filename
If you have a patch file that's been created without --no-prefix, apply it

patch -p1 &lt; filename</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/7811399459043100669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/02/patching-with-git-diff.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7811399459043100669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7811399459043100669'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/02/patching-with-git-diff.html' title='Patching with git diff'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-905144562187312954</id><published>2011-02-15T18:26:00.000+07:00</published><updated>2012-02-07T13:23:46.957+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>Launch Virualbox image from command line</title><summary type='text'>To launch a VirtualBox image directly without GUI interface do the following

vboxmanage startvm name
where name is exactly name is shown in VirtualBox GUI.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/905144562187312954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/02/launch-virualbox-image-from-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/905144562187312954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/905144562187312954'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/02/launch-virualbox-image-from-command.html' title='Launch Virualbox image from command line'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-9121097602339160905</id><published>2011-02-15T17:21:00.001+07:00</published><updated>2011-02-15T17:21:56.423+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>Git Delete Last Commit</title><summary type='text'>Once in a while late at night when I ran out of coffee, I commit stuff that I shouldn't have. Then I spend the next 10 - 15 minutes googling how to remove the last commit I made. So after third time I wanted to make a record of it so I can refer to it later.

If you have committed junk but not pushed,

git reset --hard HEAD~1
HEAD~1 is a shorthand for the commit before head. Alternatively you can</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/9121097602339160905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/02/once-in-while-late-at-night-when-i-ran.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/9121097602339160905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/9121097602339160905'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/02/once-in-while-late-at-night-when-i-ran.html' title='Git Delete Last Commit'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1357833344685828069</id><published>2011-02-10T14:27:00.000+07:00</published><updated>2011-02-10T14:27:04.641+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>Git support in Netbeans</title><summary type='text'>To make Netbeans work with GIT as simple and comfortable as with Mercurial or SVN use nbgit.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1357833344685828069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/02/git-support-in-netbeans.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1357833344685828069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1357833344685828069'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/02/git-support-in-netbeans.html' title='Git support in Netbeans'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4471116881813607894</id><published>2011-01-31T22:14:00.000+07:00</published><updated>2011-01-31T22:14:16.522+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xpath'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>XPath at HTML in Python</title><summary type='text'>This technique allows to treat HTML code as XML (if even HTML is not totally valid) and use XPath expressions over it.
from lxml import etree

content = '... some html ...'
# use the HTML parser explicitly to provide encoding
parser = etree.HTMLParser(encoding='utf-8')
# load the content using the parser
tree = etree.fromstring(content, parser)
# we've got a XML tree from HTML
# now get all links</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4471116881813607894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/09/xpath-over-html-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4471116881813607894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4471116881813607894'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/09/xpath-over-html-in-python.html' title='XPath at HTML in Python'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-6278854149492738806</id><published>2011-01-17T22:02:00.000+07:00</published><updated>2011-01-17T22:02:26.823+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><title type='text'>How to add your own favicon to your blogger.com blog</title><summary type='text'>To get your own favicon to your blog:

Store a picture you want to be the favicon in PNG and ICO formats in any web-accessible place. I used Google Docs for this because it allows to store any kind of files in public access.
Put in your template this code&lt;link href="url/to/favicon.png" rel="icon" type="image/png"&gt;&lt;/link&gt;
&lt;link href="url/to/favicon.ico" rel="shortcut icon"&gt;&lt;/link&gt;
Notice that you </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/6278854149492738806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2011/01/how-to-add-your-own-favicon-to-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6278854149492738806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6278854149492738806'/><link rel='alternate' type='text/html' href='http://www.boris.co/2011/01/how-to-add-your-own-favicon-to-your.html' title='How to add your own favicon to your blogger.com blog'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2038413014078902740</id><published>2010-12-30T01:48:00.001+07:00</published><updated>2010-12-30T01:49:50.678+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='sqlite'/><title type='text'>Run Django with SQLite</title><summary type='text'>In begin with check whether SQLite has been installed in your Ubuntu
sudo apt-get install sqlite
then in settings.py file:
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'path/to/db'
# the rest of the fields are not used

This trick very useful for development stuff because i.e. with Postgres tests run very slow, and etcetera</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2038413014078902740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/12/run-django-with-sqlite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2038413014078902740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2038413014078902740'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/12/run-django-with-sqlite.html' title='Run Django with SQLite'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1622752212996641585</id><published>2010-12-27T20:13:00.001+07:00</published><updated>2010-12-27T21:17:41.515+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><title type='text'>Disable Firefox cache</title><summary type='text'>To disable go to about:config page (copy to the address bar of FF) and set network.http.use-cache to false (double click it or right-click and 'Toggle').</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1622752212996641585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/12/disable-firefox-cache.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1622752212996641585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1622752212996641585'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/12/disable-firefox-cache.html' title='Disable Firefox cache'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2460077726236993791</id><published>2010-11-17T16:35:00.002+07:00</published><updated>2011-04-11T12:54:50.230+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarklet'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Add jQuery to any website</title><summary type='text'>Sometimes I need to perform some manipulations with a webiste's data. For this purpose I like to use jQuery but not every website it has. So I need to add this support. For that I made a bookmarklet. To use it just drag jQuery to your bookmar bar.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2460077726236993791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/11/add-jquery-to-any-website.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2460077726236993791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2460077726236993791'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/11/add-jquery-to-any-website.html' title='Add jQuery to any website'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-5887560027726337027</id><published>2010-10-26T20:56:00.001+07:00</published><updated>2011-04-11T12:55:28.705+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Merge many text files to one</title><summary type='text'>import glob

search_pattern = '*.vcf'
dest_file = '__.txt'

with open(dest_file, 'w') as F:
    for infile in glob.glob(search_pattern):
        with open(infile) as f:
            F.write(f.read())
            F.write("\n\n")

print 'All done'
raw_input('Press enter...')
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/5887560027726337027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/10/merge-many-text-files-to-one.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5887560027726337027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5887560027726337027'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/10/merge-many-text-files-to-one.html' title='Merge many text files to one'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3117129159822324445</id><published>2010-10-23T17:10:00.036+07:00</published><updated>2010-12-18T15:13:09.330+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GAE'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Run GAE SDK for Python and Django on Ubuntu Maverick</title><summary type='text'>First, I make the following structure in my project's directory:
~/projects/gae/ - directory for GAE's projects
~/projects/gae/google_appengine/ - downloaded GAE sources
~/projects/gae/google_appengine/test/ - test project using GAE

So, to run this test project as well as other further projects that use GAE
Download Google App Engine SDK for Python and unpack it to ~/projects/gae/.

Install </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3117129159822324445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/10/python-25-in-ubuntu-maverick.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3117129159822324445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3117129159822324445'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/10/python-25-in-ubuntu-maverick.html' title='Run GAE SDK for Python and Django on Ubuntu Maverick'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-7569640266060501925</id><published>2010-10-22T20:49:00.000+07:00</published><updated>2010-10-22T20:49:35.719+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Default opening software</title><summary type='text'>This file ~/.local/share/applications/mimeapps.list contains all overridden openers for particular MIME types.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/7569640266060501925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/10/default-opening-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7569640266060501925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7569640266060501925'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/10/default-opening-software.html' title='Default opening software'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2159021037734014793</id><published>2010-10-22T18:03:00.000+07:00</published><updated>2010-10-22T18:03:18.899+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flash-player'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Google Chrome and Flash player</title><summary type='text'>Having installed new Ubuntu 10.10 I found that Google Chrome cannot display flash content and asks to install flash player. But at flash player download website it says that I have already installed one.
Googling a bit gives me an advise. I made the step below and it gets work.
$ sudo apt-get install flashplugin-installer
$ sudo locate libflashplayer.so
/usr/lib/flashplugin-installer/</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2159021037734014793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/10/google-chrome-and-flash-player.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2159021037734014793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2159021037734014793'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/10/google-chrome-and-flash-player.html' title='Google Chrome and Flash player'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1011374251299149500</id><published>2010-10-22T17:38:00.000+07:00</published><updated>2011-04-11T13:02:57.412+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Clock widget hangup</title><summary type='text'>If you are very annoyed by system hangup when you have clicked clock widget to watch calendar or whatever in your Ubuntu 10.10 I can advise to do the following:
sudo apt-get purge evolution-data-server evolution-couchdb evolution evolution-exchange
That's all. After this you are avoided such unpleasant behavior.
It, however, removes Evolution mail client but if you don't use it as me that is not </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1011374251299149500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/10/clock-widget-hangup.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1011374251299149500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1011374251299149500'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/10/clock-widget-hangup.html' title='Clock widget hangup'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-6464524239678780222</id><published>2010-09-16T14:37:00.000+07:00</published><updated>2011-04-11T12:58:03.955+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Install lxml on Windows</title><summary type='text'>To install easy_install on Windows:
Run the command in cmd.exe
easy_install lxml
If have not installed easy_install download and install appropriate version from http://pypi.python.org/pypi/setuptools#downloads
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/6464524239678780222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/09/install-lxml-on-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6464524239678780222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6464524239678780222'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/09/install-lxml-on-windows.html' title='Install lxml on Windows'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8357751720721136795</id><published>2010-09-14T13:09:00.000+07:00</published><updated>2010-09-14T13:11:26.726+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>Default UTF-8 for all files</title><summary type='text'>In &lt;Netbeans install dir&gt;/etc/netbeans.conf file add to netbeans_default_options parameter
-J-Dfile.encoding=UTF-8</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8357751720721136795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/09/default-utf-8-for-all-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8357751720721136795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8357751720721136795'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/09/default-utf-8-for-all-files.html' title='Default UTF-8 for all files'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4267530676990335586</id><published>2010-09-10T18:29:00.000+07:00</published><updated>2010-09-10T18:29:18.667+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GAE'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Sort by the key</title><summary type='text'>To sort query by the key:
model = MyModel()
model.order('-__key__') # descending sort
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4267530676990335586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/09/sort-by-key.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4267530676990335586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4267530676990335586'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/09/sort-by-key.html' title='Sort by the key'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4856867430290557832</id><published>2010-09-05T19:06:00.000+07:00</published><updated>2011-04-11T13:00:49.696+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Change button order in new Ubuntu theme</title><summary type='text'>Just download this script, run it and enjoy!</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4856867430290557832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/09/change-button-order-in-new-ubuntu-theme.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4856867430290557832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4856867430290557832'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/09/change-button-order-in-new-ubuntu-theme.html' title='Change button order in new Ubuntu theme'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-530972264155748520</id><published>2010-08-17T01:35:00.000+07:00</published><updated>2011-04-11T13:02:02.264+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Play WMV, MP3 and other restricted formats in Ubuntu</title><summary type='text'>Some audio and video formats are not included into Ubuntu by default. And to enable them in your system you must do it by your own.Install themOriginal Post</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/530972264155748520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/08/play-wmv-mp3-and-other-restricted.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/530972264155748520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/530972264155748520'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/08/play-wmv-mp3-and-other-restricted.html' title='Play WMV, MP3 and other restricted formats in Ubuntu'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-488813921367449239</id><published>2010-08-17T01:23:00.000+07:00</published><updated>2010-08-17T01:23:21.989+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flash-player'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Fix mouse clicks in Flash-player in Ubuntu</title><summary type='text'>In /usr/lib/nspluginwrapper/i386/linux/npviewer add
export GDK_NATIVE_WINDOWS=1so, the content in this file become
#!/bin/sh
TARGET_OS=linux
TARGET_ARCH=i386
export GDK_NATIVE_WINDOWS=1
. /usr/lib/nspluginwrapper/noarch/npviewerRestart browser and that's all.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/488813921367449239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/08/fix-mouse-clicks-in-flash-player-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/488813921367449239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/488813921367449239'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/08/fix-mouse-clicks-in-flash-player-in.html' title='Fix mouse clicks in Flash-player in Ubuntu'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2084767093837286034</id><published>2010-07-22T23:42:00.000+07:00</published><updated>2011-04-11T12:57:09.746+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Restore grub2 after Windows installation</title><summary type='text'>To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x14311431

</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2084767093837286034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/07/restore-grub2-after-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2084767093837286034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2084767093837286034'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/07/restore-grub2-after-windows.html' title='Restore grub2 after Windows installation'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-334123410134906905</id><published>2010-05-18T16:19:00.000+07:00</published><updated>2010-05-18T16:19:05.773+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Checkbox select all jQuery plugin for a table</title><summary type='text'>/*
 * File: jquery.checkboxselection.js
 *
 * Plugin to create checkbox in the table
 * It needs table has correct structure (at least with head and body) and
 * there are checkboxs in row's first cell both in header in body
 */

(function($) {
    $.fn.checkboxSelection = function() {
        return this.each(function() {
            var table = this;
            var headCheckbox = $('thead th:</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/334123410134906905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/05/checkbox-select-all-jquery-plugin-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/334123410134906905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/334123410134906905'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/05/checkbox-select-all-jquery-plugin-for.html' title='Checkbox select all jQuery plugin for a table'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3546296642998525185</id><published>2010-04-28T22:41:00.000+07:00</published><updated>2011-04-11T12:55:52.298+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>How to limit joined records in MySQL</title><summary type='text'>I have to tables with one-to-many relationship. I needed to select all from the master table and join only one record which contains the oldest date.
The solution is:
SELECT parent.*,
       c1.*
  FROM parent
       JOIN child c1
          ON c1.parent_id = parent.id
       LEFT JOIN child c2
          ON c2.parent_id = c1.parent_id AND c2.sort &lt; c1.sort -- field to determine the order (maybe </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3546296642998525185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/04/how-to-limit-joined-records-in-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3546296642998525185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3546296642998525185'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/04/how-to-limit-joined-records-in-mysql.html' title='How to limit joined records in MySQL'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2944819818065023289</id><published>2010-04-03T13:42:00.000+07:00</published><updated>2011-04-11T12:54:05.026+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>ATI driver problems after upgrading Ubuntu 9.10 to 10.04</title><summary type='text'>I have upgraded my desktop Ubuntu 9.10 to 10.04. Everything was fine except ATI driver didn't want to be installed. An error was in fglrx-amdcccle package,After that, I've reported the bug to Ubuntu Bug Tracker, and today I got the decision of my problem:
apt-get remove xorg-driver-fglrx fglrx fglrx-amdcccle
dpkg-divert --remove /usr/lib/xorg/modules/extensions/libdri.so
dpkg-divert --remove /usr</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2944819818065023289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/04/ati-driver-problems-after-upgrading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2944819818065023289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2944819818065023289'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/04/ati-driver-problems-after-upgrading.html' title='ATI driver problems after upgrading Ubuntu 9.10 to 10.04'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-6351003616767339836</id><published>2010-03-08T22:51:00.000+07:00</published><updated>2011-04-11T12:55:20.992+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Check class</title><summary type='text'>In case if you have to use pure Javascript:
    var hasClass = function(element,className) {
        return (function() {
            var classes = element.className.split(' ');
            for(var i in classes) {
                if(classes[i] == className) {
                    return true;
                }
            }
            return false;
        })();
    }
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/6351003616767339836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/03/check-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6351003616767339836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6351003616767339836'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/03/check-class.html' title='Check class'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8758653277214559265</id><published>2010-03-02T18:22:00.000+07:00</published><updated>2011-04-11T13:02:34.734+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>CSS attribute selectors</title><summary type='text'>
div.aq4sdhf span.a {
 font-weight: bold;
}
div.aq4sdhf div.e {
 font-size: 80%;
}
div.aq4sdhf p {
 margin: 0.7em 0 0.3em 0;
}
div.aq4sdhf div.e p {
 margin: 0;
}

[rel=value] — attribute equals to value&lt;h1 rel="value"&gt;Attribute Equals&lt;/h1&gt;h1[rel=value] { color: red; }[rel*=value] — attribute contains value anywhere&lt;h1 rel="xxxvaluexxx"&gt;Attribute Contains&lt;/h1&gt;h1[rel*=value] { color: red; }[rel^=</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8758653277214559265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/03/css-attribute-selectors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8758653277214559265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8758653277214559265'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/03/css-attribute-selectors.html' title='CSS attribute selectors'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1027753479044437995</id><published>2010-03-02T16:34:00.000+07:00</published><updated>2011-04-11T12:56:17.104+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Table checkboxes selection</title><summary type='text'>To select or unselect checkboxes in a table I use the follow code
(function() {
    // checkboxes in the table
    var cbs = document.getElementsByName('checkboxes');
    // header checkbox
    var all = document.getElementById('header_checkbox');
    all.onclick = function() {
        for(var i=0;i&lt;cbs.length;i++) {
            cbs[i].checked = this.checked;
        }
    }
    var cbClick = </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1027753479044437995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/03/table-checkboxes-selection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1027753479044437995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1027753479044437995'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/03/table-checkboxes-selection.html' title='Table checkboxes selection'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-614174629061160650</id><published>2010-02-22T21:58:00.000+07:00</published><updated>2011-04-11T12:53:48.756+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Universal archive unpacking tool</title><summary type='text'>###   Handy Extract Program

extract () {
    if [ -f $1 ] ; then
        case $1 in
            *.tar.bz2) tar xvjf $1   ;;
            *.tar.gz)  tar xvzf $1   ;;
            *.bz2)     bunzip2 $1    ;;
            *.rar)     unrar x $1    ;;
            *.gz)      gunzip $1     ;;
            *.tar)     tar xvf $1    ;;
            *.tbz2)    tar xvjf $1   ;;
            *.tgz)     tar xvzf $1</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/614174629061160650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/02/universal-archive-unpacking-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/614174629061160650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/614174629061160650'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/02/universal-archive-unpacking-tool.html' title='Universal archive unpacking tool'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8424328996647687047</id><published>2010-02-04T16:52:00.000+07:00</published><updated>2011-04-11T12:59:33.317+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Setting up a network adapter alias</title><summary type='text'>sudo ifconfig eth0:[0-254] 192.168.1.2 up.

Instead of eth0 you can use any of existing interfaces</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8424328996647687047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/02/setting-up-network-adapter-alias.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8424328996647687047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8424328996647687047'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/02/setting-up-network-adapter-alias.html' title='Setting up a network adapter alias'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3331636065057774383</id><published>2010-01-28T02:09:00.001+07:00</published><updated>2010-12-27T20:14:20.125+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='extension'/><title type='text'>Firefox extension. Thoughts.</title><summary type='text'>While I try to see into Firefox Extension development, I found not evident things for me. And here I'll list'em.
You want to append event handler to created by you DOM-element somewhere in '1body' descendants. Don't try to use onclick or like it - you'll get a fail. Use addEventHandler method, and you'll get success :)

</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3331636065057774383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/01/firefox-extension-thoughts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3331636065057774383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3331636065057774383'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/01/firefox-extension-thoughts.html' title='Firefox extension. Thoughts.'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4246235829960402172</id><published>2010-01-27T04:13:00.000+07:00</published><updated>2011-04-11T12:57:38.107+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inheritance'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>Django model field inheritance</title><summary type='text'>To inherit model field in Django is not enough simply inherit a field class. It is needed to add attribute __metaclass__ = models.SubfieldBase. After that, you can overload any method you want.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4246235829960402172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/01/django-model-field-inheritance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4246235829960402172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4246235829960402172'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/01/django-model-field-inheritance.html' title='Django model field inheritance'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-526769257361149177</id><published>2010-01-26T17:06:00.001+07:00</published><updated>2010-12-27T20:14:38.582+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='extension'/><title type='text'>Firefox extension. The first tries</title><summary type='text'>I am developing the service which I'll describe further. And I decide to create a Firefox extension for it. And what I have dug:
To create a developer profile may that
firefox -profilemanager
To run another -- development -- copy of Firefox
firefox -no-remote -P &lt;profile name&gt;
And I assume firefox binary in your path.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/526769257361149177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2010/01/firefox-extension-first-tries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/526769257361149177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/526769257361149177'/><link rel='alternate' type='text/html' href='http://www.boris.co/2010/01/firefox-extension-first-tries.html' title='Firefox extension. The first tries'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-3433831225388612812</id><published>2009-12-29T03:08:00.000+07:00</published><updated>2009-12-29T03:18:10.598+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Django and Oracle support</title><summary type='text'>To get work Django and Oracle client in Ubuntu:Download cx_Oracle (choose for your system), Oracle InstantClient and Sql*Plus (in this page you can choose your OS and download the packages (in my case are oracle-instantclient11.2-basic-11.2.0.0.2-1.x86_64.rpm and oracle-instantclient11.2-sqlplus-11.2.0.0.2-1.x86_64.rpm).Move the files into one directory for simplicity and run
alien -k *.rpm
dpkg </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/3433831225388612812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/12/django-and-oracle-support.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3433831225388612812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/3433831225388612812'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/12/django-and-oracle-support.html' title='Django and Oracle support'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4961861351659212941</id><published>2009-12-29T02:14:00.000+07:00</published><updated>2011-04-11T13:00:26.715+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Install RPM in Ubuntu</title><summary type='text'>To install Rpm-package in Ubuntu Linux (to run commands needs to be a superuser or using sudo):
 install alien package:sudo apt-get install alien
Convert Rpm to Deb (in current directory)
alient -k &lt;package-file&gt;.rpm
Install the new Deb package
dpkg -i &lt;package-file&gt;.deb
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4961861351659212941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/12/install-rpm-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4961861351659212941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4961861351659212941'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/12/install-rpm-in-ubuntu.html' title='Install RPM in Ubuntu'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-44857966754781699</id><published>2009-12-29T01:34:00.000+07:00</published><updated>2011-04-11T12:59:52.823+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Problems with VPN-connections in Ubuntu Karmic</title><summary type='text'>I need to connect to Cisco VPN. I had got a file with connection settings. Through NetworkManager I created new VPN connection by import the settings file. Trying to connect - no result. In /var/log/syslog I found the line:
NetworkManager: nm-vpn-connection.c.828: NeedSecrets failed: dbus-glib-error-quark Rejected se
nd message, 1 matched rules; type="method_call", sender=":1.5" (uid=0 pid=969 </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/44857966754781699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/12/problems-with-vpn-connections-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/44857966754781699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/44857966754781699'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/12/problems-with-vpn-connections-in-ubuntu.html' title='Problems with VPN-connections in Ubuntu Karmic'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2159520354353264138</id><published>2009-12-24T21:57:00.000+07:00</published><updated>2011-04-11T13:00:36.369+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu's Archive Manager and RAR-archives support</title><summary type='text'>To add support of RAR-archives for Ubuntu's Archive Manager run
sudo apt-get install unrar
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2159520354353264138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/12/ubuntus-archive-manager-and-rar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2159520354353264138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2159520354353264138'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/12/ubuntus-archive-manager-and-rar.html' title='Ubuntu&apos;s Archive Manager and RAR-archives support'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8683888579094591502</id><published>2009-12-16T17:53:00.000+07:00</published><updated>2009-12-16T17:53:32.339+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mercurial'/><title type='text'>Disabled Mercurial's strip command</title><summary type='text'>Mercurial command hg strip is disabled by default in Ubuntu. To enable it add to hgrc file (in .hg directory of repository or /etc/mercurial/hgrc) these lines
[extensions]
hgext.mq =</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8683888579094591502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/12/disabled-mercurials-strip-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8683888579094591502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8683888579094591502'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/12/disabled-mercurials-strip-command.html' title='Disabled Mercurial&apos;s strip command'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1525889202416212629</id><published>2009-12-09T15:10:00.000+07:00</published><updated>2011-04-11T12:58:14.622+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Reinstall Ubuntu automatically</title><summary type='text'>There is a very simple command that reinstalls all the distribution packages and reconfigures them automatically. This is particularly helpful when you have done a partial upgrade and eventually have broken the system dependencies tree.
sudo dpkg-reconfigure -phigh -asince this command would take a lot of time to process (~1 hour) depending on your hardware in case you have a minor dependency </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1525889202416212629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/12/reinstall-ubuntu-automatically.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1525889202416212629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1525889202416212629'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/12/reinstall-ubuntu-automatically.html' title='Reinstall Ubuntu automatically'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1415089769213325804</id><published>2009-12-09T04:33:00.000+07:00</published><updated>2011-04-11T12:56:02.210+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>Create a MySQL database for new user</title><summary type='text'>To create a database and a user, to grant some privileges:CREATE DATABASE test_db DEFAULT CHARACTER SET UTF8;
CREATE USER 'user'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON test_db.* TO 'user'@'%';
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1415089769213325804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/12/create-mysql-database-for-new-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1415089769213325804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1415089769213325804'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/12/create-mysql-database-for-new-user.html' title='Create a MySQL database for new user'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-812380160832766940</id><published>2009-12-08T20:43:00.000+07:00</published><updated>2009-12-08T20:43:00.525+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mercurial'/><title type='text'>Mercurial server in haste</title><summary type='text'>Just now I need to pull to spontaneous remote Mercurial repository. I ran hg serve and have tried to push. The server rejects my connection, because it demands secure connection. Attempts to change protocol to HTTPS were failed.
As decision I found the following: in hgrc (or mercurial.ini in Windows) add
[web]
allow_push = *
push_ssl = false

Profit :)</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/812380160832766940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/12/mercurial-server-in-haste.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/812380160832766940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/812380160832766940'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/12/mercurial-server-in-haste.html' title='Mercurial server in haste'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4762030973251901603</id><published>2009-11-29T19:04:00.002+07:00</published><updated>2012-01-16T15:30:19.470+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Setting up Postgres database server in Ubuntu 9.10</title><summary type='text'>Do all as the superuser.
apt-get install postgresql postgresql-client postgresql-contrib
# To reset password for postgres user
echo "ALTER USER postgres WITH PASSWORD 'postgres';" | sudo -u postgres psql template1
# reset password for system user
passwd postgresIn bottom of /etc/postgresql/8.4/main/pg_hba.conf file set as the following:
# DO NOT DISABLE!
# If you change this first entry you will </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4762030973251901603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/setting-up-postgres-database-server-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4762030973251901603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4762030973251901603'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/setting-up-postgres-database-server-in.html' title='Setting up Postgres database server in Ubuntu 9.10'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8067443337630632216</id><published>2009-11-29T02:48:00.000+07:00</published><updated>2011-04-11T12:56:48.722+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Mount NTFS-partition in Ubuntu Karmic x64</title><summary type='text'>Do all as the superuser.
Get location of the ntfs partition
fdisk -lDisk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x14311431

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       29089   233657361    7  HPFS/NTFS
/dev/sda2           29090       </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8067443337630632216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/mount-ntfs-partition-in-ubuntu-karmic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8067443337630632216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8067443337630632216'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/mount-ntfs-partition-in-ubuntu-karmic.html' title='Mount NTFS-partition in Ubuntu Karmic x64'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-6079508900265357900</id><published>2009-11-29T01:48:00.000+07:00</published><updated>2011-04-11T12:55:07.456+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='filesystem'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Install Chromium in Ubuntu 9.10 Karmic x64</title><summary type='text'>To install just run this commands as superuser.
echo "deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main" &gt;&gt; /etc/apt/sources.list

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5

apt-get update

apt-get install -y chromium-browser</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/6079508900265357900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/install-chromium-in-ubuntu-910-karmic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6079508900265357900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/6079508900265357900'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/install-chromium-in-ubuntu-910-karmic.html' title='Install Chromium in Ubuntu 9.10 Karmic x64'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2045804173446944304</id><published>2009-11-29T01:27:00.000+07:00</published><updated>2011-04-11T12:57:21.940+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mercurial'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Disabled `hg view` command in Ubuntu</title><summary type='text'>To enable `hg view` command it's needs to add
[extensions]
hgk=in your repository hgrc (.hg/hgrc) or system-wide(/etc/mercurial/hgrc)
Or you might also need to install the tk package.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2045804173446944304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/disabled-hg-view-command-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2045804173446944304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2045804173446944304'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/disabled-hg-view-command-in-ubuntu.html' title='Disabled `hg view` command in Ubuntu'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4898018292310384204</id><published>2009-11-28T19:38:00.000+07:00</published><updated>2009-11-28T19:38:27.065+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='filesystem'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Convert Ext3 filesystem to Ext4 in Ubuntu 9.04</title><summary type='text'>Suppose your disk is /dev/sda1.e2fsck /dev/sda1 -y
tune2fs -O extents,uninit_bg,dir_index /dev/sda1
fsck -pf /dev/sda1

Profit :)</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4898018292310384204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/convert-ext3-filesystem-to-ext4-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4898018292310384204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4898018292310384204'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/convert-ext3-filesystem-to-ext4-in.html' title='Convert Ext3 filesystem to Ext4 in Ubuntu 9.04'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-5797173500429444662</id><published>2009-11-27T12:41:00.000+07:00</published><updated>2009-11-27T12:41:54.484+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu One Client in 9.10</title><summary type='text'>If you have troubles with Ubuntu One Client in 9.10 look in its config (~/.config/ubuntuone/syncdaemon.conf). It have to look like this

[bandwidth_throttling]
on = False 
read_limit = -1
write_limit = -1
If in your config `on` = True, change to False, restart UO client and get profit :)

spied here.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/5797173500429444662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/ubuntu-one-client-in-910.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5797173500429444662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5797173500429444662'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/ubuntu-one-client-in-910.html' title='Ubuntu One Client in 9.10'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-9116217655678390304</id><published>2009-11-24T05:10:00.000+07:00</published><updated>2011-04-11T12:59:23.749+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Setup memcached cache backend in Django in Ubuntu 9</title><summary type='text'>In order to run them together we have to:
Install necessary packages

sudo apt-get install build-essential python-dev memcached libmemcache-dev python-dev


Install cmemcache (using easy_install)

easy_install http://gijsbert.org/downloads/cmemcache/cmemcache-0.95.tar.bz2

And, optionally and for test only, run memcached

memcached -d -m 1024 -i 0.0.0.0 11211

</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/9116217655678390304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/django-and-memcached-together-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/9116217655678390304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/9116217655678390304'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/django-and-memcached-together-in-ubuntu.html' title='Setup memcached cache backend in Django in Ubuntu 9'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2038869779220604520</id><published>2009-11-22T18:49:00.000+07:00</published><updated>2011-04-11T12:56:26.709+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>Django auto language selection</title><summary type='text'>I want user can select language he prefers. But I didn't found how to do it in Django easy. And I stopped on the following decision.At first we need middleware which will detects language parameter in GET (name is in settings.LANGUAGE_COOKIE_NAME) and sets session's paramater `django_language`.
import settings

class LocaleDetectMiddleware(object):
    """
    This middleware parse GET request </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2038869779220604520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/django-auto-language-selection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2038869779220604520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2038869779220604520'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/django-auto-language-selection.html' title='Django auto language selection'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-8584628463204141574</id><published>2009-11-22T03:18:00.000+07:00</published><updated>2011-04-11T13:04:28.948+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>South for Django, or how to keep database up to date</title><summary type='text'>South is a migration tool for Django.There two ways to install South: system-wide or per-project. I choose the second way because I always know that it's works with the project.Get from repository.
hg clone http://bitbucket.org/andrewgodwin/south/
hg update -C 0.6.2 #this is stable version now
        
copy south dir to project
Add it to INSTALLED_APPS
In order to create all system models
./</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/8584628463204141574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/south-for-django.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8584628463204141574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/8584628463204141574'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/south-for-django.html' title='South for Django, or how to keep database up to date'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-4959840079091559714</id><published>2009-11-21T19:58:00.000+07:00</published><updated>2011-04-11T13:04:46.867+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><title type='text'>Javascript SyntaxHighlighter</title><summary type='text'>In this blog for code highlighting I use the cool SyntaxHighlighter. And for installing it I spend some time to way to include in blogspot's template. Now just copy the html-code and paste after &lt;head&gt; tag.&lt;link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shCore.css' rel='stylesheet' type='text/css'/&gt; 
&lt;link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shThemeDefault.css' rel='</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/4959840079091559714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/javascript-syntaxhighlighter.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4959840079091559714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/4959840079091559714'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/javascript-syntaxhighlighter.html' title='Javascript SyntaxHighlighter'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2145678632663027861</id><published>2009-11-21T19:11:00.000+07:00</published><updated>2011-04-11T12:54:17.466+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>Django authentication</title><summary type='text'>How to login a user in Django? There are two ways.First, "django way", use the function authenticate which returns User model with very necessary attribute backend. This way is good when you log a user in from a form when you know its username and password. But what do to do if needs to log the user in which loaded directly from User model, when you don't know its password (you  just have a </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2145678632663027861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/django-authentication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2145678632663027861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2145678632663027861'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/django-authentication.html' title='Django authentication'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-2666396666700947352</id><published>2009-11-17T21:43:00.000+07:00</published><updated>2011-04-11T12:56:59.703+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Restore GRUB boot loader after other OS has been installed</title><summary type='text'>After updating Windows XP to Windows 7 Grub-loader has been lost. I can't work without Linux. And I found this solution:

At first Load from live-cd
grubLet's know where os install
find /boot/menu/menu.lstOutput will be like this
(hd0,3)Tell grub where its files
root (hd0,3)And install it
setup (hd0)
quit
rebootAfter rebooting we can see the GRUB-menu.</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/2666396666700947352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/restore-grub-boot-loader-after-other-os.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2666396666700947352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/2666396666700947352'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/restore-grub-boot-loader-after-other-os.html' title='Restore GRUB boot loader after other OS has been installed'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-5792534863157113131</id><published>2009-11-17T21:03:00.001+07:00</published><updated>2012-02-07T13:23:46.945+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Script to easily create a Postgres database</title><summary type='text'>#! /bin/sh
if [ ${#} -ne 3 ]
then
 echo "Usage: $0 db_name username password"
 exit 2
fi

DBNAME=$1
USER=$2
PWD=$3

echo "
CREATE USER $USER WITH PASSWORD '$PWD';
CREATE DATABASE $DBNAME;
GRANT ALL PRIVILEGES ON DATABASE $DBNAME to $USER;
" | psql -U postgres -d template1

or if you want just to exec it once:
echo "
CREATE USER $USER WITH PASSWORD '$PWD';
CREATE DATABASE $DBNAME;
GRANT ALL </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/5792534863157113131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/script-to-easily-create-postgres.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5792534863157113131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5792534863157113131'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/script-to-easily-create-postgres.html' title='Script to easily create a Postgres database'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1030510643732934816</id><published>2009-11-13T14:54:00.000+07:00</published><updated>2011-04-11T13:00:05.603+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Generate random password in Linux</title><summary type='text'>cat /dev/urandom | tr -d -c 'a-zA-Z0-9' | fold -w 8 | head -1</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1030510643732934816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/11/generate-random-password-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1030510643732934816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1030510643732934816'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/11/generate-random-password-in-linux.html' title='Generate random password in Linux'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-1875054368375832729</id><published>2009-10-10T16:33:00.000+07:00</published><updated>2011-04-11T13:02:11.635+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Javascript function delegate</title><summary type='text'>Function.prototype.createDelegate = function(obj, args, ignoreArgs) {
 var method = this;
 return function {
  return method.apply(obj || window, (!args) ? arguments : (ignoreArgs === true) ? args : args.concat(Array.apply(null, arguments)));
 };
};
</summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/1875054368375832729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/10/function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1875054368375832729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/1875054368375832729'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/10/function.html' title='Javascript function delegate'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-7716398867586265715</id><published>2009-09-26T22:25:00.000+07:00</published><updated>2011-04-11T12:57:51.858+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='inheritance'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>Use objects as a django view functions</title><summary type='text'>To use objects instead of simple functions I apply the following method:

class Page(object):
    # Variables
    template = "main.html"
    vars = {}
    redirect_url = ""

    def __call__(self,request,*args,**kwargs):
        # Before calling a "main" content-generating method
        self.before_content(request,*args,**kwargs)
        # "Main" content-generating method. Must be declared in </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/7716398867586265715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/09/use-objects-as-views.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7716398867586265715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/7716398867586265715'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/09/use-objects-as-views.html' title='Use objects as a django view functions'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1156652312374518175.post-5723425922790886708</id><published>2009-09-26T13:40:00.000+07:00</published><updated>2011-04-11T13:03:13.003+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>Optimize and speed up Netbeans</title><summary type='text'>In /etc/netbeans.conf  set netbeans_default_options to
-J-client -J-Xms32m -J-Xmx512m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Xverify:none -J-XX:CompileThreshold=100 -XX:+CompressedOOPS -XX:+AggressiveOpts -XX:+TieredCompilation -XX:+DoEscapeAnalysis -XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
So, we allow to use up to 512Mb RAM, compile to </summary><link rel='replies' type='application/atom+xml' href='http://www.boris.co/feeds/5723425922790886708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.boris.co/2009/09/optimize-and-speed-up-netbeans.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5723425922790886708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1156652312374518175/posts/default/5723425922790886708'/><link rel='alternate' type='text/html' href='http://www.boris.co/2009/09/optimize-and-speed-up-netbeans.html' title='Optimize and speed up Netbeans'/><author><name>Boris Shemigon</name><uri>https://profiles.google.com/104882975496010205093</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-ONikCaEQiGM/AAAAAAAAAAI/AAAAAAABNGU/5utHDTtdviQ/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
