Päiväcirja

Subscribe to RSS feed

Posts tagged with "eng"

«Шантарам» / Shantaram

, ,

Товарищи! Новые вести с библиотечного фронта.

Довольно-таки случайно мне попала в руки книга некоего Грегори Дэвида Робертса под незнакомым названием «Шантарам». И вот я её прочёл. Знаете, если б я не прочитал недавно «Доктора Живаго», имел бы полное право сказать, что давно не читал настолько сильной книги. Если кому интересен сюжет, пожалуйте в Рукипедию (хотя не понимаю, зачем — подпортите удовольствие от чтения. А вообще книга действительно прекрасная. О жизни, о людях. О хороших людях. О хорошем в обычных людях. Немного, вскользь о войне. Ну и о любви, конечно, как же без неё. Хоть это и «современная литература», но почему-то не про секс, грязь и наркотики (хотя книга и не для ханжей совсем, ибо жизненная). И это в лучшем смысле не «интеллектуальная проза»: хотя работы для ума в тексте хватит, но пустого умствования я не приметил. В общем, это одна из лучших книг, прочитанных мной в последнее время. Кому важно и/или интересно моё мнение — прочитайте. Надеюсь, понравится не только мне, и кто-то будет благодарен мне за эту наводку, как я благодарен Некту, запихнувшему эту книгу мне в читалку перед покупкой.

«Человек, которого „Шантарам“ не тронет до глубины души, либо не имеет сердца, либо мертв, либо то и другое одновременно»

Джонатан Кэрролл (Справедливости ради замечу, что отрицательных отзывов тоже хватает)

Digging through my ebook reader's memory, I've stumbled upon book hitherto quite unknown to me, „Shantaram“ by Gregory David Roberts. So I've read it (that's what books are for, ain't them?). Well… It's one of the most impressing books that I have read recently (along with „Doctor Zhivago“). I will not retell it, read the Wikipedia or something if you want to know the plot (but what for? Don't spoil the reading!). But the book is great. Life, people, good people, good things in common people, war, (of course!) love… Modern literature without dirt, sex, drugs and violence on every other page. Book that gives you something to think about without showing off intelligence. If you heed my advice, read it.

Anyone who walks away from Shantaram untouched is either heartless or dead or
both.

- Jonathan Carroll

Piping commands till it hurts

, ,

(Just to save a useful and complex construct for future reference)

List all the overlay maintainers who hasn't migrated their packages to virtual/pkgconfig:
ack --files-with-matches dev-util/pkgconfig | xargs dirname | uniq \
       | xargs -I {} grep '<name>' '{}/metadata.xml' \
       | sed 's:\s\+<name>\(.\+\)</name>:\1:' | sort -u

Yes, I use ack instead of grep, being too lazy to add all the neccessary options.

Субтитры / Subtitles

,

Вниманию товарищей, смотрящих фильмы или сериалы на иностранных языках,
предлагается следующий хитрый финт ушами.


If you watch anything in foreign language, here's simple trick for you.


Read more...

Sony PRSA-CL10B: отзыв / review

,

Приобрёл я Sony Reader PRS-T1. Отличная читалка, могу рекомендовать. Но без обложки не очень-то хорошо, так что я взял в комплект Sony PRSA-CL10B. «Да будет свет!» — подумал я. Ну да, свет есть. Плохо только, что собственно как обложка она погана.
  • Мягкая: легко прогибается, вплоть до самого экрана
  • Никак не закрывается: не фиксируется ни в открытом, ни в закрытом виде. Ни кнопки, ни магнитика, ни черта.
  • Возмутительно дорогая: 40% стоимости самой читалки. С учётом вышеописанного — курам на смех.
Хорошо хоть я не купился на более дешёвую версию без лампады, потому что свет — это единственное, что мне нравится. Ну и сама читалка прекрасна. Просто задумайтесь над приобретаемой обложкой и помните о сказанном мной.

I've recently bought Sony Reader PRS-T1. Excellent reader, rest assured of that. But cover is a must-have for such a thing, so I chose Sony PRSA-CL10B. "Let it be light!", I thought. Oh yes, there is. The problem is that the cover is crappy by itself.
  • It is soft: sags easily down to screen itself
  • It lacks any lock: can't be fixed in neither opened nor closed state; no press stud or magnet or anything, cover is more or less loose
  • It's bloody expensive (more than 40% of Reader price); considering aforementioned points, I'd call this ridiculous
I'm just glad I haven't decided to buy "light-less" (a bit cheaper) version of that cover, because LED light is the only thing I like about it. Oh, and the Reader is great. Just choose cover wisely, remembering what I wrote here.

Gentoo: PostgreSQL server service fails to start, but server is running

,

If your `/etc/init.d/postgresql-8.4 start` fails after timeout, but server runs in the background unharnessed, and `/etc/init.d/postgresql-8.4 restart` fails with "Socket conflict", make sure you haven't deleted "postgres" database and recreate it in that case.

Flask sessions and unicode_literals

, ,

If you had tried to use Flask sessions and got something like that:

  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 889, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 871, in wsgi_app
    with self.request_context(environ):
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 836, in request_context
    return _RequestContext(self, environ)
  File "/usr/lib64/python2.7/site-packages/flask/ctx.py", line 33, in __init__
    self.session = app.open_session(self.request)
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 431, in open_session
    secret_key=key)
  File "/usr/lib64/python2.7/site-packages/werkzeug/contrib/securecookie.py", line 308, in load_cookie
    return cls.unserialize(data, secret_key)
  File "/usr/lib64/python2.7/site-packages/werkzeug/contrib/securecookie.py", line 255, in unserialize
    mac = hmac(secret_key, None, cls.hash_method)
  File "/usr/lib64/python2.7/hmac.py", line 133, in new
    return HMAC(key, msg, digestmod)
  File "/usr/lib64/python2.7/hmac.py", line 72, in __init__
    self.outer.update(key.translate(trans_5C))


...you might be obscured. Fear not! The reason may lurk in

from __future__ import unicode_literals


Just declare your SECRET_KEY as `bytes` object and get happy again!

SECRET_KEY = b'smthverrysekret'

Two (probably) useful Mercurial hooks

, ,

Here's two Mercurial hooks I wrote for my work. One is a reminder to mention Trac tickets in commit messages, and the other notifies a developer when someone (not him) touches his part of project.

Read more...