5/21/12 12:25 pm - Better MySQL output formatting: what a life saver!
Also published here.
Instead of the usual
SELECT * FROM users WHERE uid=1;type
SELECT * FROM users WHERE uid=1\Gand enjoy a much better formatting!
You are viewing
mikhailian's journal
Also published here.
Instead of the usual
SELECT * FROM users WHERE uid=1;type
SELECT * FROM users WHERE uid=1\Gand enjoy a much better formatting!
Also published here.
Internet trolls are using Tor nowadays to avoid bans by IP. However, banning Tor exit nodes is just slightly more complex. The Tor Project provides a regularly updated list of exit nodes that can access your IP here. As there may be many hundreds or even thousands of nodes, adding them to iptables can hurt your server's network performance. Enter ipset, a user-space hash table for iptables:
# create a new set for individual IP addresses ipset -N tor iphash # get a list of Tor exit nodes that can access $YOUR_IP, skip the comments and read line by line wget -q https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$YOUR_IP -O -|sed '/^#/d' |while read IP do # add each IP address to the new set, silencing the warnings for IPs that have already been added ipset -q -A tor $IP done # filter our new set in iptables iptables -A INPUT -m set --match-set tor src -j DROP
Also published here.
EU Observer runs a report on Belarus. See this gem: Earthquake zone on EU border to host Belarus nuclear plant.
Earthquake zone…
Also published here.
Assuming that the internal screen is LVDS and the external screen is DVI-0. inotifywait comes from the inotify-tools package.
# Wait for the changes detected by the kernel laptop mode.
while inotifywait -e modify /proc/sys/vm/laptop_mode do
laptop_mode=`cat /proc/sys/vm/laptop_mode`
# If on battery, switch on the internal screen.
if [[ $laptop_mode -gt 0 ]]; then
xrandr --output LVDS --mode 1280x800
xrandr --output DVI-0 --off
# Otherwise,
elif [[ $laptop_mode = 0 ]]; then
# if the external screen is connected, switch it on.
if [[ `xrandr -q|grep DVI-0|cut -f2 -d\ ` = connected ]]; then
xrandr --output DVI-0 --mode 1920x1200
xrandr --output LVDS --off
fi
fi
doneAlso published here.
И выдержал ровно сутки. Половины музыки, которую я слушаю, у них нет. При регистрации через фейсбук linux-клиент Spotify уведомляет (sic!) что будет анонсировать музыку, которую я слушаю, в фейсбучный timeline. Без спросу индексирует всё музыку на компьютере. К чёрту.Also published here.
I bought an HTC Desire S smartphone in June. Since then, I sent it three times for repair to Dynafix, which is apparently the HTC Repair Center for Belgium. For the 3rd time, Dynafix replaced the mainboard for my phone, which fixed the original problem. However, I quickly noticed a new and easy to reproduce problem that I communicated to the HTC call center. I was told over the phone that I will get a replacement unit.( Read more... )Also published here.
I bought a Desire S smartphone a little more than 2 months ago, but did not have a chance to really use it, yet. It came with an elusive and odd bug. The touch screen stopped responding once in a while. This could occur any time, but seemed to happen less frequently after 5-10 minutes of active use.
The first time I sent the phone to repair, it came back with flashed ROM, but the problem stayed.
The second time I sent the phone for repair, it came back with a new touch screen, but the problem stayed.
( Read more... )Also published here.
My first request for number porting from the Proximus mobile business acount of my former employer to Mobile Vikings dates from 6th of June. A few dozen emails, several phone calls and one complaint to the Telecom Mediator later, I had my phone number ported to MobileVikings today, July 29.
Also published here.
Three days ago, I got my hands on the HTC Trophy 7 running Windows Phone 7. Until now, I played occasionally with Android, but never used a smartphone.
Here's a list of things I'd like to do on the smartphone:
In the process, I'd rather not to reveal too much personal information to Microsoft. The wishlist looks simple, huh? Let's see what I managed to do.
( Read more... )Also published here.
Also published here.
This is how the Belgian public credit risk insurance body evaluates risks in select world countries. The country that has the world record of being without the government is rated best, the other, buried down in a full-fledged civil war, is just marginally worse, and the most stable political regime on earth is very risky.

