Skip to main content

Міжрегіональний центр видачі паспортів – подача документів

Оновлено: Паспорт я отримав.

Через 5 років після того, як я отримав свій перший закордонний паспорт, в ньому закінчилися сторінки для віз. Варіантів отримання нового – два, за місцем прописки (м. Бровари, де “немає апаратури”) або міжрегіональний центр видачі паспортів, що в інтернеті відомий як http://passport-ua.org.

На сайті присутня можливість запису у електронну чергу, але через те, що кількість місць у електронній черзі приблизно 10 на день, то протягом перших секунд восьмої години ранку (коли “відкривається” запис) розбираються всі наявні місця.

/galleries/dropbox/passport-ua-road.jpg

Але можна приїхати туди і без запису. Різні джерела свідчать про різні часові проміжки, комусь пощастило приїхати і пройти всі процедури після обіду, хтось приїжджав о сьомій годині ранку і записувався у чергу на вхід (відкривається центр о дев’ятій). Я приїхав о восьмій і був тридцятим у списку на листочку на підвіконні.

/galleries/dropbox/passport-ua-index.jpg

Більш логічно було б зробити тільки електронну чергу (наприклад, як в візовому центрі Великобританії), майже всі люди, що були в черзі, перед цим намагалися записатися онлайн.

/galleries/dropbox/passport-ua-building.jpg

Близько дев’ятої години ми пройшли в середину, отримали номери вже у внутрішній черзі. Через те, що я забув оригінал ідентифікаційного коду, довелося повертатися додому і вдруге їхати у центр, за півтори години прийому документи встигли подати 30 чоловік.

Для отримання паспорту потрібні:

  • Оригінал внутрішнього паспорту та 2 копії перших двох сторінок та всіх сторінок з штампами про реєстрацію. Якщо були вклеєні фотокартки у 25 та 45 років, то також потрібні копії сторінок з фотографією та даними про вклеювання.

  • Оригінал та копія ідентифікаційного коду.

  • У разі, якщо попередній паспорт залишається у себе, то також потрібна копія першої сторінки закордонного паспорту.

  • Гроші

Всі копії потрібно подавати на листках формату A4.

Після подання документів потрібно оплатити рахунки у місцевому відділенні Комерційного індустріального банку, який за кожну транзакцію стягує 1% але не менше 10₴. Таких транзакцій буде 5, тож до суми треба додати ще 50₴.

Після сплати рахунків треба чекати на свою чергу на фотографування та перевірку даних, ця процедура чомусь займає найбільше часу.

В моєму випадку на це пішло 8 хвилин, після цього через місяць треба прийти та отримати паспорт.

Upload to Ubuntu One using curl

2012-04-15: I found it easier to work with signed URLs instead of a separate header so the blog post was updated to use these.

I like to find new ways to use Ubuntu One as easily as possible. I have to admit that the way described in headless Ubuntu One article is not quite reliable since the file is read completely into the memory prior to being transferred. For large files this can be a problem. There are ways to make this work for streaming, but while investigating this I found out that we can use curl for uploads and downloads, without any python wrapper.

Basically,

curl -H "Content-Type: text/plain"
    -T filename `oauth-sign -m PUT -f url http://.../~/Folder/filename`

But in order to make it work this way, you need just a tiny bit of preparation.

First of all, you must know that all Ubuntu One clients do not use your password for authentication. Instead, a mechanism called OAuth is used. This means that for every connected device a separate set of credentials is being assigned allowing you to invalidate the access whenever you need and keep the really secret password to yourself.

OAuth is not natively supported by curl but since this is a standard, there are multiple solutions you can use to generate the signed URL as in the example, there are no proprietary extensions or cookie storage.

If you have ruby, installing oauth gem will give you an oauth script. In case you are after the python one, you can grab my implementation from ubuntuone-scripts branch.

First you need to get the tokens, we are using pretty much the same ubuntuone-sso-login.py script I mentioned in the article about the REST client, however in order to make it simpler to pass the arguments to other application, i added the --format (-f) option, which does the following:

$ python ubuntuone-sso-login.py --format shell
Ubuntu SSO Login: sso-test-2@rtg.in.ua
Password:
export OAUTH_CONSUMER_KEY=RwLrAWeWF
export OAUTH_CONSUMER_SECRET=fGztsAJHqfWFirGBwXNhiEinrfqCvDVtEHJ
export OAUTH_TOKEN=HFvMpWiwuOcGOsSSRbkaHZHMARjHZrfYYRa
export OAUTH_TOKEN_SECRET=BjnVKEhQqCaTcHWBEywVGMhlqvtTBzFFeykYC

