Skip to content

Instantly share code, notes, and snippets.

@verm666
verm666 / gist:2049204
Created March 16, 2012 08:50
djb2.py
#!/usr/bin/env
# -*- coding: utf-8 -*-
from pprint import pprint
def djb2(uuid):
""" See for details: http://www.cse.yorku.ca/~oz/hash.html """
_hash = 5381
<?xml version="1.0" ?>
<!--This is simple config example for FastCGI-daemon-->
<fastcgi xmlns:xi="http://www.w3.org/2001/XInclude">
<pools>
<pool name="read" threads="512" queue="4096"/>
<pool name="write" threads="128" queue="4096"/>
<pool name="ping" threads="8" queue="16"/>
</pools>
<handlers>
<handler pool="read" port="8080" url="/(download-info|get|stat_log|stat-log).*">
2012-03-26 19:19:41.957880 4107/4107 : Elliptics starts, version: b76f2436c6d24185ae88ef0fd9674d9c643297e9, changed files: 0
2012-03-26 19:19:41.958081 4107/4107 : Using default wait timeout (5 seconds).
2012-03-26 19:19:41.958113 4107/4107 : Using default check timeout (60 seconds).
2012-03-26 19:19:41.958151 4107/4107 : No notify hash size provided, using default 256.
2012-03-26 19:19:41.958207 4107/4107 : Successfully initialized notify hash table (256 entries).
2012-03-26 19:19:41.958739 4107/4107 : Connected to 127.0.0.1:1025.
2012-03-26 19:19:41.959450 4107/4107 : Initialized group: 2, total ids: 1, added ids: 1 out of 1: 9 usecs.
2012-03-26 19:19:41.959525 4107/4107 : 0:000000000000: added transaction: 1 -> 127.0.0.1:1025.
2012-03-26 19:19:41.959585 4110/4107 : Started checking thread. Timeout: 60 seconds.
2012-03-26 19:19:41.959646 4109/4107 : Starting IO processing thread.
Mar 26 19:19:42 ioremap fastcgi-daemon2: fastcgi-elliptics-proxy: added dnet remote 127.0.0.1:1025:2
Mar 26 19:19:42 ioremap fastcgi-daemon2: fastcgi-elliptics-proxy: added dnet groups 1:2
2012-03-26 20:32:43.968885 24167/24167 : Elliptics starts, version: b76f2436c6d24185ae88ef0fd9674d9c643297e9, changed files: 0
2012-03-26 20:32:43.968992 24167/24167 : Using default wait timeout (5 seconds).
2012-03-26 20:32:43.969012 24167/24167 : Using default check timeout (60 seconds).
2012-03-26 20:32:43.969028 24167/24167 : Using default stall count (5 transactions).
2012-03-26 20:32:43.969043 24167/24167 : No notify hash size provided, using default 256.
2012-03-26 20:32:43.969070 24167/24167 : Successfully initialized notify hash table (256 entries).
2012-03-26 20:32:43.969126 24167/24167 : Starting 1 blocking threads and 1 nonblocking threads
2012-03-26 20:32:43.969424 24167/24167 : Connected to 127.0.0.1:1025.
2012-03-26 20:32:43.970169 24167/24167 : Initialized group: 2, total ids: 1, added ids: 1 out of 1: 5 usecs.
2012-03-26 20:32:43.970214 24167/24167 : 0:000000000000: added transaction: 1 -> 127.0.0.1:1025.
PS1='[%?]' # exit code
PS1+=' $(echo $(date "+%Y/%m/%d %H:%M"))' # date
PS1+=' %~' # current directory
PS1+=' %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' # git status
PS1+='$(echo -e "\n ➜ ")' # carriage return and prompt