Вы читаете журнал [info]andreynikishaev


Не так давно, меня кардинально достал поиск фильмов для просмотра вечером, и я начал искать пути ускорения сего неприятного процесса. В результате родился небольшой сервис, и мое время поиска с часов сократилось до минут. Собственно этой небольшой радостью и хочу с вами поделится)

Ссылка: What To Watch?

What to Watch?

30 Art Works - Online Art Gallery


Хочу представить вашему вниманию наш арт проект 30 Art Works, который призван рассказывать об искусстве(давно забытом и нынешнем) главным образом о фотографии. Мы уже начали наполнение и в ближайшее время вы увидите много интересного. В данный момент мы работаем в Facebook и Google+. Следите за обновлениями и не пожалеете)

Google+: https://plus.google.com/113346667849081964949
Facebook: http://www.facebook.com/30artworks
Vkontakte: http://vkontakte.ru/thirtyartworks

Originally published at Creotiv lives here. Please leave any comments there.

Евро 2012 стало охуенным подарком для наших завсегдатых из Киева. Столько бабла свалилось им на голову, что они даже по началу опешили что ж с ним делать, но вскоре быстро реабилитировались.

Мне не повезло стать свидетелем всего это действа которое каждый день проходит под моими окнами. Они перестраивают стадион Олимпийский. На самом же деле стадион такого размера с нуля в спокойном режиме строится месяц максимум, не верите, посмотрите как это делают нормальные строй. компании. У нас же это действо тянется уже не первый год.. Раньше конечно все было тихо.. но теперь под конец все сильно обострилось(видимо денег много не отмытых осталось).

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

Доблестная милиция тоже как всегда не боится «поработать» и на все звонки отвечает мол мерия это все разрешила. Мне вот интересно, а по какому закону мерия вдруг начала принимать такие решения?? – Бред. Но главное менты отмазались. Знаете я бы еще понял если бы мне сказали «ну сами ведь все понимаете, я не с могу вам помочь».. но млин у работничков местных отделений даже яиц нет что бы и это из себя выжить.. я вот тут подумал кто больший мастак милиция или тупые блодинки на порше?

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

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


Originally published at Creotiv lives here. Please leave any comments there.

There are two situations with installing fisrt if all is ok and second when after restarting php you get error «undefined symbol: php_json_encode in Unknown on line 0″ or similar.

First type of installation(when all si ok) is:

yum -y install gcc-c++
wget http://launchpad.net/libmemcached/1.0/0.40/+download/libmemcached-0.40.tar.gz
tar xzf libmemcached-0.40.tar.gz 
cd libmemcached-0.40
./configure 
make 
make install
pecl install memcached
echo 'extension=memcached.so' > /etc/php.d/memcached.ini
service php-fpm restart
cd ..
rm -r libmemcached-0.40*

Second type of installation(if first return error) is:

yum -y install gcc-c++
wget http://launchpad.net/libmemcached/1.0/0.50/+download/libmemcached-0.50.tar.gz
tar xzf libmemcached-0.50.tar.gz 
cd libmemcached-0.50
./configure 
make 
make install
wget http://pecl.php.net/get/memcached-2.0.0b2.tgz
pecl install memcached-2.0.0b2.tgz
echo 'extension=memcached.so' > /etc/php.d/memcached.ini
service php-fpm restart
cd ..
rm -r libmemcached-0.50*
rm -r memcached-*

#36


Originally published at Creotiv lives here. Please leave any comments there.


Модель: Екатерина Коротчук

Read the rest of this entry »

Python __new__ method magic


Originally published at Creotiv lives here. Please leave any comments there.

Раньше почемуто казалось что метод _new_ в Python всегда должен возвращать инстанс собственного класа. На самом деле это вкорне неверно. Походу или мой склероз прогрессирует или нужно внимательней читать документацию.
Эта фича дает реально нехилый буст для красивого АПИ
Вот собственно примерчик:

class C(object):
    def __init__(self):
        print '_init_ C'
 
class A(C):
    def __init__(self):
        super(A,self).__init__()
        print '_init_ A'
 
    def echo(self):
        print 'echo A'
 
 
