Stand Alone

Stand alone блог – отличный шанс почувствовать свою независимость в сети на миг, а потом потерять весь интерес к блоггингу.

Еще это отличный шанс быть, у всех на виду, но при этом оставаться совершенно невидимым. Как в Московской толпе – все смотрят мимо тебя. Так же и этот блог, с четырьмя стами хитов в месяц, из которых 95% спамботы. Блог есть, но есго никто не видит, хоть он и близко. Зато можно кричать. Можно ворваться в кишащий хаос вбеа и заорать во весь голос, переходящий в ультразвук, а потом затухающий хрипотой. И никто даже не обернется. Никто не зматит.

Here I stand among the crowd of web. Alone.

Smooth Transition

Слишком часто встречается явление, когда один человек начинает всречаться с другим, не расставаясь с предыдущим. И плавно переходит из рук в руки. Это есть проекция капиталистического взляда на вещи, когда хочешь больше, но не хочешь терять того, что есть. Через риск, ложь переводишь себе на баланс более качественный, лучший объект. Прямая монетизация отношений. Это не работает в долгосрочной перспективе. В долгосрочной перспективе работает честность.

T1 logo in JS+PNG

Initially, my logo was 105K GIF. Now it’s transparent PNG+JS. As easy as:

            //
            var color = 0;
            var interval = 60;  /* time msec, after which color changes */
            var clrInc = 4;     /* HSV degree increment */
            function chcolor(){
                var t1_logo = document.getElementById("t1_tl"); /* div_to_animate */
                color < 360 ? color = color + clrInc : color = 0;
                t1_logo.style.backgroundColor = "hsl("+color+", 100%, 50%)";
            }

            function stchcol(){
                var logoChCol = setInterval(chcolor, interval);
            }
            window.onload = stchcol;
            //-->

and

Main page

Benefits are smaller page size, smaller prcessor load. Eventuall, animation in JS consumes lees resources than a GIF rendering. 35% losad with GIF animation vs 15% load with JS animation. At least, in Fedora 16 with nouveau.

The idea was given to me by fiskus, but it was quite a long ago, so I feel I had the same idea at the moment he suggested it to me. Nevertheless, he desrves a credit.

Bringing Cisco IOS CLI to Linux CLI

There are few people on the globe who loves to work with Cisco and Linux via CLI. These people might have issues with trying to apply Bash/Vim syntax to IOS and vice versa. I’m certainly one of them. That’s why I can do the followng in my Bash:

$ show .bashrc | i return
[[ "$-" != *i* ]] && return
#     return 0
#     [[ -z $adir ]] && return 1
#   [[ $? -ne 0 ]] && return 1
#     [[ $? -ne 0 ]] && return 0
#   return 0

It’s very handy for checking Cisco configs, stored on a Unix machines, without inverting your mind out. In fact, if you are in rush and tried to apply IOS syntax to Bash, you won’t be distracted by an error message, but you’d get a result you reqired.

$ show samle_conf.cfg | i spanning-tree
spanning-tree mode rapid-pvst
spanning-tree etherchannel guard misconfig
spanning-tree extend system-id
spanning-tree pathcost method long
 spanning-tree portfast
 spanning-tree portfast
 spanning-tree portfast
spanning-tree bpduguard enable
...

It’s achieved very easily. You need to add some aliases to your ~/.bashrc file and relogin:

echo 'alias show="cat"' >> ~/.bashrc
echo 'alias i="grep --color"' >> ~/.bashrc

Fixing SSH access on cisco via SNMP

Sometimes you may ecounter a situation, when your SSH is not properly configured, for example, if you forgot to generate SSL certificate before enabling transport input ssh on all vty lines, as I recently did. In this situation you might be lucky enough to have SNMP RW community string configured. In this situation you can fix literally everything.

There are no many configurable settings on cisco can be done via SNMP. But you can copy a prepared config to device via TFTP, RCP etc. You may download current device’s config to tftp server, edit necessary lines and upload it back. You may upload it to either running config, startup config or a flash file.