Also published here.
В этих самых интернетах очередной скандал: все сливают некую российскую компанию, которая продаёт некачественные автокресла в интернете.
По поводу автокресел в 2008 году вышло исследование американского экономиста Стивена Левитта, который более известен как автор книжки Freakonomics. Стивен на свои деньги заказал испытания ремней безопасности по программе испытаний автокресел. С макетами детишек разных возростов, датчиками, замедленной съёмкой. Короче, полный фарш.
( Read more... )Also published here.
The recent Doing Business '2011 report states on page 98 that Belgium has no limit on the maximum length of fixed-term contracts. AFAIK, this is wrong. The maximum length of fixed-term contracts is 2 years (exceptionally, 3 years). In some sectors, this is down to 6 months. My knowledge dates from 2007, but I bet nothing changed since then.
( Read more... )Also published here.
I recently bought an Asrock ION 330 Pro HTPC which supports VDPAU, an NVIDIA API for Linux that offloads parts of video processing to the GPU. The upgrade from the old HTPC went smoothly with a mere dd if=/dev/sda of=/dev/sdb and a few system tweaks. However, it turned out that Mplayer in Debian Lenny that I was running on my new HTPC box did not support VDPAU. Checking the usual places, like backports and debian-multimedia did not help, either.
( Read more... )Also published here.
Картинка из детской книжки про Хеллоуин. Избушка montée sur des pattes de poule, ага. Но на двух, а не на шести. И летает не в чугунном котелке, а в деревянной ступе (pilon en bois!).
Also published here.
Вчера смотрел последнюю серию Lie to me, там Лайтман вымучивал из себя книгу на новеньком макбуке, параллельно расследуя некое происшествие на конкурсе красоты. Вымучивал он книжку на протяжении всей серии, а под конец показали кадр, в котором он сидит за ноутом с виндовс и упоённо строчит текст новой книжки.
«Сядь за венду, займись делом.» © popular stereotypeAlso published here.
Even Metro can be source of insightful information. Look, 1.4 mln belgians get luncheon vouchers, 0.35% of luncheon vouchers stay unused, so how much do the distribution companies pocket each year on these unused luncheon vouchers?
Also published here.
В продолжение этой истории, первое дело, связанное со слежкой за учениками с помощью школьных компьютеров, выиграли ученики. Правда, львиную долю денег всё-равно получил адвокат.
Also published here.
La Première a annoncé aujourd'hui dans son journal de 9 heures le limogage du maire de Moscou Yuri loujkov, qu'ils ont prononcé comme [jʊri jʊjkov]. Le nom du maire est Юрий Лужков, transliteré le plus souvent comme Yuri Loujkov et prononcé comme [jʊri lʊʒkof].Also published here.
Look at the list of 100 most popular professions in Belgium. Sales and medical care jobs are topping. There are two times more public administration workers than IT workers, but IT workers already outnumbered accountants and haulers.Also published here.
disgraceful degradation [dɪsˈgreɪsfʊl ˌdɛgrəˈdeɪʃən]
vulg.
Degradation in website usability for Internet Explorer 8, 7 and 6 users, done on purpose.
Also published here.
«When I use a word, Humpty Dumpty said in a rather a scornful tone, it means just what I choose it to mean — neither more nor less». © Lewis Carroll
Check out that article from Metro. Seems like the text was written by the Belgian anti-piracy association, and the title — by a Metro editor who tried to please the public by indicating that some still like belgian music and movies.
Now, do the numbers given in the article make any sense to you? What would have changed if they were divided by 100 or multiplied by 1000?
Also published here.
Belgium has a multitude of e-government solutions. Local residents have now ID cards in the form of a banking card with a chip, there are services to order certificates online with these cards, pay taxes and check for medicines.
( Read more... )Also published here.
Моряки учебного парусника «Мир» в порту Антверпена. Интересно, им всем Acer'ы выдают, или так случайно получилось?
Also published here.
Also published here.
First appeared in westartup.eu
Nowadays, IT companies do not rely on intermediates when looking for new employees. They use the Jobs sections of their websites, advertise on Stepstone, Monster or LinkedIn. They use the power of the word-of-mouth. In the ongoing battle for the new talent, the attractiveness of the job ad for the company is as important as that of the resume for an applicant. However, many IT job ads are written either by the middle management or by HR, that is, people who are likely to miss the most attractive features of the new position by sheer lack of domain knowledge.
( Read more... )Also published here.
First appeared in westartup.eu
The eID is not only a small piece of plastic that replaces your old cardboard national ID card, but a means to electronically sign legally binding documents.
( Read more... )Also published here.
Appeared originally in westartup.eu.
There are already some FP7-related services, two clicks from the google home page, but they are mostly about consulting or badly written tools that none uses anyway.
( Read more... )Also published here.
Originally published in westartup.eu.
As usual, the US is ahead of the rest of the world with the law.gov initiative that formalizes and makes available in a useful way all existing information pertaining to the country's legal system. It is important to change the lawmaking processes so that they create data in ways that are immediately useful by services like law.gov.
( Read more... )Казалось, в просвящённой Европе подобные методы революционной борьбы давно вышли из моды, ан нет.