class B(object):
    def __new__(cls):
        self = A()
        return self
 
    def __init__(self):
        print '_init_ B'
 
b = B()
print b
b.echo()

Вывод такой:
> _init_ C
> _init_ A
>

[Error: Irreparable invalid markup ('<_main_.a>') in entry. Owner must fix manually. Raw contents below.]

<p style="border: 1px solid black; padding: 3px;"><strong>Originally published at <a href="http://creotiv.in.ua/%d0%bf%d1%80%d0%be%d0%b3%d1%80%d0%b0%d0%bc%d0%bc%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5/python-__new__-method-magic/">Creotiv lives here</a>. Please leave any <a href="http://creotiv.in.ua/%d0%bf%d1%80%d0%be%d0%b3%d1%80%d0%b0%d0%bc%d0%bc%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5/python-__new__-method-magic/#comments">comments</a> there.</strong></p><p>Раньше почемуто казалось что метод _new_ в Python всегда должен возвращать инстанс собственного класа. На самом деле это вкорне неверно. Походу или мой склероз прогрессирует или нужно внимательней читать документацию.<br /> Эта фича дает реально нехилый буст для красивого АПИ<br /> Вот собственно примерчик:</p> <div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> C<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'_init_ C'</span> &nbsp; <span style="color: #ff7700;font-weight:bold;">class</span> A<span style="color: black;">&#40;</span>C<span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>: <span style="color: #008000;">super</span><span style="color: black;">&#40;</span>A,<span style="color: #008000;">self</span><span style="color: black;">&#41;</span>.<span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'_init_ A'</span> &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> echo<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'echo A'</span> &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">class</span> B<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__new__</span><span style="color: black;">&#40;</span>cls<span style="color: black;">&#41;</span>: <span style="color: #008000;">self</span> = A<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span> &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'_init_ B'</span> &nbsp; b = B<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">print</span> b b.<span style="color: black;">echo</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div> <p>Вывод такой:<br /> > _init_ C<br /> > _init_ A<br /> > <_main_.a object="object" at="at" 0xb7391e0c="0xb7391e0c"><br /> > echo A</p>

Originally published at Creotiv lives here. Please leave any comments there.

Apollo 11


Originally published at Creotiv lives here. Please leave any comments there.


Originally published at Creotiv lives here. Please leave any comments there.

This script scans directories that was uploaded to CloudFront and build files index. When you modify some files, script automatically see what files was modified since the last update, and clear cache on CloudFront only for them.

Usage: script.py data_dir [index_file] [dir_prefix]

data_dir – path to directory with uploaded data

index_file – path to files index

dir_prefix – needed if you data_dir path is different from url at CloudFront.For example: Your data_dir is ‘/data’ but url at CloudFront is http://url.com/social/data/ so dir_prefix will be ‘/social/data/’

Link to ActiveState recipe

Read the rest of this entry »


Originally published at Creotiv lives here. Please leave any comments there.

Due to last mass application deactivtion on facebook, i look at the facebook documentation to see why so much of application has been blocked even if they have good rating and users feedback.

First of all i read this facebook blog post http://developers.facebook.com/blog/post/516/ and this https://developers.facebook.com/docs/guides/policy/examples_and_explanations/user_feedback/. If you will take good look at this two documents you will see the problem. But i will give example for better understanding of problem that we have now.

For example, we have 2 friends. Friend A has been signed for App, and friend B not. Friend A post through application to his wall post, so this is not a spam, this is his right. But Friend B, not signed for App, don’t like that on his news wall he see post from this app(because he don’t use it), so he hide this post, or hide all post from this App, or marking this post as a spam. And due to second document facebook system will count this action as negative user feedback for App that user even not signed for.

First this is a problem for app developers, because they get negative user feedback from users who don’t use theire application(if you see description of spam, you will see that actions of such user is spam). Second we have problem with security, because such bug gives big possibilities for people who want to block your application.

What I’m think is that user must block/mark spam posts only from application that he use, and only on his wall(not news wall, not friends wall, not page wall(if he not a moderator)). This will give us real user application feedback and will defense us from bad people.

If you think that i’m right, please vote for this bug response: http://bugs.developers.facebook.net/show_bug.cgi?id=18730