Day
No Comments

Posted by perkins on 25 April 2012 in Uncategorized | Short Link

Seating in pizza pepperoni, waiting for karlsberg and lana. Stupid day, did nothing to remember. Stas in seole (s. Korea). Yossi announced tha he is going to stop seat in searoad’s office permanently: elena got rein.

python: tabs vs space
No Comments

Posted by perkins on 14 April 2012 in IT, l_eng | Short Link

I have searched trough some sources and here is my findings, regarding what symbols are used for indentation:

  1. Perl modules mostly (there is some exceptions) written with space indentation
  2. Python – spaces
  3. Cakephp – with tabs

I think I’ll dare to use tabs in general programming (bash / perl / python / php).  The main reason is this: I really like to change the visible indent at my will during work with vim. This is done by simple command
:set tabstop

To apply the desired behavior my vimrc file for vim has been altered to contain the following lines:

:set tabstops=4
:set  shiftwidth=4
“:set expandtab
“:set softtabstop=4

(last two lines are commented out)

In vim plugin (~/.vim/plugin/python.vim) comment out line

:setlocal expandtab

http://vim.wikia.com/wiki/Indenting_source_code

Discussion for tabs / space use in Python:

http://stackoverflow.com/questions/119562/tabs-versus-spaces-in-python-programming

virtualbox: clone vm, alter MAC of NIC
No Comments

Posted by perkins on 31 March 2012 in IT, l_eng | Short Link

After alteration of NIC MAC address I do the following in the guest OS (Linux):

  1. login via RDP
  2. delete /etc/udev/rules.d/70-persistent-net.rules
  3. restart vm
  4. check the same file (it will be re-created by the system). Specifically, you want to know what name new interface had been given (eth0 / eth1 etc)
  5. make a copy of config file (in /etc/sysconfig/network-scripts/ for centos or fedora) for new interface
  6. restart network

https://forums.virtualbox.org/viewtopic.php?f=7&t=43090

Tags: , , ,

wifi antenna
No Comments

Posted by perkins on 18 March 2012 in IT, l_eng | Short Link

I had annoying problem with radio link quality in my house.  I am determined to avoid multiple AP (access points) design to cover all rooms in both 2 floors. Main problem, as I understand, is the necessity for radio wave to penetrate walls at sharp angles. I alleviated such a curse by moving out the AP away from the house for 3 meters, which didn’t solve the problem entirely anyway. dd-wrt, installed on my AP, allows to boost the output power, which didn’t help either. I’ve replaced stock antennas with parabolic one, which  didn’t help much, probably because with such an antenna radio signal is concentrated in one direction, while I wanted to cover wide area in both vertical and horizontal dimensions. So, at the time being very skeptical about fiddling with antenna, I tried collinear antenna, described over here:

http://martybugs.net/wireless/collinear.cgi

It proves to be exactly what I need. While I didn’t get substitution for my wired network (throughput rate is limited to something 1.2-2.5 Mb / per second in most areas of my home), the connection become persistent – I didn’t notice any single annoying interruption  within a month, during which new antenna was in operation.

It proves to be very easy to assemble the antenna. I have used, as the author, a length of electrical copper wire. Measurement have been done with standard ruler allowing for mediocre precision at best (I think I did manage to keep to schema measurement within 1-3 mm of given specification). My modification to the original design was just connectors: I’ve utilized existing antenna cable, by cutting one end and soldering it directly to the antenna, leaving connector on the other (AP) side untouched. As some folks says, it  shall save some 1-2 dbi. There was no hassle with the alignment of the antenna on installation at all.

I have very little to add to the original article, which is fairly comprehensive. One thing that perhaps might be exposed in greater details is this: shaping the copper wire. I know, while for most of skillful man and women around this task is easy enough, some people might find it useful.

   First, bend 90 degree angle. Then, I used spare AAA battery (it will not be crippled, so it can be used than again) to wrap the wire around it. Copper is soft, so no great deal of strength is required.

 

 

 

 

 

