<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>.pQd's log</title>
	<atom:link href="http://kudzia.eu/b/feed/" rel="self" type="application/rss+xml" />
	<link>http://kudzia.eu/b</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 05 Apr 2012 06:06:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Benford&#8217;s law</title>
		<link>http://kudzia.eu/b/2012/03/benfords-law/</link>
		<comments>http://kudzia.eu/b/2012/03/benfords-law/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 19:42:17 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[non-tech]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=1062</guid>
		<description><![CDATA[by a coincidence [process well described in this xkcd's comics] i&#8217;ve stumbled on the definition of Benford&#8217;s law. since i have access to quite a lot of different economic &#038; financial data i&#8217;ve decided to check if that law applies also to it. i&#8217;ve run small php script that checked over 6M of the time [...]]]></description>
			<content:encoded><![CDATA[<p>by a coincidence [process well described in <a href="http://xkcd.com/214/">this</a> xkcd's comics] i&#8217;ve stumbled on the definition of <a href="http://en.wikipedia.org/wiki/Benford's_law">Benford&#8217;s law</a>. since i have access to quite a lot of different <a href="http://www.macrobondfinancial.com">economic &#038; financial data</a> i&#8217;ve decided to check if that law applies also to it.<br />
<span id="more-1062"></span><br />
i&#8217;ve run small php script that checked over 6M of the time series, 2.8 billion data points and got following results:</p>
<pre class="brush: plain; title: ; notranslate">
0       *******************                             393035420
1       ****************************************        790481134
2       ********************                            405428774
3       **************                                  277812594
4       ***********                                     226251500
5       *********                                       189978617
6       *******                                         154348863
7       ******                                          128284078
8       *****                                           113745540
9       ******                                          128609876
</pre>
<p>pretty neat. the data i have access to is well behaved and obeys that law [except observations starting with 9] </p>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2012/03/benfords-law/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>morocco</title>
		<link>http://kudzia.eu/b/2012/02/morocco/</link>
		<comments>http://kudzia.eu/b/2012/02/morocco/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 22:56:06 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=1047</guid>
		<description><![CDATA[in search for some February sunshine i&#8217;ve spent 11 days in Morocco. on Saturday i flew from Stockholm to Agadir. airport is ~25km away from the touristic part; being cheap i did not take the taxi straight to Agadir [which would cost ~200mad] but rather shared cab ride to Inezgane which is local communication hub [...]]]></description>
			<content:encoded><![CDATA[<p>in search for some February sunshine i&#8217;ve spent 11 days in Morocco.<br />
<span id="more-1047"></span><br />
on Saturday i flew from Stockholm to Agadir. airport is ~25km away from the touristic part; being cheap i did not take the taxi straight to Agadir [which would cost ~200mad] but rather shared cab ride to Inezgane which is local communication hub [20mad] and from there &#8211; local bus nr 7 [6mad] to the touristic part of Agadir near the coast.  there should be some bus from the airport to Inezgane [22 or 37] but it did not show up within 20 minutes.</p>
<p>bus hub in Inezgane gave me already taste of Morocco suburbs &#8211; crowded chaos with tens of taxis, honking, food stands selling grilled meat and fish, fruit&#038;vegetable sellers, trash thrown all over.</p>
<p>it was already after dusk when i arrived to Agadir; with help of GPS i&#8217;ve found my hotel in a few minutes, left my stuff and went out to get something to eat and walk along the seaside. +18C in the evening is much better than -15C :] seaside was full of the locals and tourists.  i quickly found out that english is not of much use there; people speak french and arabic, waving hands works too. </p>
<p>Sunday &#8211; mass in 5 languages [there was even something in polish] in the local catholic church &#8211; Eglise Sainte Anne [<a href="http://www.dioceserabat.org/?q=rubrique/horaire-des-messes">schedule</a>, <a href="http://maps.google.com/?q=30.414871,-9.588168">location</a>]. i&#8217;ve passed by the big &#038; very lively <a href="http://maps.google.com/?q=30.412928, -9.579670">bazaar</a> and went to the <i><a href="http://maps.google.com/?q=30.415945,-9.566345">gare routière‎</a></i> &#8211; big bus station &#8211; where i bought tickets for the next day ride. the <a href="http://wikimapia.org/7723012/Hill-of-Three-words">big</a> <a href="http://maps.google.com/?q=30.430118,-9.624496">hill</a> overlooking the bay/touristic part of the city was the next target. on the way up i saw some small wild snake between bush of cactuses. at the top &#8211; commercialized camels for tourists, some snack shop and ruins of old fortifications ruined during the 60s earthquake. and some goats, sheep and donkeys lazily chewing grass and&#8230; gsm tower using diesel generator. way back from the hill, brand new and clean marina, seaside.</p>
<p>Monday &#8211; bus ride to Essaouira [60mad + 5 for the luggage] over serpentine of the hilly roads; on the way &#8211; lots of poverty, simplicity, plenty of garbage dumped just beside homes.</p>
<p>on the way from the bus station to the hotel i pass veg/fruit bazaar and already like the city. with few kg of cocktail tomatoes, onion, paprika, some bread and fresh mint leaves i go to the hotel, unpack and go out for a walk to the seaside. there are some &#8216;commercialized&#8217; camels, horses and mules waiting for tourists [to ride on or take pictures with]. it&#8217;s warm but very windy. after some walk along the coast i go first to the fisherman port and then &#8211; to the old town/medina surrounded by fortification wall. Essaouira is much more interesting than Agadir &#8211; less tourists, less modern buildings, very lively old part with markets, food stands.</p>
<p>during the next day i find 2 herds of wild camels on the dunes near the coast south of the city. it was probably the best sight and surprise for me during the journey. camels are&#8230; well big and completely oblivious to my presence. i can come very close to them, poke them with a stick while they continue pinching the grass and ignoring me. back to the old town and another round of getting lost and found in the maze of narrow passages.</p>
<p>on Wednesday i took a bus ride from the <a href="http://maps.google.com/?q=31.517185,-9.759378">main bus station in Essaouira</a> to Casablanca. it took ~6h, cost 90+5mad. during the ride i saw landscapes slowly changing from yellow-ish-dry to greener and greener with fields and plantations. my hotel was in the medina; i arrived ~19 and after short preparations left to see it. it&#8217;s seriously messy and very lively. live chickens? no problem; butchered on the spot? no problem. grilled just afterwards? move on 20m and you can get it. food stands, vegetable market, fake-branded fashion stuff, locally produced clothes and accessories, electronics, music &#8211; all mixed together with plenty of small open mosques, local bars, restaurants and internet cafes [called cyber]. </p>
<p>Thursday &#8211; more walking around Casablanca &#8211; <a href="http://maps.google.com/?q=33.608043,-7.632408">Hassan II Mosque</a>, modern just being built <a href="http://maps.google.com/?q=33.609187,-7.624340">marina</a> contrasted with poverty just across the street, old town again. i&#8217;ve been walking a lot pretty much from <a href="http://maps.google.com/?q=33.606113,-7.657042">here</a> to <a href="http://maps.google.com/?q=33.615924,-7.562542">there</a> but i was not very impressed &#8211; it&#8217;s modern busy city. although strawberries bought from the cart pulled by donkey were great. and cheap. </p>
<p>on the Friday afternoon i took a train from <a href="http://maps.google.com/?q=33.598625,-7.611551">Gare de Casa Port‎</a> to the Mohammed V International Airport [i had to change on the first station to another train]. train ticket price &#8211; 40mad, journey time including waiting for the 2nd train &#8211; ~ 1h30min. flight to Ouarzazate took 1h10min. Ouarzazate is quite small, airport is near the city &#8211; walk to the hotel was ~15 minutes, from there to the city center &#8211; another 10 min. ¡me gusta! </p>
<p>for Saturday and Sunday i&#8217;ve rented a car and drove a bit around &#8211; i tried to reach Sahara &#8211; <a href="http://maps.google.com/?q=29.827540,-5.712891">M&#8217;hamid</a> &#8211; but there was not enough time. i stopped and turned back ~70km before it &#8211; i did not want to drive back via the mountains after the dusk. nevertheless landscapes i saw on the way ware breathtaking &#8211; wild hills and plains without much vegetation, dry riverbeds, and oasis around &#8216;live&#8217; rivers.</p>
<p>on Sunday i drove to <a href="http://maps.google.com/?q=31.047015,-7.129140">this</a> <a href="http://en.wikipedia.org/wiki/Kasbah">kasbah</a>, valley of rouses and <a href="http://maps.google.com/?q=31.279138,-6.140671">some hills</a>. from a distance i saw some remaining buildings of <a href="http://en.wikipedia.org/wiki/Ouarzazate#Film_studios">atlas studios</a>. on the way i gave a ride to more than 20 local hitchhikers getting from one village to another. nice people, i even got some snacks from them. unfortunately most of them spoke only arabic/berber and french &#8211; so not much talking. not with the hands on the steering wheel. there&#8217;s a <a href="http://maps.google.com/?q=30.919111,-6.919611">catholic church in Ouarzazate</a> but on that particular Sunday there was no service. </p>
<p>Monday &#8211; bus ride to Marrakech via Atlas mountains with mountain peaks covered in snow; it took ~5h and 80mad. bus stop in Ouarzazate for ctm line was not at <a href="http://maps.google.com/?q=30.925743,-6.929315">gare routière‎</i> but rather <a href="http://maps.google.com/?q=30.9218,-6.9074">here</if>. </p>
<p>Marrakech was different &#8211; surprisingly refreshing compared with Casablanca. yes &#8211; it&#8217;s modern too but.. medina &#8211; less messy although still very original and lively; weather &#8211; much milder than in other places &#8211; night warmer, days not as hot as in Ouarzazate. catholic church &#8211; this time open 7 days a week [with visible police protection outside - as i learned introduced after <a href="http://en.wikipedia.org/wiki/2011_Marrakech_bombing">2011 bombings</a>] &#8211; <a href="http://maps.google.com/?q=31.6294,-8.0066">here</a>.</p>
<p>On Wednesday morning i took the local bus 19 from <a href="http://maps.google.com/?q=31.632844,-8.006528">here</a> [it goes every 30 minutes, but i could not find any schedule] to the airport [20mad, ~20 minutes]. on the way back &#8211; to Stockholm Arlanda &#8211; norwegian&#8217;s airplane had free onboard internet access. it was not perfect &#8211; connection would drop at times; was way too laggy [800ms at best, 1000-2000ms] for any remote work but good enough for the web browsing. chats of all sorts [google talk, web version of it, skype] were reconnecting quite often. anyway &#8211; that&#8217;s much better than nothing.</p>
<p>some pictures from the trip <a href="http://fot.kudzia.eu/index.php/20120222-maroc">here</a>.</p>
<p>random thoughts:</p>
<ul>
<li>prices are highly negotiable</li>
<li>surprisingly this time my stomach did not have problems with the local bacteria flora. for first 3 days i drank some vodka in the evenings [urban legend or does it actually help?], then i stopped to see if it makes any difference and later did not use it at all.</li>
<li>it&#8217;s mostly Muslim country &#8211; and you can tell it immediately by looking around &#8211; plenty of open mosques with calls for prayers 5x a day; woman dress very modestly compared with Europe [yet still very colorfully / attractively].</li>
<li>mint tea is really good; i have to reconsider my &#8216;no warm drinks&#8217;  policy</li>
<li>after visits in Turkey, Jordan, Egypt and Bosnia &#038; Herzegovina i should not be surprised by the number of cats, but in Morocco that was quite a lot of domesticated dogs too</li>
<li>total trip cost including flight across Morocco, car rental and fuel for 2 days, cheap hotels and food &#8211; ~400GBP + 200e for the flight from Sweden and back.
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2012/02/morocco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cloning the server using rsync</title>
		<link>http://kudzia.eu/b/2012/02/cloning-the-server-using-rsync/</link>
		<comments>http://kudzia.eu/b/2012/02/cloning-the-server-using-rsync/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 13:04:46 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[cloning]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=1021</guid>
		<description><![CDATA[braindump of things to do/directories not to copy when cloning physical debian to a vm using rsync warning &#8211; below is very much server dependent; stop all the &#8216;moving parts&#8217; &#8211; in my case &#8211; cron jobs, mysql server. prepare destination system &#8211; do proper partitioning, install the base system assign temporary address to the [...]]]></description>
			<content:encoded><![CDATA[<p>braindump of things to do/directories not to copy when cloning physical debian to a vm using rsync<br />
<span id="more-1021"></span><br />
warning &#8211; below is very much server dependent; stop all the &#8216;moving parts&#8217; &#8211; in my case &#8211; cron jobs, mysql server.</p>
<ul>
<li>prepare destination system &#8211; do proper partitioning, install the base system</li>
<li>assign temporary address to the new server so old and new one can talk one to another</li>
<li>
run on both machines:</p>
<pre class="brush: plain; title: ; notranslate">
apt-get install rsync
/etc/init.d/cron stop; /etc/init.d/mysql stop # very much server-role dependent
</pre>
</li>
<li>run on the old one:
<pre class="brush: plain; title: ; notranslate">
cd /
rsync --exclude dev/ --exclude proc/ --exclude --exclude/sys/ --exclude etc/fstab  --exclude etc/udev \
      --exclude boot/ --exclude etc/mtab --exclude etc/lvm/ -Rav --delete -e &quot;ssh -c arcfour &quot; \
      ./ root@newServer:/
root@newServer:/
</pre>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2012/02/cloning-the-server-using-rsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sopa/pipa/acta</title>
		<link>http://kudzia.eu/b/2012/01/sopapipaacta/</link>
		<comments>http://kudzia.eu/b/2012/01/sopapipaacta/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 10:55:18 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=994</guid>
		<description><![CDATA[while sopa/pipa legislation in the US seems to be postponed after a wave of protests acta in EU/Poland is doing just fine; acta possibly will be ratified [at least in Poland] without much of the mainstream attention. is pushing this law through the EU parliament going to be the only &#8216;success&#8217; of otherwise pathetic polish [...]]]></description>
			<content:encoded><![CDATA[<p>while sopa/pipa legislation in the US seems to be postponed after a wave of protests acta in EU/Poland is doing just fine; acta possibly will be ratified [at least in Poland] without much of the mainstream attention. is pushing this law through the EU parliament going to be the only &#8216;success&#8217; of otherwise pathetic polish presidency [<a href="http://www.pi.gov.pl/PARP/chapter_86198.asp?soid=AD169363BD3349D388F09D9FCB1BBCDA">pl</a>]?<br />
<span id="more-994"></span><br />
below links to some materials about the proposed laws and their [unintended? really?] consequences:</p>
<ul>
<li>rt&#8217;s crosstalk about sopa: <a href="http://www.youtube.com/watch?v=ldM2a6Sbsi0">yt</a></li>
<li>short excerpt from cory doctorow&#8217;s lecture about sopa: <a href="http://www.youtube.com/watch?v=GriTevlZF58">yt</a>; longer/broader presentation by him on 28c3 &#8211; <a href="http://www.youtube.com/watch?v=HUEvRyemKSg">The coming war on general computation</a></li>
<li>[ pl ] robert waglowski nt sopa / acta: <a href="http://www.youtube.com/watch?v=kuovvT-yRjs">yt</a></li>
<li>wikipedia&#8217;s article about <a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act#Technical_issues">technical implications of sopa on</a></li>
<li><a href="http://news.cnet.com/8301-31921_3-57329001-281/how-sopa-would-affect-you-faq/">cnet writeup</a></li>
<li><a href="http://en.wikipedia.org/wiki/Anti-Counterfeiting_Trade_Agreement#Criticism">acta on wikipedia</a></li>
<li>european digital riths&#8217; <a href="http://www.edri.org/book/export/html/2762">leaflet on acta</a>; <a href="http://www.edri.org/files/ACTA_booklet_PL.pdf">pl version</a></li>
<li>eff&#8217;s <a href="https://www.eff.org/issues/acta">introduction to acta</a></li>
<li>[ pl/en ] and some pop-clip: <a href="http://www.youtube.com/watch?v=kZOK-O15li8">yt</a></li>
</ul>
<p>to sum up, this time it&#8217;s piracy:</p>
<p><img src="http://kudzia.eu/b/wp-content/uploads/2012/01/xGqSJ1.jpg" alt="" title="xGqSJ[1]" width="320" height="240" class="alignnone size-full wp-image-1003" /></p>
<p><a rel="nofollow" href="http://www.paralegal.net/hypocrisy-in-hollywood/">related info-graphic</a> tackling the business side of copyright enforcement.</p>
<p>and as a counterweight &#8211; a pro-sopa clip: <a href="http://www.youtube.com/watch?v=RpyLGlIsAWM">yt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2012/01/sopapipaacta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>switching reverse proxy from apache2 to nginx</title>
		<link>http://kudzia.eu/b/2012/01/switching-from-apache2-to-nginx-as-reverse-proxy/</link>
		<comments>http://kudzia.eu/b/2012/01/switching-from-apache2-to-nginx-as-reverse-proxy/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 17:02:08 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=953</guid>
		<description><![CDATA[i&#8217;ve been planning for a while to move away from apache2 as a reverse proxy in front of java appservs and start using nginx. i had two reasons: nginx can handle much better large number of concurrent connections [something we can make use of if we start using long-poll/comet], nginx gives more control over buffering [...]]]></description>
			<content:encoded><![CDATA[<p>i&#8217;ve been planning for a while to move away from apache2 as a reverse proxy in front of java appservs and start using nginx. i had two reasons: nginx can handle much better large number of concurrent connections [something we can make use of if we start using long-poll/comet], nginx gives more control over buffering of back-end response &#8211; eg it can close connection to the back-end as soon as possible, rather than wait till response is delivered to the client. </p>
<p><span id="more-953"></span></p>
<p>modifications in the debian&#8217;s default /etc/nginx/nginx.conf:</p>
<pre class="brush: plain; title: ; notranslate">
..
worker_processes  2; # proxy machine has two cores so we can as well make use of it
..
</pre>
<p>and own vhost definition in /etc/nginx/sites-available [symlinked to sites-enabled]:</p>
<pre class="brush: plain; title: ; notranslate">
upstream backend-http{
        server 10.0.0.2:8080 max_fails=3 fail_timeout=60s weight=10; #primary server
        server 10.0.0.3:8080 max_fails=3 fail_timeout=60s weight=1 backup; #backup to be used only if the primary appserv does not respond
}

server {
        proxy_connect_timeout 5s;
        client_max_body_size 20M;

        listen   80; ## listen for ipv4
        server_name  some.hostname.com;

        access_log  /var/log/nginx/some.hostname.com-access.log ;
        if ($request_method !~ ^(GET|HEAD|POST)$ ) {
                return 444;
        }
        root /var/www/;
        location / {
                root   /var/www;
                index  index.html index.htm;
        }

        location /myApp{
                proxy_pass http://backend-http/myApp;
                proxy_set_header Forwarded $proxy_add_x_forwarded_for;
                proxy_next_upstream error timeout http_500;
        }

        gzip on;
        gzip_http_version 1.0;
        gzip_comp_level 9;
        gzip_proxied any;
        gzip_types text/xml text/plain;
        server_tokens off;
}
</pre>
<p>once the change was done i&#8217;ve encountered [so far] two problems.</p>
<p>problem #1 &#8211; not exactly related to nginx, more to the old apache2 proxy. one of servlets did not set the content-type header, but apache2 was kind enough to add it to the response before forwarding it back to the client. this made client application happy until we switched to nginx.. at that moment client application broke. one line fix in the backend code and we&#8217;re back in the business.</p>
<p>problem #2 &#8211; more complicated thing. from time to time i saw in the /var/log/nginx/error.log errors: </p>
<pre class="brush: plain; title: ; notranslate">
2012/01/04 06:28:08 [error] 4287#0: *14531 sendfile() failed (104: Connection reset by peer) while sending request to upstream, client: 194.6.7.8, server: some.hostname.com, request: &quot;POST /myApp/Servlet HTTP/1.1&quot;, upstream: &quot;<a href="http://10.0.0.2">http://10.0.0.2</a>:8080/myApp/Servlet&quot;, host: &quot;some.hostname.com&quot;
2012/01/04 07:12:37 [error] 4283#0: *28417 sendfile() failed (32: Broken pipe) while sending request to upstream, client: 123.3.45.41, server: some.hostname.com, request: &quot;POST /myApp/Servlet HTTP/1.1&quot;, upstream: &quot;<a href="http://10.0.0.2">http://10.0.0.2</a>:8080/myApp/Servlet&quot;, host: &quot;some.hostname.com&quot;
</pre>
<p>i&#8217;ve done some reading and some sniffing &#8211; as it turns out nginx expects the back-end servlet to start sending response only after whole POST body is retrieved; in some circumstances my back-end was sending response much earlier &#8211; just after parsing the request headers; nginx did not forward that back to the client, but rather returned &#8220;HTTP/1.1 502 Bad Gateway&#8221;. i&#8217;ve modified the code to read whole POST body before sending any response BODY &#8211; this made nginx and clients happy.</p>
<p>that&#8217;s how communication between nginx and back-end looked like before the change:<br />
<a href="http://kudzia.eu/b/wp-content/uploads/2012/01/nginx-headers.png"><img src="http://kudzia.eu/b/wp-content/uploads/2012/01/nginx-headers.png" alt="" title="nginx-headers" width="965" height="492" class="alignnone size-full wp-image-957" /></a></p>
<p>after the change in the back-end code:</p>
<p><a href="http://kudzia.eu/b/wp-content/uploads/2012/01/nginx-headers21.png"><img src="http://kudzia.eu/b/wp-content/uploads/2012/01/nginx-headers21.png" alt="" title="nginx-headers2" width="965" height="410" class="alignnone size-full wp-image-961" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2012/01/switching-from-apache2-to-nginx-as-reverse-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java7, XMLEncoder problems</title>
		<link>http://kudzia.eu/b/2011/12/xmlencoder-java7/</link>
		<comments>http://kudzia.eu/b/2011/12/xmlencoder-java7/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 18:02:54 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[java7]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=905</guid>
		<description><![CDATA[for the last few days i&#8217;ve been looking into java7&#8230; it surely seems faster. but also some of my old code broke when run under it. first i&#8217;ve done unscientific benchmark to see &#8220;what&#8217;s in it for me&#8221; [what performance improvements does new jvm / new garbage collector bring]. most cpu-intensive part in my code [...]]]></description>
			<content:encoded><![CDATA[<p>for the last few days i&#8217;ve been looking into java7&#8230; it surely seems faster. but also some of my old code broke when run under it.<br />
<span id="more-905"></span><br />
first i&#8217;ve done unscientific benchmark to see &#8220;what&#8217;s in it for me&#8221; [what performance improvements does new jvm / new garbage collector bring]. most cpu-intensive part in my code is generation and parsing of xml that gets read from/written to mysql. being a practical person [read: lazy] i googled for few minutes and found <a href="http://tedone.typepad.com/blog/2011/06/unmarshalling-benchmark-in-java-jaxb-vs-stax-vs-woodstox.html">this benchmark</a>. i&#8217;ve run it few dozen of times on two different servers using identical data set. on each server i executed it using java 1.6.25 and 1.7.0_01. one machine was a 3 years old <a href="http://ark.intel.com/products/33087/Intel-Xeon-Processor-X5460-(12M-Cache-3_16-GHz-1333-MHz-FSB)">X5460</a> based server and another &#8211; a brand new box with <a href="http://ark.intel.com/products/52276">E3-1270</a> inside. results:<br />
<img src="/b/wp-content/uploads/2011/12/chart.png" alt="" title="chart" width="600" height="371" class="alignnone size-full wp-image-910" /></p>
<p>more data: <a href="https://docs.google.com/spreadsheet/ccc?key=0Au9ThZ9PVUwldHpmQ3R3clQ2Y0ZBMlBWZzNOT3VXQWc">here</a> and <a href='/b/wp-content/uploads/2011/12/xml_java1.6-1.7-benchmark.zip'>here</a>.</p>
<p>unsurprising conclusion? it&#8217;s worth upgrading. my tests run ~10% faster under java7.</p>
<p>but&#8230; i&#8217;ve stumbled on a problem: XMLEncoder in java7 seems to work differently than in the previous versions. it does not serialize to xml HashSet and possibly other properties of objects. i did not find anything reasonable on the net &#8211; just one <a href="http://wordrider.net/forum/read.php?7,8248,8251#msg-8251">post</a> about similar issue. fortunately my xmls are short-lived [session data] so i have liberty of changing the data format whenever i need to. which i did &#8211; i started using <a href="http://xstream.codehaus.org">xstream</a> for xml [de]serialization of objects.</p>
<p>i&#8217;ve posted my problem at <a href="http://stackoverflow.com/questions/8474761/change-of-behavior-of-xmlencoder-after-moving-from-java-1-6-x-to-1-7-x">stackoverflow</a> but i did not get reply in the first few minutes, so most probably i&#8217;ll never get one.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2011/12/xmlencoder-java7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ghettovcb hangs while removing the snapshot</title>
		<link>http://kudzia.eu/b/2011/11/ghettovcb-hangs-while-removing-the-snapshot/</link>
		<comments>http://kudzia.eu/b/2011/11/ghettovcb-hangs-while-removing-the-snapshot/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 09:59:41 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[ghettovcb]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=886</guid>
		<description><![CDATA[i&#8217;ve upgraded few vmware esxi 4.1 servers with the latest patches and&#8230; obviously something got broken. i use ghettoVCB script to take weekly snapshots of the vms. scripts hanged last night on all servers. first thing i decided to do was to upgrade to the newest release of ghettovcb. that did not help &#8211; backup [...]]]></description>
			<content:encoded><![CDATA[<p>i&#8217;ve upgraded few vmware esxi 4.1 servers with the latest patches and&#8230; obviously something got broken. i use <a href="http://communities.vmware.com/docs/DOC-8760">ghettoVCB</a> script to take weekly snapshots of the vms. scripts hanged last night on all servers.<br />
<span id="more-886"></span><br />
first thing i decided to do was to upgrade to the newest release of ghettovcb. that did not help &#8211; backup script still hanged after performing actual backup with the message: &#8220;info: Removing snapshot from hostName&#8221;. after few minutes of frantic googling i found <a href="http://communities.vmware.com/message/1859469">this</a> thread. solution provided there &#8211; changing</p>
<pre class="brush: plain; title: ; notranslate">
${VMWARE_CMD} vmsvc/snapshot.remove ${VM_ID} &gt; /dev/null 2&gt;&amp;1
</pre>
<p>into</p>
<pre class="brush: plain; title: ; notranslate">
${VMWARE_CMD} vmsvc/snapshot.removeall ${VM_ID} &gt; /dev/null 2&gt;&amp;1
</pre>
<p>resolved the problem. i just had to manually remove earlier created snapshots and backups went fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2011/11/ghettovcb-hangs-while-removing-the-snapshot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>istanbul</title>
		<link>http://kudzia.eu/b/2011/11/istanbul/</link>
		<comments>http://kudzia.eu/b/2011/11/istanbul/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 19:43:27 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=878</guid>
		<description><![CDATA[i was in istanbul / turkey for 9 days&#8230; longest &#8216;stationary&#8217; holidays in the last couple of years. the city is full of stray cats and&#8230; guys. first must be a cultural thing, second one &#8211; possibly too. city is messy&#8230; for a while i felt it&#8217;s messy beyond my tolerance but i ended up [...]]]></description>
			<content:encoded><![CDATA[<p>i was in istanbul / turkey for 9 days&#8230; longest &#8216;stationary&#8217; holidays in the last couple of years.<br />
<span id="more-878"></span><br />
the city is full of stray cats and&#8230; guys. first must be a <a href="http://ask.metafilter.com/95629/Why-are-there-so-many-cats-in-Istanbul">cultural thing</a>, second one &#8211; possibly too. city is messy&#8230; for a while i felt it&#8217;s messy beyond my tolerance but i ended up liking it quite a lot. it&#8217;s very crowded and very lively although even in the touristic districts it&#8217;s mostly the locals. there are plenty of food stands &#8211; people selling rise, fried chicken or fish, kebabs, salads, sweets, chestnuts, boiled and fried corn, freshly squeezed fruit juice.</p>
<p>we&#8217;ve walked a lot.. really a lot &#8211; both on european and asian sides of the bosphorus. our hostel was in the Fatih district, very close to the sultanahmet mosque &#8211; we could reach it and the blue mosque in 5 minutes. in the same district there were some remainings of the old fortification, a bit more distant &#8211; parts of the roman aqueduct, big spices bazaar. </p>
<p>from <a href="http://maps.google.com/maps?saddr=Unknown+road&#038;daddr=Rag%C4%B1p+G%C3%BCm%C3%BC%C5%9Fpala+Cd&#038;hl=en&#038;ie=UTF8&#038;sll=41.016798,28.975968&#038;sspn=0.003408,0.006899&#038;geocode=FdjgcQIdjRy6AQ%3BFRTfcQIdCiC6AQ&#038;vpsrc=0&#038;dirflg=w&#038;mra=dme&#038;mrsp=1&#038;sz=17&#038;t=m&#038;z=17">Emınönü‎</a> and <a href="http://maps.google.com/maps?saddr=R%C4%B1ht%C4%B1m+Cd&#038;daddr=R%C4%B1ht%C4%B1m+Cd&#038;hl=en&#038;ie=UTF8&#038;sll=41.021995,28.977846&#038;sspn=0.003408,0.006899&#038;geocode=FbTxcQIdXiW6AQ%3BFb7ycQIdVyi6AQ&#038;vpsrc=0&#038;dirflg=w&#038;mra=pr&#038;t=m&#038;z=17">Karaköy‎</a> we&#8217;ve taken ferries to the Asian side [<a href="http://maps.google.com/maps?saddr=Kad%C4%B1k%C3%B6y+Haydarpa%C5%9Fa+R%C4%B1ht%C4%B1m+Cd&#038;daddr=Kad%C4%B1k%C3%B6y+Haydarpa%C5%9Fa+R%C4%B1ht%C4%B1m+Cd&#038;hl=en&#038;ie=UTF8&#038;sll=40.993698,29.025235&#038;sspn=0.006818,0.013797&#038;geocode=FZJ-cQId1OC6AQ%3BFbaAcQId2-G6AQ&#038;vpsrc=0&#038;dirflg=w&#038;mra=mift&#038;mrsp=0&#038;sz=16&#038;t=m&#038;z=16">Kadiköy‎</a>] [2TLY/pers/one way]. from <a href="http://maps.google.com/maps?saddr=Meclis-i+Mebusan+Cd&#038;daddr=Meclis-i+Mebusan+Cd&#038;hl=en&#038;sll=41.031553,28.992276&#038;sspn=0.013629,0.027595&#038;geocode=FV0hcgIdwWO6AQ%3BFX0gcgId-mK6AQ&#038;vpsrc=0&#038;dirflg=w&#038;mra=mift&#038;mrsp=1&#038;sz=15&#038;t=m&#038;z=15">Kabataş‎</a> &#8211; ferry to the princess islands [4tly/pers/one way]. from Emınönü‎ &#8211; ferry treep up the bosphorus [10tly/pers].</p>
<p>more often than not we passed by the Istiklal Avenue leading to the Taksim square &#8211; plenty of &#8216;western&#8217; shops &#038; restaurants. </p>
<p>we&#8217;ve tried to climb on the Boğaziçi Köprüsü bridge between European and Asian side but we gave up at the end &#8211; most probably only car traffic is allowed on it.</p>
<p>what did i like:</p>
<ul>
<li>food &#8211; kebaps, fried fishes and fruits,</li>
<li>colorful crowd &#8211; mix of traditionally dressed woman with veils on their hads [~10-15% of them based on my obsevrations] and european looks.</li>
<li>architecture</li>
<li>princess islands were nice</li>
</ul>
<p>on the flip side:
<ul>
<li>it&#8217;s a huge city &#8211; 13M people&#8230; the center was crowded every day; streets are exploding with cars</li>
<li>there&#8217;s a lot of abandoned buildings/ruins, plenty of garbage dumped just on the streets or in the backyards</li>
<li>we had some short-lasting food poisoning; i suspect it was caused by the local water&#8230; i had similar sensations while traveling around jordan.</li>
<p>side notes: tokens for trams, commuter trains, ferries are different. machines where you can buy them are next piers/stops &#8211; so there&#8217;s no point in buying more of them since very possibly they&#8217;ll not be useful on other routes. </p>
<p>some pictures: <a href="http://fot.kudzia.eu/index.php/20111108-istanbul">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2011/11/istanbul/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>croatia / bosnia &amp; herzegovina / serbia</title>
		<link>http://kudzia.eu/b/2011/10/croatia-bosnia-herzegovina-serbia/</link>
		<comments>http://kudzia.eu/b/2011/10/croatia-bosnia-herzegovina-serbia/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 14:09:18 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=863</guid>
		<description><![CDATA[brain-dump from few days of backpacking around ex-yougoslavia 2011-10-08; i flew from stockhom to split in croatia. there are shuttle buses operated by croatia airlines from the aiport to the city center [30 HRK]. i spent 2 nights in split. it&#8217;s quite nice [probably most touristic yet classy city of those i've visited]. old town [...]]]></description>
			<content:encoded><![CDATA[<p>brain-dump from few days of backpacking around ex-yougoslavia<br />
<span id="more-863"></span></p>
<p>2011-10-08; i flew from stockhom to split in croatia. there are shuttle buses operated by croatia airlines from the aiport to the city center [30 HRK]. </p>
<p>i spent 2 nights in split. it&#8217;s quite nice [probably most touristic yet classy city of those i've visited]. old town is a maze of old cobble stone passages reminding me a bit cordoba although buildings in the old town of split are higher. at some places &#8216;streets&#8217; are 1m wide or even less. so i was getting lost and found there. there&#8217;s nice hilly peninsula that i hiked around&#8230; city market with real food and real fruits/vegs/meat. i started to realize there that at least once knowledge of polish is more helpful than knowledge of english. i experienced something similar before in ukraine and slovakia. i can understand every maybe 10th word but it&#8217;s enough to ask about prices, directions&#8230; </p>
<p>2011-10-10; from split i took a bus to mostar [bosnia &#038; herzegovina] [120 HRK]. as split was full of [actually working] catholic churches mostar [and bosnia &#038; herzegovina in general] is full of mosques&#8230; fully operational mosques, some of them with mullahs calling for the prayer 5x per day. in mostar i started to see remaining of the recent war: cemeteries, buildings with bullet/shell marks, abandoned construction all around.</p>
<p>i liked mostar most out of all cities i&#8217;ve passed by. it has much smaller old town than split but there are great hills around. i took a city bus out of the town [nr 10, 11, 12; <a href="http://maps.google.com/maps?saddr=43.348861,17.812523&#038;daddr=Mostar,+Bosnia+and+Herzegovina&#038;hl=en&#038;sll=43.348855,17.812502&#038;sspn=0.001734,0.003484&#038;geocode=%3BCV3D4xD_ZHsAFdU2lQIdQJsPASkpJ0RZqENLEzFF-w_JvMf9wA&#038;vpsrc=0&#038;mra=mift&#038;mrsp=0&#038;sz=19&#038;t=h&#038;z=19">bus stop opposite of the train station</a>. check timetable at <a href="http://www.mostarbus.ba">http://www.mostarbus.ba</a> since bus stops do not have any information about the schedule]. in blagaj i&#8217;ve hiked to the ruins of some old fortress and a dervish house. i got back and jumped on another bus &#8211; this time to medjugorje [city bus #48; it does not reach the train station, you have to ~20 minutes walk north <a href="http://maps.google.com/maps?saddr=43.351278,17.798039&#038;daddr=Mostar,+Bosnia+and+Herzegovina&#038;hl=en&#038;sll=43.351256,17.79805&#038;sspn=0.001734,0.003484&#038;geocode=%3BFdU2lQIdQJsPASkpJ0RZqENLEzFF-w_JvMf9wA&#038;vpsrc=0&#038;mra=mift&#038;mrsp=0&#038;sz=19&#038;t=h&#038;z=19">to another stop called "mostar kolodvor"</a>, bus trip takes ~45 minutes]. i&#8217;ve passed by the sanctuary in medjugorje and hiked to the Krizevac hill. tickets costed 3.5BAM per trip.</p>
<p>2011-10-12; after 2 days of sleeping in mostar i took a bus to sarajevo [18 BAM]. road between those two cities was great &#8211; most of the time in the valley between quite high hills on both sides, with some mountain rivers, bridges&#8230; great views. </p>
<p>sarajevo was in smog &#8211; mix of fog, smoke from home wood-powered fireplaces and probably industrial smoke. city &#8211; like mostar &#8211; is surrounded by hills, with lot of steep streets and houses built on uneven ground. it&#8217;s big city&#8230; with old part that is mix of turkish remainings [old mosques] and buildings erected by austrians and soc-realistic ugliness. it all feels a bit familiar &#8211; like poland 10 years ago. there is so many people selling something &#8211; clothes, fruits, vegs, 2nd hand stuff &#8211; everywhere. on every corner. old town is full of people drinking coffee and smoking :/. around the old district there are plenty of craftsman shops where people do coffee-mugs and &#8216;other stuff made of metal&#8217;. 2nd day in sarajevo was rainy &#8211; it was only bad-weather-day during my trip. people looked strange at me walking around in shorts &#8230; but weather was ok-ish for that. ~ 7C in the worst case. mostly 10-18.</p>
<p>2011-10-14; train from sarajevo to belgrade [34BAM] was supposed to take 8h. it took 11.. there was <a href="http://www.balkans.com/open-news.php?uniquenumber=122848">strike action</a> and we had to wait for a replacement bus. it&#8217;s just 200km in the straight line but because of something [lack of infrastructure? destroyed infrastructure] there is no short bus or train route between those two. funny thing.. train had just one engine cart and one passenger cart&#8230; very very short and actually not crowded.</p>
<p>belgrade is big and crowded.. and it&#8217;s last part of my trip. it feels like warsaw [in bad badness way]; i hiked around some old fort, took a longer walk to the modernistic [=built 30-40 years ago] district&#8230; spoke with hostel host about their view on the past war, nato, split of yougoslavia. croatia/bosnia&#038;herzegovina/serbia &#8211; people speak here almost the same language, but&#8230; in serbia they use cyrylic. well they are undecided what to use &#8211; some signs/places are written both in latin and cyrylic, some &#8211; just cyrylic, some &#8211; just latin. </p>
<p>all ex-yougoslavia is filled with people smoking &#8211; everywhere, on the streets, in the trains, bars.. it&#8217;s still &#8216;cool&#8217; to smoke here apparently.</p>
<p>food was good&#8230; cheap and fresh and tasty and smelling great. wherever i&#8217;ve been there were veg/fruit markets. with people selling piles of paprikas, a-bit-bitter-but-great mandarines, grapefruits&#8230; and meat/fish &#8211; sold in very &#8216;uncivilized&#8217; [in a good way] conditions. just watching it sold would kill more sensitive swedes. </p>
<p>i slept in hostels.. cheap hostels &#8211; paying 10e/night all except belgrade where it costed whooping 22e/night. in split/mostar/sarajevo i was the only person in hostels [not just a hostel room]&#8230; was very good, clean.. and super-central. </p>
<p>i flew back on 2011-10-17. </p>
<p>to wrap up: you&#8217;ll not find bus time tables; heck &#8211; you&#8217;ll not even find bus numbers on the bus stops in the cities i visited [maybe except Belgrade]. research on the net [or not; i did not], be patient and ask people. exchanging euro/usd to the local currency is not a problem. </p>
<p>pictures: <a href="http://fot.kudzia.eu/index.php/20111018-yugoslavia">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2011/10/croatia-bosnia-herzegovina-serbia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kiev</title>
		<link>http://kudzia.eu/b/2011/09/kiev/</link>
		<comments>http://kudzia.eu/b/2011/09/kiev/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 20:13:12 +0000</pubDate>
		<dc:creator>.pQd</dc:creator>
				<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://kudzia.eu/b/?p=849</guid>
		<description><![CDATA[i&#8217;ve spent 3 days in kiev&#8230; it was quite cool&#8230; familiar and different at the same time. good food, fresh fruits, still some summer left [not much of it in sweden]. i flew to/from zhulyany airport and found connections to the city center &#8230; a bit confusing. so maybe this will help others. private bus [...]]]></description>
			<content:encoded><![CDATA[<p>i&#8217;ve spent 3 days in kiev&#8230;<br />
<span id="more-849"></span><br />
it was quite cool&#8230; familiar and different at the same time. good food, fresh fruits, still some summer left [not much of it in sweden].</p>
<p>i flew to/from zhulyany airport and found connections to the city center &#8230; a bit confusing. so maybe this will help others. private bus [Marshrutka / маршру́тка] 169 gave me good connection back from the center . bus stop is near Circus / Цирк , behind the Ukraina shopping mall &#8211; on the Pavla Pestelya St / ул. Павла Пестеля &#8211; <a href="http://maps.google.com/maps?saddr=%D0%B2%D1%83%D0%BB.+%D0%9F%D0%B0%D0%B2%D0%BB%D0%B0+%D0%9F%D0%B5%D1%81%D1%82%D0%B5%D0%BB%D1%8F%2F%D1%83%D0%BB.+%D0%9F%D0%B0%D0%B2%D0%BB%D0%B0+%D0%9F%D0%B5%D1%81%D1%82%D0%B5%D0%BB%D1%8F&#038;daddr=%D0%B2%D1%83%D0%BB.+%D0%9F%D0%B0%D0%B2%D0%BB%D0%B0+%D0%9F%D0%B5%D1%81%D1%82%D0%B5%D0%BB%D1%8F%2F%D1%83%D0%BB.+%D0%9F%D0%B0%D0%B2%D0%BB%D0%B0+%D0%9F%D0%B5%D1%81%D1%82%D0%B5%D0%BB%D1%8F&#038;hl=en&#038;ie=UTF8&#038;ll=50.446021,30.490397&#038;spn=0.002876,0.010986&#038;sll=50.444791,30.492103&#038;sspn=0.002876,0.006899&#038;geocode=FTW7AQMdQz3RAQ%3BFVG8AQMdqz7RAQ&#038;vpsrc=6&#038;mra=mift&#038;mrsp=1&#038;sz=17&#038;t=m&#038;z=17">here</a>. but&#8230; if you plan to catch it &#8211; check one day before or have enough time to grab a taxi.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudzia.eu/b/2011/09/kiev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