Originally published here.
( Read more... )Any sufficiently advanced technology is indistinguishable from magic.
© Arthur C. Clarke
Иногда получается, что какой-то отдельно взятый технологический прорыв кажется шарлатанством из-за неправдоподобных заявлений.
Ну вот кто может поверить, что к началу 2000-х годов никому не известной конторой в Минске был разработан уникальный синаксический анализатор английского языка? Звучит неправдоподобно, да и проверить нельзя.
Несколько лет назад мне пришлось пользоваться некой мутной структурой данных. Имеющаяся в наличии библиотека не подходила по множеству причин. Библиотека эта была ориентирована на однопоточное применение, являлась по сути реализацией ORM для конкретного случая и выставляла в качестве API собственный язык запросов, явлюящийся надстройкой над SQL, тогда как мне нужен был низкоуровневый доступ и возможность бродить по дереву данных вдоль и поперёк.
Я в то время как раз собирался изучить Ruby-on-Rails, и его ORM подсистема под названием ActiveRecord мне показалась подходящей для реализации необходимой функциональности.
Сказано-сделано. Периодически мучая вопросами ближайшего гуру руби и рельсов
divine_assass1n, я за несколько вечеров написал нужную функциональность. Вышло меньше 1000 строк кода. Счастливый, я начал использовать свою библиотечку, делясь с коллегами радостью по поводу простоты и элегантности найденного решения.
Проблемы начались, когда стало ясно, что моя библиотека полностью заменяет предыдущую, на которую было потрачено несколько лет работы. После полутора лет подковёрной борьбы, я из проекта ушёл, а моя библиотека была заменена на монстрообразное детище сторонней компании.
Теперь исходные коды всех трёх библитек свободно доступны. Моя библиотека за последнее время подросла и занимает 1 200 строк на руби, конкурент похудел до 30 000 строк на С++, ну а в монстре в настоящее время около 200 000 строк на Java.
Собрано из двух постингов на dev.by.
Когда дискеты ещё только выходили из моды, а запороть компакт-диск считалось западлом, когда Invention-Machine Belarus ещё назывался Научсофтом, меня, совсем ещё желторотого несмышлёныша, уволили оттуда, прознав, что я получил предложение работы от тогдашнего лидера индустрии.
Увольнение было обставлено в лучших традициях большого и жестокого бизнеса. У входа в здание меня встретили и проводили к тогдашнему директору, который, тряся поджилками, полдня уговаривал меня подписать задним числом NDA, угрожая сделать невыездным и наслать порчу если я вдруг стану рыпаться. Верные коллеги тем же вечером размонтировали мой опечатанный комп и записали всё, что было личного, на компакт-диск. Как сейчас помню, хватилo места даже для инсталляции Quake 2 вместе со всеми сэйвами. Через месяц-другой любимый начальник предложил мне подработать по специальности на нелегальном положении, на что я с радостью согласился, и ещё шесть месяцев, пока оформлялись документы на отъезд, колбасил сявки на дому. C тех пор прошло много лет. Обида забылась. Из верных коллег на старом месте осталось только двое. Году в 2001, встретив директора Invention-Machine в зале ожидания аэропорта, я даже удосужился пожать ему руку и обсудить туманные перспективы моего тогдашнего работодателя.
Все эти годы я внимательно следил за Invention-Machine, ведь как-никак, а эта фирма дала мне путёвку в жизнь, там я встретил замечательных людей, с которыми дружу до сих пор. Но меня всегда поражало, насколько эти замечательные люди, профессионалы своего дела, незаметны даже в своей профессиональной среде.
С тем человеческим потенциалом, который имелся в Invention-Machine в начале 2000-х годов, можно было получить известность на мировой научной арене, зарабатывать не единицы, а сотни миллионов в год на продаже технологий и сиять на мировом рынке звездой первой величины.
Однако прошло 10 лет, а воз и нынче там. Ни один из этих замечательных лингвистов не написал ни одной статьи ни в ACL, ни в Coling, ни в EMNLP. То есть, в топовых научных конференциях, в которых ежегодно участвуют работники Микрософта и Гугла, никто не слышал о Invention-Machine. Да, контора выжила. Да, возможно она даже приносит прибыль американским владельцам. Но я уверен, что потенциал её не был реализован.
Я считаю, что причина этого в том, что в руководстве Invention-Machine никогда не было людей, разбиравшихся в технологиях, на которых строится бизнес фирмы. Отец-основатель был так же далёк от языкознания, как декабристы от народа. После того, как власть в Invention-Machine захватили венчурные капиталисты, ситуация только ухудшилась. Руководство этой конторы за 10 лет не удосужилось предпринять элементарные маркетинговые ходы: заняться написанием научных статей, участием в конференциях, выпуском на рынок библиотек для выполнения типовых задач. Компания так и не вышла на массовый рынок и не завоевала известность. Вместо этого, как и десять лет назад, они продают инсталляции невнятной тулзы под названием Goldfire Innovator за сотню тысяч долларов штука, заключая сделки на поле для игры в гольф.
In a desperate act of self-humiliation, people behind Java.net upgraded their Drupal-based website and left the default Drupal favicon on their site, as a sign of a total professional failure.
P.S. Looks like they had a MovableType before Drupal. Dries blogged about it half a year ago.
В перерывах между работой и хобби, приделал колонки под крышку самодельного стола из цельной доски. Качество звука, как и ожидалось, пропорционально площади резонатора. Низкие передаются прямо в грудную клетку через лежащие на столе локти.