To download running config:

snmpset -v 1 -c rw_community hostname ccCopyProtocol.13 i 1 
snmpset -v 1 -c rw_community hostname ccCopySourceFileType.13 i 4 
snmpset -v 1 -c rw_community hostname ccCopyDestFileType.13 i 1 
snmpset -v 1 -c rw_community hostname ccCopyServerAddress.13 a tftp_serv_ip
snmpset -v 1 -c rw_community hostname ccCopyFileName.13 s "file_name" 
snmpset -v 1 -c rw_community hostname ccCopyEntryRowStatus.13 i 1

Edit on the server, and upload it back by the following commands. Be careful! If you upload to startup-config, IOS will not merge the uploaded config and the startup one, it will replace it instead. Do not upload partial sets of commands!. TO be on a safe side always I recommnd to never upload partial configs. Only necessary lines should be added/cancelled/corrected and the whole config should be uploaded.

snmpset -v 1 -c rw_community hostname ccCopyProtocol.13 i 1 
snmpset -v 1 -c rw_community hostname ccCopySourceFileType.13 i 1 
snmpset -v 1 -c rw_community hostname ccCopyDestFileType.13 i 4 
snmpset -v 1 -c rw_community hostname ccCopyServerAddress.13 a tftp_serv_ip
snmpset -v 1 -c rw_community hostname ccCopyFileName.13 s "file_name" 
snmpset -v 1 -c rw_community hostname ccCopyEntryRowStatus.13 i 1

If you ecountered situation with SSH with no generated certificate, You config might look like this:

line vty 0 4
 length 0
 transport input ssh
line vty 5 15
 transport input ssh
exit

You should fix it to:

line vty 0 4
 length 0
 transport input telnet
line vty 5 15
 transport input telnet
exit

Some commands can be cancelled with “no ” statment before the command. Some, as in above case, not.

Fedora LXDE UI Improvement Tips

Touchpad vertical scroll:

in file /usr/share/X11/xorg.conf.d/50-synaptics.conf

Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "VertEdgeScroll" "1"
EndSection

Option “VertEdgeScroll” “1” – adds vertical scrolling

Restart X to take effect.

Adding keyboard layouts:

In file /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf

Section "InputClass"
Identifier "system-setup-keyboard"
MatchIsKeyboard "on"
Option "XkbModel" "pc105+inet"
Option "XkbLayout" "us,ru"
Option "XkbOptions" "grp:caps_toggle,grp_led:num,terminate:ctrl_alt_bksp"
EndSection

Define layouts to be used
Option “XkbLayout” “us,ru”

Define switching keys:
Option “XkbOptions” “grp:caps_toggle,grp_led:num,terminate:ctrl_alt_bksp”
grp – key to switch
grp_led – Keyboard LED to highlight a layout
terminate – shortct to kill X

Restart X to take effect.

Поздравления

Приз за лучшие пожелания с др уходит к моему одногруппнику:

“желаю тебе стать большим человеком в ай-ти-индустрии, выкупить гугль с потрохами и зверски пытать этих мудаков, злобно хохоча. И самое главное, желаю тебе научиться стрелять лазером из глаз”

ЛАЗЕРОМ ИЗ ГЛАЗ!

Он же подарил мне первый в жизни цифровой подарок:

Спасибо, Леша!

0x18

Another Beautiful Data Center Photos

Another set of DC-pics. This time from Russian local search engine Yandex.

yandex data center

yandex data center

yandex data center

Some more pictures are available here.

ZOMG TEH white tiamat.name!

Hello dear RSS readers and others who never saw my front page. It’s time for prayer. Dark lord Tiamat changed his homepage design to… white colors! New design is approved by muslim, orthodox, mormon and satanic churches, is holy, is awesome, finds water, contains positive energy flows, brings luck to every visitor (share links). Dear readers, do you like it?