Copy the lines with export to some shell script file, e.g. ~/.ubuntuone-credentials, we will re-use the names further.

Now create the signed URL with ruby implementation: We are requesting account information, so the URL is https://one.ubuntu.com/api/account/.

$ SIGNED_URL=`oauth --consumer-key $OAUTH_CONSUMER_KEY
        --consumer-secret $OAUTH_CONSUMER_SECRET
        --method GET --uri https://one.ubuntu.com/api/account/
        --secret $OAUTH_TOKEN_SECRET
        --token $OAUTH_TOKEN -v -Q sign | grep 'OAuth Request URI:'
                                    | sed 's/OAuth Request URI: //'`

The weird grep/sed dance is needed to get the URL to the format we will use later, you will not need to do this in python oauth-sign version.

$ curl $SIGNED_URL
{"username": "https://login.ubuntu.com/+id/RwLWeWF", "openid":
"https://login.ubuntu.com/+id/RwLWeWF", "last_name": "Roman"
...

Great, it works. Now let’s work with the actual files.

According to the docs the file root is https://files.one.ubuntu.com/ and PUT is being used to upload the files.

Please note the following paragraph in the docs -

Note also that content_paths may not be rooted under the API root, and may change without warning, so they must be read from the API and not hardcoded.

The current way assumes that the content path is /content/~/path/to/volume/path/to/file.txt, this works for now, but may change in the future.

First let’s construct the URL we will be using

$ URL=https://files.one.ubuntu.com/content/~/Ubuntu%20One/hello.txt

Now we need to get the signed URL. Let’s use the python version. Since it reads the environment variables, there is no need to specify the token:

$ SIGNED_URL=`oauth-sign -f url -m PUT $URL`

Yes, that’s it.

Now create a hello.txt file locally and then upload it with curl, specifying -T makes curl use “PUT” request and transfer the file without buffering it in the memory:

$ echo "Hello, Ubuntu One" > hello.txt
$ curl -T hello.txt -H "Content-Type: text/plain" $SIGNED_URL

{"kind": "file", "public_url": null, "hash":
"sha1:b50a416c31dbf3620b72cd7841980541805db44e", ...

Great! Now let’s get the file:

$ curl `oauth-sign -f url $URL`
Hello, Ubuntu One

Please note that I am specifying Content-Type header too. Usually when you ask curl to upload with --data-binary, it sets the Content-Type to application/octet-stream. This is a mandatory header for Ubuntu One servers. In case you omit the header, you will receive an error.

I have some SQL databases of text messages, expenses and a test openfire installation. I upload the backup regularly to Ubuntu One with the following simple script. I put the OAUTH exports to ~/.ubuntuone-credentials file which gets sourced.

#!/bin/bash

URL=https://files.one.ubuntu.com/content/~/Ubuntu%20One

source ~/.ubuntuone/credentials

for DB in webapp openfire; do
    RESULT=fridge-$DB.sql.gz

    LOCALFILE=`mktemp /tmp/backup-XXXXXX`

    pg_dump -h localhost -U backup $DB | gzip > $LOCALFILE

    REMOTE=$URL/$RESULT

    SIGNED_URL=`~/bin/oauth-sign -f url -m PUT $REMOTE`

    HEADERS=`mktemp /tmp/headers-XXXXXX`
    OUTPUT=`mktemp /tmp/output-XXXXXX`

    STATUS=`curl --silent --fail --dump-header $HEADERS
        -T "$LOCALFILE"
        -H "Content-Type: application/octet-stream"
        -w '%{http_code}' $SIGNED_URL -o $OUTPUT`
    rv=$?
    if [ "$rv" != "0" -o ( "$STATUS" != "201" -a "$STATUS" != "200" ) ]; then
        echo "Backup of $DB failed!"
        echo "The server replied with:"
        echo
        cat $HEADERS
        echo
        cat $OUTPUT
    fi

    rm $OUTPUT
    rm $HEADERS
    rm $LOCALFILE

done

nxtractor: My Simple Data Recovery Application for Linux

Want to recover files? For a proper Open Source data recovery software, see CGSecurity’s TestDisk and PhotoRec.

Once upon a time I had no stable internet connection, mult.ru distributed their “Масяня” movies as .exe files and I was not happy with them on the linux system.

In order to make a standalone movie, flashplayer.exe was simply concatenated with .SWF file, so to get .SWF file I simply needed the offsets and end markers (if any).

I wrote a simple application in C that was doing exactly this.

At some point in time my friend Alex asked me to see whether it is possible to recover any data from his hard drive which had the file system table completely overwritten by something and no data recovery software was able to extract anything.

I dumped the image of the whole 20Gb drive and began thinking about the way the data can be recovered if we don’t know where to look.

And so the nxtractor project was born. During next couple of days I was examining the signatures and markers of the most common file types, wrote the scanner that was sufficiently good and extensible.

I did not recover much information from that drive, the data was too fragmented.

This was back in 2003.

Fast forward to today, when SD cards hold the same amount of data as the hard drives of the past, data storage devices are used by music players, phones and cameras.

Now imagine you have deleted all the photos from the camera. What would you do?

sudo dd if=/dev/mmcblk0p1 of=~/mmcblk0p1.bin
bzr branch lp:~rye/+junk/nxtractor
cd nxtractor
make
./nxtractor ~/mmcblk0p1.bin

Yes, that’s the ideal variant, in some cases you will need to do adjustments to the types.dat file, for example to prevent false positives on TIFF files you comment out the whole type=tiff block. To make sure you are not extracting embedded data in JPEG files, set minsize in type=jpeg to 1000000 which means that it will not consider files that are less than 1Mb to be real jpeg files.

For example, my recent removal of the photos resulted in the following:

nxtractor ~/mmcblk0p1.bin
Scanning started at Sun Mar 18 13:34:01 2012
@365056: Found magic numbers for jpeg. Size: 1043563
@1413632: Found magic numbers for jpeg. Size: 1249863
@2691584: Found magic numbers for jpeg. Size: 1225140
@3936768: Found magic numbers for jpeg. Size: 726782
@4690432: Found magic numbers for jpeg. Size: 685591
@5378560: Found magic numbers for jpeg. Size: 860730
@6263296: Found magic numbers for jpeg. Size: 712114
@6984192: Found magic numbers for jpeg. Size: 757930
@7770624: Found magic numbers for jpeg. Size: 872590
...
@59707904: Found magic numbers for jpeg. Size: 1775034
Scanning finished at Sun Mar 18 13:34:05 2012
Extraction started at Sun Mar 18 13:34:05 2012
Writing mmcblk0p1.bin.nx/jpeg/365056.jpg (1043563 bytes)
...
Writing mmcblk0p1.bin.nx/jpeg/59707904.jpg (1775034 bytes)
Extraction finished at Sun Mar 18 13:34:05 2012
/galleries/dropbox/nxtractor-result.png

And I got my files back! Several years after I wrote the software. It’s amazing :)

This software is provided AS IS and I have no plans developing it any more, use at your own risk…

And please, backup your sensitive data. NOW.

Setting up my Xerox WC3119

I am doing this over and over again. Along with writing puppet config I am posting the recipe for my WC3119 configuration here in case somebody finds it useful too. I will describe the setup of Xerox WC3119 for remote printing and scanning in Ubuntu Precise Pangolin (12.04).

Read more…

Весы Tefal и ошибка 114

/galleries/scales/scales.jpg

В 2010-м, через год после покупки весов Tefal PP1051, последние начали показывать 114 вместо веса. Сегодня Оксана окончательно на них обиделась, и я решил узнать, есть ли у кого-то еще такая проблема. Когда это только началось, я не мог найти никакой информации о том, как их разобрать и что на чем держится, а многочисленные попытки обнаружить крепления не увенчались успехом.

Но сегодня быстрый поиск в гугле привел к посту Славика на сайте магазина Fotos (где, кстати, мы их и купили).

Сегодня отдали с угрозой не возьмешь – выкинем напольные весы Тефаль (модели нет, т.к. без стикера, но на картинке точно они:

Проблема на индикаторе веса значок _| при надавливании пальцами на дисплее что-то по-сегментно отображалось, видимо на него наступили.

Вскрыл, поддев двумя отвертками, разобрал блок индикатора, протер пластиковый токопроводящий “шлейф” между платой и ЖК спиртом, собрал – заработало. (был перекос платы от механического воздействия).

разберите и протрите все контакты. мне помогло

Значит, их все-таки можно разобрать.

Надо снять ножки, вставить какой-то плоский предмет в щель и отогнуть защелку в каждой из ножек.

/galleries/scales/image1.jpg

Вот знакомые цифры:

/galleries/scales/image2.jpg

Эти контакты я почистил, и все снова заработало!

/galleries/scales/image3.jpg
/galleries/scales/image4.jpg

При разборке желательно отщелкнуть все крепления, перевернуть весы и снять верхнюю панель, иначе выпадут пластины с датчиками. В таком случае их нужно вставить назад схемой вверх.

/galleries/scales/image5.jpg

Судя по всему, 114 появляется, если не удается прочитать информацию с датчиков. К сожалению, об этом нет никакой публичной информации.

Charge attempt for canceled Zune trial

So, i signed up for a 14-days free trial on Zune.

I played with the software a bit and then decided to cancel the free trial after 10 days. I had my PayPal account attached to my Live/XBox account so all the charges originated there are automatically processed.

A good thing with Ukrainian banks is that when you sign up for an SMS banking, you will get notifications about every transaction attempt. And, thanks to proper mental state of the industry, there are no NSF fees, unlike some parts of the world.

So I got a notification today at 2AM that there was a charge attempted. My PayPal account is connected to a card I top up with the exact amount I plan to spend, nothing more. And should I left some extra cash there I could have been charged for £8.99 (I created the account while I was in the UK).

As a confirmation of the attempt I got the message from MSFT ZUNE:

We are contacting you because we have been unable to charge your PayPal Account for your 1-month subscription service(s) being billed to you through Microsoft Online Services. The following PayPal Account is the current payment method on your billing account:

The site itself tells a different thing:

Try it free

The low risk way to try before you buy. Enjoy the full Zune Music Pass benefits free for 14 days (Trial continues to paid subscription).**

...

** Free 14 day trial will automatically continue to a paid subscription unless cancelled before the end of the trial period. Limit 1 trial per person.

Published the question on the Zune support forums.

Vala and DBus

http://ubuntuone.com/1KneGMNdDYv7UGwFevbhSC

Once in a while I return to the idea to write something in Vala. Vala's integration with Glib and Gnome is outstanding, you can write a useful DBus client in 10 lines, compile and run at native code speed without any scripting language interpreter overhead.

Ubuntu One filesync service exports a ton of DBus methods that are then used for the Control Panel, nautilus plugin, rhythmbox music store plugin and others. All the communication between the clients and the service on Ubuntu is based on DBus.

So, let's make a client that asks syncdaemon for a list of all published files and prints it out. Before we start, we need to find out what methods and signals are actually exported.

Read more…

SSH attack passwords

http://ubuntuone.com/6LUt1E8ClN1HKbkzgr2CLT

I am running a few Ubuntu installations connected to the Internet. As you may know, once machine is connected to the Internet, it is subject to various hacking attempts, both automatic and manual.

The most widespread attack vector for *nix machines is SSH brute-forcing. I once became a victim of such attack and now all my machines are using SSH public key authentication only. I was curious what passwords the attackers were using so I came up with a simple idea of password collection.

Read more…

Varta Professional USB Charger

As the old joke goes, “you cannot lose an android phone because it is always near the power socket”. For me this is exactly what I am experiencing with my Acer Liquid E. Whenever I am using it for browsing the Internet via WiFi or 3G, I can discharge it completely in 2 hours.

So right before we went on a bus trip to Norway I decided to find out what are my options to get extended battery life for my phone.

Of course, there are high capacity battery for all normal phones. Unfortunately, not an option for mine.

My wife is also using an Android-based HTC Desire Z, so charging different devices is definitely a plus.

Also, we have cameras that take AA batteries and the ultimate choice would be able to charge external batteries too.

Well, Varta USB Charger from their “professional” line is that ultimate device.

/galleries/dropbox/varta-charger-1.jpg

It can:

  • Charge USB devices using the power from AA/AAA batteries installed or the power outlet (effectively making this unit a wall outlet USB charger).

  • Charge 1-4 AA/AAA batteries from USB devices using a USB-to-5V cable (included)

  • Charge those batteries from the wall outlet adapter.

So, your capacity basically depends on what batteries you chose. The unit I purchased came with 4xAA batteries of 2700mAh. I purchased another set as a backup.

/galleries/dropbox/varta-charger-2.jpg

It turned out that one set of these batteries can charge a phone and a half completely. Also, we were able to charge 2 phones simultaneously using an USB hub – pure awesomeness!

It is worth noting that when the unit functions as a USB charger from wall outlet, it does not charge the batteries. When functioning as AA/AAA charger it tracks every single battery charge separately.

The only minor issue I found so far is that when the batteries are almost depleted the current converter starts producing a long squeaky sound until it shuts down.