Here the loop is finished. As the original articles suggests, I’ve avoided the coils to touch each other

 

 

 

 

Here, kind of ‘final tuning’ of a coil. The final shape is far from catching the eye, not to say pretty ugly, but it is concealed in a plastic pipe, and, most importantly, it works.

 

Tags: ,

No Comments

Posted by perkins on 23 February 2012 in IT, l_ru | Short Link

Вот такую рекомендацию я вычитал на одном из русских форумов в отношении качества / размера кодированных фильмов:

==================================================
для определения качества обычно высчитывают коэффициент bits/(pixel*frame)

Если он 0.17 – 0.20 (или более), рип будет хорошим. Если меньше – может быть тоже неплохим, но на динамических сценах будут заметны артефакты, типа квадратиков и прочее из-за потери детализации (в пользу меньшего размера).

Теперь посчитаем. Количество кадров 1ч 28м 11с * 29.97 = 158571
Размер звуковой дорожки 448 / 8 * 1ч 28м 11с * 1024 = 289МБ
Размер видео 4.37ГБ – 289МБ = 4397932544 байт

Теперь считаем коэфф

4397932544 * 8 / (1280 * 720 * 158571) = 0.24, что даже несколько избыточно (но делать рип меньше размера болванки не вижу смысла)

Для того рипа, на который ты прислал ссылку (не буду вдаваться в столь детальные расчеты, воспользуюсь программкой ) получим 0.156. Что в принципе тоже неплохо, но ниже уровня качества.

Я редко опускаюсь ниже 0.17. Только для оч длинных фильмов, которые не хочется разбивать на неск-ко болванок.

Tags: , ,

No Comments

Posted by perkins on 13 February 2012 in IT, l_eng | Short Link

In open office, there is annoying thing with printing documents: it always print to the default paper tray. The solution was easy: change ‘printer language type’ from ‘PDF’ to ‘Postscript (level from driver)’ – this setting can be found here:

File->Printer settings->Properties->Device tab->Printer language type.

Now, I can select what paper tray printer will take paper from. This problem I had with HP  P4014 printer.

Tags: ,

Best Practical: Barcelona RT seminar
1 Comment

Posted by perkins on 29 November 2011 in IT, l_eng | Short Link

There were just above 15 of attendants in small class with some supply of coffee, snacks and water during the classes. As far as I remember, most folks were from Spain (obviously), German and Norway (sorry, if I am totally wrong).  I was definitely the most hopeless attendee among them.  Seminar had been conducted by Kevin Falcon, smart, energetic, very well prepared and very well experienced Best Practical’s engineer.  Within 2 days  he seemed to touch any existing technical perspective of the Request Tracker.  I would want to listen more on tackling specific user cases, implementation of various work flows and conditions. Most probably, it is neither possible nor practicable to combine coverage of low level technical details together with studying of ‘high level’ development methods and approaches. For sure, there were no room for both in 2 working days session.

The seminar provided me with deep and extensive appreciation of RT features and potential (within my abilities, of course). Definitely, my plans in respect of information system, employed in our office, must be, hmm, corrected. A bit.

An extra side note: I’ve never seen this number of Macbooks in a single room .

Barcelona. Again
No Comments

Posted by perkins on 29 November 2011 in l_ru, notes | Short Link

Барселона – это косые линии и огни. Море света – диву даюсь, откуда у них столько электричества? Светильники все разные и их миллион. Вообще декорации на улице высшего качества: увы, Кипр в этом смысле похоже отстал навсегда. Пешком иду из отеля на семинар, прохожу студенческий городок, несколько жилых кварталов, странное сооружение (мусорная станция?) и военный городок, хотя скорее настоящий форт. Вот уж никогда не спутаешь, где ты находишься. В отличии от Лондона, тут нет  двухэтажных бесконечно унылых строений из красного кирпича с канализационными трубами по стенам. Ну с Россией лучше вообще не сравнивать.

