s o m e t h i n g a b o u t m e

extremely easy one-command backup on ubuntu

example of my easy-one-command backup script:

traut@traut-laptop:~$ cat ./make-backup.sh
rdiff-backup --force -v4 --print-statistics /home/traut /media/storage/_backup
traut@traut-laptop:~$ ./make-backup.sh
Using rdiff-backup version 1.1.14
...
[skip]
...
--------------[ Session statistics ]--------------
StartTime 1204299600.00 (Fri Feb 29 17:40:00 2008)
EndTime 1204300856.80 (Fri Feb 29 18:00:56 2008)
ElapsedTime 1256.80 (20 minutes 56.80 seconds)
SourceFiles 179336
SourceFileSize 45282340567 (42.2 GB)
MirrorFiles 179080
MirrorFileSize 45899848891 (42.7 GB)
NewFiles 3248
NewFileSize 977380475 (932 MB)
DeletedFiles 2992
DeletedFileSize 1596537521 (1.49 GB)
ChangedFiles 324
ChangedSourceSize 572043066 (546 MB)
ChangedMirrorSize 570394344 (544 MB)
IncrementFiles 6564
IncrementFileSize 1528496310 (1.42 GB)
TotalDestinationSizeChange 910987986 (869 MB)
Errors 0
--------------------------------------------------
traut@traut-laptop:~$

it’s extremely simple and maybe I should add some versions support. You can easily fire this backup task every-night/every-week/every-month with cron.


holy war

вот, нашел краткое описание того, что мне не нравится в маках :)
“Мак - это не OS, Мак - это религия. Всё что Стив посчитал нужным “нормальному человеку” выполняется легко, что положено знать “жрецам” - через “спецзаклинания”, что не положено - либо не делается вообще, либо через сторонние примочки, которые имеют привычку конфликтовать и обычно “правоверными” приравниваются к ереси…” (c) отсюда

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


Solr problems identification

Here you can find a quick-recognize list that can help you to identify Solr error that hiding behind your application business logic.

Symptoms and possible causes.

There is a few symptoms that can help you to identify a problem:

  • Searching is fine, indexing is not working. When you change your data and no change appears in index and you cannot search by the new data.
    Possible causes:

    • Your application don’t add’n’commit data into Solr. Solr need to commit changes to see changed data in index.
      Check errors/exceptions in your application server log files
    • Solr index deadlocks.
      Try to push info to Solr index manually using magic command. If no result appears after command execution and execution just freezes — it is a lock. You have to check sudo kill -3 SOLRPID to be sure.
  • Searching returns wrong (maybe not unique) results.
    There can be a few possible causes:

    • Wrong search query.
      You have to check your query. Is it created right?
    • Wrong index data.
      You have to check an appropriate indexer to clarify index data constructing process. If there are no errors you can try to push some entry data into Solr index. Use magic command to add data into index (sometimes it is useful to specify all document fields in command to check if there are any problem with specific field).
    • Solr startup exception
      If search returns an empty result it can be caused by Solr startup error. You have to check Solr log files to identify it.
    • Index corruption.
      After searching query identification you have to try to search the query in Solr admin console. If wrong results appears — it is index corruption. You have to fire index rebuild (old index deletion is not necessary but preferable).
  • Search don’t work.
    • Exception during searching.
      Check log files for exceptions and errors. Connection refused (Solr master/backup server is down)? Are there any exceptions in your application during index data gathering?
    • Solr startup exception
      If search returns an empty result or returns an error it can be caused by Solr startup error. You have to check Solr log files to identify it.

Magic command

SolrJ client version 1.2 cannot show errors returned from server during indexing process. So we need to manually execute index add/commit operations to see server return message.

user@server$ curl http://solrserver.com/update -H "Content-Type: text/xml" --data-binary '<add><doc><field name="id">999999</field></doc></add>'
user@server$ curl http://solrserver.com/update -H "Content-Type: text/xml" --data-binary '<commit/>'

