life @ 14 April 2009, Обсудить
I'm so sorry for half a year without posts, I don't forget about my english version of my blog.
I have a lot of work last time, for example as a freelancer. In nearby time I will translate some of my coolest posts in my russian blog. I have a lot of to write for you(I see that there are 2 subscribers - Hello :)
I want to announce a series of posts about rtorrent, it's bugs and tricks, about Debian GNU/Linux tips and trick in optimization it for server or desktop, translation my own how-to of installing Ubuntu OS on my new notebook HP Compaq Presire CQ50 110er, and many others useful articles.
As you can see this blog now runs not on Wordpress Blog engine, but new russian CMS - Maxsite CMS. It is fast as a light speed, it don't need so much resources to run(what we could not tell about Wordpress;). And it is based on very-very fast framework - Codeigniter. There are new design, based on descartes-1.2 Wordpress theme, this is enough modern and I like it...
For the lasr half a year I have lots of experience to tell... Don't switch channels.
Tags: ,

life @ 04 October 2008, Обсудить
When I have an exams I use such crib(I hope it's true word):
First step. Printing.


Second step. Cut it.


Third step. Glue it.


4th step. Fixing on the pen.


Step 5. Fix with elastic band.
Tags:

linux @ 04 October 2008, Обсудить
In this post we will learn how to install web interface to wonderful torrent client - rtorrent.
First of all we should install webserver and required modules:
sudo aptitude install php5 php5-xmlrpc libapache2-mod-scgi libxmlrpc-c3-dev libxmlrpc-c3 apache2
Then we should configure apache to use rtGui
Replace /etc/apache2/sites-enabled/000-default with this text:
NameVirtualHost localhost
ServerName localhost
<VirtualHost 127.0.0.1>
ServerAdmin webmaster@localhost
DocumentRoot /home/<strong>user</strong>/www/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/<strong>user</strong>/www/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /home/<strong>user</strong>/www/error.log
LogLevel warn
CustomLog /home/<strong>user</strong>/www/access.log combined
ServerSignature On
LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so
SCGIMount /RPC2 127.0.0.1:5000
</VirtualHost>

And make public directory for your gui/website:
mkdir -p /home/user/www/public_html
Add to your ~/.rtorrent.rc this line:
scgi_port = 127.0.0.1:5000
After that - go to the public directory:
cd ~/www/public_html
And get the fresh version of rtgui:
wget http://rtgui.googlecode.com/files/rtgui-0.2.5.tgz && tar zxvf rtgui-0.2.5.tgz && ln -s rtgui-0.2.5 rtgui
Edit config file:
vim rtgui/config.php
$watchdir="/home/user/downloads"; //where you download .torrent files
$downloaddir="/home/user/torrents"; //where you keep your torrents uploade

And correct the encoding(I have locale in utf8 not iso:
vim rtgui/index.php

That's all! You could watch your new interface at http://localhost/rtgui/

linux @ 01 October 2008, Обсудить
I write two posts in my russian blog about compiling and patching pidgin from sources.
There are two patches, one of them solving problem with non Latin languages in Authorizing Messages.
The second one is adding an ability to set X-Status picture. So let's go first of all we should get fresh sources:
mkdir ~/compile && cd ~/compile
wget http://downloads.sourceforge.net/pidgin/pidgin-2.5.1.tar.bz2
tar xvfj pidgin-2.5.1.tar.bz2
cd pidgin-2.5.1/

So we can begin:
1. Installing building packages(and uninstalling old files:
sudo aptitude remove pidgin pidgin-data libpurple0
sudo apt-get build-dep libpurple
sudo apt-get build-dep pidgin

Or:
sudo aptitude remove pidgin pidgin-data libpurple0
sudo aptitude install libglib2.0-dev libgtk2.0-dev libgtkspell-dev libstartup-notification0-dev libxml2-dev libmeanwhile-dev libgstreamer0.10-dev libavahi-client-dev libdbus-glib-1-dev libperl-dev network-manager-dev libnss3-dev tcl-dev tk-dev

2. Getting patches(I'm not an author of utf8 patch):
wget http://librarian.spb.ru/utf8.patch
wget http://developer.pidgin.im/attachment/ticket/766/custom_icons4.patch?format=raw -O custom_icons4.patch
wget http://developer.pidgin.im/attachment/ticket/766/custom_user_icons.tar.gz?format=raw -O custom_user_icons.tar.gz
patch -p1 < utf8.patch
patch -p1 < custom_icons4.patch

3. Preparing archives with x-status icons:
tar zxf custom_user_icons.tar.gz
4. Configuring and installing:
./configure --disable-screensaver --prefix=/usr
make
sudo make install

5. Then you need to copy icons to pidgin data:
sudo cp custom_user_icons/* /usr/share/pixmaps/pidgin/emblems/16/
sudo chmod 644 /usr/share/pixmaps/pidgin/emblems/16/*


Okay, let's go.

P.S. also you can get this patches(with tango icons):
wget http://developer.pidgin.im/raw-attachment/ticket/4508/xstatus-patch-pidgin-2.5.1.patch
wget http://developer.pidgin.im/raw-attachment/ticket/4508/custom_user_icons_tango.zip


linux @ 01 October 2008, Обсудить
In last two posts I wrote how to increase your torrent rating with graphical tools. But the Linux is so strong, so you can do the same only in console.
Anything you need is tcpdump!
Launch tcpdump to listen to host:
sudo tcpdump -i eth0 -A -q -s 1024 'port 80 and host bt.torrents.ru' > dump.txt
Launch tho torrent client and stop it.
So after some time you get lot's of requests in your dump.txt. We need to filter them:
grep GET -A 5 ./dump.txt|head -n 6|sed 's/^.*GET/GET/g' > dump2.txt
So we get one beautiful request. But we need some tricks:
echo Connection: Keep-Alive >> dump2.txt
So the we need two requests
start:
cat dump2.txt | sed s/stopped/started/g > start.txt
And stop:
cat dump2.txt | sed s/started/stopped/g | sed s/downloaded=0/downloaded=20971520/g > stop.txt
where 20971520 is number of bytes you want to get.
So you can also add it to crontab ;)
Tags: ,