Linux, bash, python recepies

Alexander Bolotov blog

Sunday, September 27, 2009

moar browsers!

At Government Commission on the Federal Communications and Information Technology  of Russian Federation they decided to create Internet-browser for use in russian governmental departments which will prevent govermental users from transmiting their valuable personal information etc. A solution could be to develop a new browser rom scratch, proxy server or just browser plugin that helps protect users' activity profile for their work on the Internet. They'll definitely 

But I'd rather used "private browsing" feature of existing browsers using tor network and avoiding pr0n sites :) instead of wasting million$ on pointless development inventing bicycles.

Source: osp.ru

Saturday, September 26, 2009

moar domainz!

Russia will probably have another one TLD soon (they already have .ru and .su). Now it will be international domain name ".рф". So now they could register дюссельдо.рф, for example, which will be encoded in punycode like: xn--d1aacyqoa4gn.xn--p1ai . Probably a bit later other internationalized domains will appear. It would be cool to have klingonian, martian or elven domain names.

Source: za-rf.ru

Monday, September 7, 2009

CMSs for Google App Engine

Google App Engine CMS comparison list:

So after some considerations I accidentally decided to fork django-cms-2.0. It would be hard (at least for me) to totally rewrite Django model to GAE model and to get rid of django-mptt (and|or) maybe of django-reversion (do I need them when I have datastore?). That sounds like absolutely different software. So maybe I'll write my own just from scratch but a bit latter.

Saturday, August 22, 2009

Tea for beta-testers

Thursday, August 7, 2008

GotoXY in python

To print character at location X, Y in python you can use
print('\033[8;9Hanything')
or
sys.stdout.write('\033[8;9Hanything')
8 and 9 are coordinates and 'anything' is the text, that you wanted to print

Tuesday, April 8, 2008

Disabeling AutoRun (Disabling AutoRun)

Ridding of aw(ful|esome) volish feature...

Here is some tricks, that will prevent autorun.inf from doing (nasty|useful) things. You can use all of them to feel safer (I am not joking :) :

1. Per drive type registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun

To set permissions individualy for each one type of drive, just evaluate NoDriveAutoRun by adding numbers in table to 80 hex value (128 decimal). But I think, it is safer to forbid AutoCrap on all drives by setting NoDriveTypeAutoRun to 0xFF.

Variable Number Hexadecimal
Drive type(s)
DRIVE_UNKNOWN 1 0x1
DRIVE_NO_ROOT_DIR 2 0x2
DRIVE_REMOVABLE 4 0x4 Disk can be removed from drive, such as floppy disk, removable cartridge
DRIVE_FIXED 8 0x8 Disk cannot be removed from drive, such as hard disk
DRIVE_REMOTE 16 0x10 network drive
DRIVE_CDROM 32 0x20 CD-ROM drive
DRIVE_RAMDISK 64 0x40 RAM disk

But *surprise* some viruses can re-enable autorun again (just for example: Win32.Worm.Autoit.E).

2. Per drive letter registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveAutoRun

Each bit of the value corresponds to drive letter (so 0xFFFFFFFF forbides autorun on all drives):

_____yzx wvutsrq ponmlkji hjfedcba
00000000 00000000 00000000 00000000

3. Restricting AutoRun by Group Policies:

Run gpedit.msc. Expand following nodes:

Computer Configuration\Administrative Templates\System\Turn autoplay off

Set "Turn autoplay off" to "Enabled" (by default it is "Not configured").

4. Restricting AutoRun by Software Restriction Policies:

Run gpedit.msc. Expand following nodes:

Computer Configuration\Windows Settings\Security Settings\Software Restriction Policies

Right-click on "Restriction Policies" and select "Create new Policies"

Now you can add autorun.inf (to disable it execution everywhere) in ruleset "Path" or you can add E:\autorun.inf (for example), to disable it on that drive.

Wednesday, March 19, 2008

Playing music with bash and mplayer

Playing with mplayer all files from current directory and subdirectoris recursively

find . -type f -exec mplayer {} \;