a good response is:

<result status="0"></result>

There can be any other errors and if you cannot identify some with this quick-recognizing list you need to keep digging inside your log files and stack traces :)


*.*.*.*

все, все ок. viewdle

следуя традиции


party time

Sleeping

 

Sleeping 2


Qt4.3 + CSS -> PyQT

8-) нет слов!


self.frame.setStyleSheet(QtGui.QApplication.translate("MainWindow", "border-radius: 6px;\n"
        "border: 2px solid #8f8f91;\n"
        "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                                       stop: 0 #f6f7fa, stop: 1 #dadbde);",
                                  None, QtGui.QApplication.UnicodeUTF8))

накопал в процессе написания маленького кастомного таймера. все-таки сел писать, устав забывать на плите то кофе, то молоко :) пишу на PyQT4


writing

writing
writing, originally uploaded by _traut_.


letters

letters

letters, originally uploaded by _traut_.


mother

mother

mother, originally uploaded by _traut_.


***

***

***, originally uploaded by _traut_.


my love

originally uploaded by _traut_.


hands

hands

hands, originally uploaded by _traut_.


PyIPS aka Python Image Processing Server/Script

PyIPS (Python Image Processing Server/Script) - standalone server/script behind lighttpd/apache server that provides image processing service (PIL, Imagemagick as engines). The server caches results on file system (local, mogilefs, etc). PyIPS uses file storage specified by home directory property.

Project is in the early stage of development.

example urls:

http://eth0less.com/pyips/main.py/process?name=pic1.jpg&width=200&height=200&crop_type=top
http://eth0less.com/pyips/main.py/process?name=pic1.jpg&width=200&height=200&crop_type=center
http://eth0less.com/pyips/main.py/process?name=pic2.jpg&width=500&height=400
http://eth0less.com/pyips/main.py/process?name=pic2.jpg&width=600&height=600&scale_up_allowed=true
http://eth0less.com/pyips/main.py/process?name=pic3.jpg&width=500&height=400&crop_type=center

Soon I’ll add cache function (with ability to refresh/clean image cache), ImageMagick engine (currently PyIPS works only with PIL engine) and maybe mogilefs filestorage manager.

There are some additional files in repository - main.py and main.fcgi - these are for apache+mod_python and for lighttpd+FastCGI correspondingly.


release or die trying

ввиду вчерашних событий, пришлось многое передумать. некоторая расслабленность, которая обволакивала мысли последние полтора года, рассеялась.

вполне ожидаемо было, что не-успешные продажи сервиса, заканчивающийся 2й раунд финансирования и спад в экономике штатов приведут к провалу попыток соблазнения инвесторов на 3-й раунд (что для инетных инвестиционных проектов неслыханно). результат — в момент уволили кучу народу, стремясь снизить траты на поддержание компании на плаву. то, о чем все предполагали, было красочно подтверждено действиями руководства.

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

ведь, в конце-концов, любые изменения — они к лучшему.


think it right

заполнял инфу в вконтакте. вспомнил много хорошего, что когда-то валялось открытыми разворотами в письменном столе, листалось на пляже под диким, таким же желтым, как страницы, солнцем, читалось запоем с монитора, и - все это раскладывало мозг по кусочкам, смешивая затем их в кучу:

“Neuromancer” by William Gibson, “Иные голоса, иные комнаты” Трумэн Капоте, “Завтрак у Тиффани” Трумэн Капоте, “9 принцев Амбера” Желязны, “И восходит солнце (Фиеста)” Эрнест Хемингуэй, “3 товарища” Эрих Мария Ремарк, “Бойня номер 5” Курт Воннегут, “Сирены Титана” Курт Воннегут, “Малый-не-промах” Курт Воннегут, “Над пропастью во ржи” Дж. Сэлинджер, “Неизвестные в доме” Жорж Сименон, “Грязь на Снегу” Жорж Сименон