A bad sysadmin changes the default SSH port.
A good sysadmin throttles the brute-force attackers by disallowing new connections every 20 seconds
# requires xt_TARPIT iptables -A INPUT -p tcp -m state --state NEW \ --dport 22 -m recent --update --seconds 20 -j TARPIT iptables -A INPUT -p tcp -m state --state NEW \ --dport 22 -m recent --set -j ACCEPT
A brilliant sysadmin blocks intruders indefinitely
# requires hashlimit iptables -A INPUT -p tcp -m tcp --dport 22 -m state \ --state NEW -m hashlimit --hashlimit 1/hour \ --hashlimit-burst 2 --hashlimit-mode srcip \ --hashlimit-name SSH --hashlimit-htable-expire 60000 -j ACCEPT iptables -A INPUT -p tcp -m tcp --dport 22 \ --tcp-flags SYN,RST,ACK SYN -j DROP iptables -A INPUT -p tcp -m state \ --state NEW -m tcp --dport 22 -j ACCEPT
In the last example, the 1st rule allows up to two connections per hour. After the limit of two connections per hour is reached, the second rule becomes active and the hashlimit module starts to countdown from 1 minute (60 000 milliseconds). If you connect within 1 minute, the hashlimit counter is reset to 60 000. If you connect after 1 minute, you drop to the 3rd rule and are allowed access.
Cherry-picked from Habr
Пришла ко мне сегодня афишка от Kaaitheater. В ней — анонс театрального перформанса девки из Кении. В краткой аннотации говорится, что в Кении популярны «живые» переводы фильмов, совсем как у Гоблина. Ничто не ново под луной.
mknod backpipe p mknod log p while :; do cat backpipe |nc -l -p 3001 |tee log| nc localhost 3000 |tee log >backpipe; done
Add the new mime type to the respective rails initializer
echo "Mime::Type.register \"application/xhtml+xml\", :xhtml" \ > config/initializers/mime_types.rb
Use the name of this mime type in the config/routes.rb
map.root :controller => "test", :action => 'view', :format => 'xhtml'
Just spotted this nice little euphemism slipping into the corporate newspeak. Is it because the old-fashioned nature of the word gives more weight to PowerPoint slides? Or it is because saying aloud "PowerPoint" has become suddenly reprehensible?
The official OMG SysML website is edited entirely in Microsoft Frontpage 6.0. Its first page contains 124 links, 18 links among them are broken. Being backed by the biggest and richest corporations like Lockheed-Martin, Airbus, EADS, etc, it also displays a Google Ads block which shall bring in at most 5 USD per month, judging by the traffic it generates.
A composite requirement may state that the system shall do A and B and C, which can be decomposed into the child requirements that the system shall do A, the system shall do B, and the system shall do C.
I just received offline spam from Fedict in the form of a letter without any postage marks and with the text on the envelope stating:
"An important message from the government".
The letter contained an invitation to buy a bundle of a PC with 12 months of free internet access for 422 EUR.
Update: Apparently, the same letter was distributed (not sent by post, but carried to the postbox by a spam delivery company) to a big share if not all belgian residents.
Читаю книжку Фейнмана What Do You Care What Other People Think? Он там упоминает, что не смог поступить в Колумбийский университет из-за квоты на евреев. Интересно, как там сейчас с дискриминацией евреев.