Косые линии – и от приличного перепада высот, и от изобретательности, наверное. Самые обычные жилые пятиэтажки превосходно декорированы. Чистые мусорные баки словно с выставки. От прогулок по улицам ощущение пространства: много расточительно разбросанных “нефункциональных” элементов городского пейзажа. Там, где на Кипре стояла бы обычная бетонная стена, тут – ограждение в двух плоскостях с точно вымеренной горизонтальной линией и облицованное грубым камнем. Вообще тут понимаешь, что с облицовочным материалом на Кипре хреново, а сллово “дизайн” имеет другое значение.

70 Евро за ночь – очень дешево, на мой взгляд, для отеля такого уровня, гдя я провел 3 ночи.  Кто-то в мое отсутствие трижды обмотал цепочку от пробки в ванной вокруг шланга душа. То ли времени много, то ли руки так устроены. То ли мне делать нечего, как обращать внимание на такую ерунду.

Пожалуй впервые в коммандировке, вот уже второй день, живу на 20 евро в сутки, 10 из которых уходит на интернет. Семинар, к сожалению, отличный: загрузили по самые здрасте и времени на шатание по городу не осталось. Посему завтра покину Барселону с легким чувтсвом неудовлетворенного любопытства, что в общем то неплохо для стимуляции дальнейших путешествий.

Tags: ,

xfce / keyboard layout switch
No Comments

Posted by perkins on 13 November 2011 in IT, l_eng | Short Link

I am fed up with new fancy unity environment – the responsiveness of the windows simply deteriorated during the session on my Vaio VPCY11S1E laptop. The unity’s ‘external’ design is promising, but the implementation, imho, is not for long hours workers. 2D alternative lacks basic customization tools (you can’t, for example, change the size of the launcher’s icons), have no handy transparency option by design, so I quit before I tested it any further.

I am also not big fun of new Gnome: I didn’t find the idea to hide out list of open windows contributing to productivity. I would say, I am of quite opposite opinion. And constant multi-pulit zoom in – zoom out upon switching between the windows makes my sleeping acrophobian quirks to annoy me even more.

I am as much disappointed as I was when KDE had introduced their plasma desktop, which pleased the eyes, but made routing working with the desktop miserable.

So, as many I suppose, I opted for XFCE. I’ll not advertise here this gdm – enough to say that I  like it, it does have anything I need, it is lightweight and have pleasant outfit.  The problems:

XKB keyboard layout plugin. This plugin supposed to provide with switch capabilities, interface for customization and indicator icon in notification area. While the latter probably works fine, the first two unfortunately are not very useful. My current workaround for multi-lingual installation is this:

  1. Create executable file somewhere (/home/me/bin/set_keyboard):
    setxkbmap -layout "us,ru" -option "grp:alt_shift_toggle"
    
  2. create  file somename.desktop in directory /home/me/.config/autostart
    [Desktop Entry]
    Version=1.0
    Encoding=UTF-8
    Name=Script
    Type=Application
    Exec=/home/me/bin/set_keyboard_layouts
    Icon=
    Terminal=false
    Hidden=false
    GenericName=
    

Ubuntu 11.10 / Vaio Y series / VPCY11S1E
No Comments

Posted by perkins on 5 November 2011 in IT, l_eng | Short Link

Working 3rd day with the new distro. Finding so far:

  1. backlight / screen brightness is not working. Solution remains the same, as with previous Ubuntu distros (here).
  2. USB ports are dead on weak up from suspend.
  3. Virtualbox running WinXP guest machine drops current session after weak up from suspend.
  4. The display GUI manager works OK except one sequence: after switching from laptop screen to external screen, the latter view is scrambled. If both screen, on laptop and the external are on, there is not problem. Solution: use xrandr to manipulate output of Xserver.
  5.  Sound output to on-board speakers do not switch off if headphones are plugged in.

Copyright © 2006-2012 dimonf All rights reserved.
The Shades theme, version 1.8, is a BuyNowShop.com creation.