<?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>Alexey Bokov's weblog &#187; ubuntu</title>
	<atom:link href="http://bokov.net/weblog/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://bokov.net/weblog</link>
	<description>Anything that interests me</description>
	<lastBuildDate>Tue, 21 Feb 2012 15:30:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MySQL create user and add table</title>
		<link>http://bokov.net/weblog/linux/mysql-create-user-and-add-table/</link>
		<comments>http://bokov.net/weblog/linux/mysql-create-user-and-add-table/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 12:05:07 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=619</guid>
		<description><![CDATA[Short how-to: root@215003:~# mysql -u root -p Enter password: mysql&#62; CREATE DATABASE s_db; mysql&#62; GRANT ALL PRIVILEGES ON s_db.* to 's_user'@'localhost' IDENTIFIED BY '12345678'; mysql&#62; FLUSH PRIVILEGES; mysql&#62;exit mysql -u s_user -p s_db &#60; database.sql &#60;code&#62;]]></description>
			<content:encoded><![CDATA[<p>Short how-to:<br />
<code><br />
root@215003:~# mysql -u root -p<br />
Enter password:<br />
mysql&gt; CREATE DATABASE s_db;<br />
mysql&gt; GRANT ALL PRIVILEGES ON s_db.* to 's_user'@'localhost' IDENTIFIED BY '12345678';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt;exit<br />
mysql -u s_user -p s_db &lt; database.sql<br />
&lt;</code>code&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/linux/mysql-create-user-and-add-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon EC2 announced  micro instances &#8211; 2 cents/hour</title>
		<link>http://bokov.net/weblog/ec2/amazon-ec2-announced-micro-instances-2-centshour/</link>
		<comments>http://bokov.net/weblog/ec2/amazon-ec2-announced-micro-instances-2-centshour/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 11:41:59 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[compute grid]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[microinstances]]></category>
		<category><![CDATA[Simple Storage Service]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=552</guid>
		<description><![CDATA[Guys from EC2 announced micro instances &#8211; it costs 2 (two) cents per hour for linux and now it&#8217;s will costs less than traditional dedicated hosting with root access &#8211; monthly payment for EC2 micro instance will be about 15 USD, and price for root/linux on dedicated hosting will be about 30 USD/month. It&#8217;s really [...]]]></description>
			<content:encoded><![CDATA[<p>Guys from EC2 <a href="http://aws.amazon.com/about-aws/whats-new/2010/09/09/announcing-micro-instances-for-amazon-ec2/">announced micro instances</a> &#8211; it costs 2 (two) cents per hour for linux and now it&#8217;s will costs less than traditional dedicated hosting with root access &#8211; monthly payment for EC2 micro instance will be about <strong>15 USD</strong>, and price for root/linux on dedicated hosting will be about 30 USD/month. It&#8217;s really good news &#8211; you can have 100 boxes cluster  just for two usd per hour! Bad thing is that micro instances don&#8217;t have their own disk space &#8211; EBS only, looks like this best ever use case for this type of instances will be highly-distributed computational grid with all data stored in RAM. And don&#8217;t forget that EBS will costs you some money &#8211; <a href="http://aws.amazon.com/ebs/">$0.10 per allocated GB per month Amazon EBS also charges $0.10 per 1 million I/O requests you make to your volume </a>. Fredrick Poller&#8217;s already check out micro instances performance by sysbench : <a href="http://poller.se/2010/09/amazon-ec2-micro-instance-how-fast-is-it/">Amazon EC2 Micro instance, how fast is it?</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/ec2/amazon-ec2-announced-micro-instances-2-centshour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where&#8217;s Sun JDK on Ubuntu 10.04 ?</title>
		<link>http://bokov.net/weblog/linux/wheres-sun-jdk-on-ubuntu-10-04/</link>
		<comments>http://bokov.net/weblog/linux/wheres-sun-jdk-on-ubuntu-10-04/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 13:46:08 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[sun jdk]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu 10.04]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=540</guid>
		<description><![CDATA[By unknown reasons Sun JDK was moved to partner repository, so to use sun jdk you need to do this steps sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" sudo apt-get update sudo apt-get upgrade and then enjoy : sudo apt-cache search jdk &#124; grep sun sun-java6-source - Sun Java(TM) Development Kit (JDK) 6 source files sun-java6-jre [...]]]></description>
			<content:encoded><![CDATA[<p>By unknown reasons <a href="https://wiki.ubuntu.com/LucidLynx/ReleaseNotes#Sun%20Java%20moved%20to%20the%20Partner%20repository">Sun JDK was moved to partner repository</a>, so to use sun jdk you need to do this steps<br />
<code><br />
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"<br />
sudo apt-get update<br />
sudo apt-get upgrade<br />
</code><br />
and then enjoy :<br />
<code><br />
sudo apt-cache search jdk | grep sun<br />
sun-java6-source - Sun Java(TM) Development Kit (JDK) 6 source files<br />
sun-java6-jre - Sun Java(TM) Runtime Environment (JRE) 6 (architecture independent files)<br />
sun-java6-jdk - Sun Java(TM) Development Kit (JDK) 6<br />
sun-java6-javadb - Java(TM) DB, Sun Microsystems' distribution of Apache Derby<br />
sun-java6-demo - Sun Java(TM) Development Kit (JDK) 6 demos and examples<br />
sun-java6-bin - Sun Java(TM) Runtime Environment (JRE) 6 (architecture dependent files)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/linux/wheres-sun-jdk-on-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>bash tips &#8211; convert to lowercase</title>
		<link>http://bokov.net/weblog/programming/bash-tips-convert-to-lowercase/</link>
		<comments>http://bokov.net/weblog/programming/bash-tips-convert-to-lowercase/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 13:27:18 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sed. perl]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=519</guid>
		<description><![CDATA[You can use sed : sed -e 's/\([^\d]*\)/\L\1/' in.txt > out.txt or perl inliner : perl -ne 'utf8::decode $_; $_ = lc $_; utf8::encode $_; print' in.txt > out.txt . Both guys works fine for unicode file too.]]></description>
			<content:encoded><![CDATA[<p>You can use sed  :<br />
<code><br />
sed -e 's/\([^\d]*\)/\L\1/' in.txt > out.txt<br />
</code><br />
 or perl inliner :<br />
<code><br />
perl -ne 'utf8::decode $_; $_ = lc $_; utf8::encode $_; print' in.txt > out.txt<br />
</code>.<br />
Both guys works fine for unicode file too.</p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/programming/bash-tips-convert-to-lowercase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>telnet in bash scripts</title>
		<link>http://bokov.net/weblog/administration/telnet-in-bash-scripts/</link>
		<comments>http://bokov.net/weblog/administration/telnet-in-bash-scripts/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 13:34:01 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[telnet]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=512</guid>
		<description><![CDATA[Using telnet in bash scripts to automate some stuff ? It&#8217;s really easy, here&#8217;s an example to tell &#8220;hello world&#8221; on telnet server : req="hello world" server="my_server 1234" val=`( echo open ${server} sleep 3 echo "${req}" sleep 1 ) &#124; telnet` echo $val]]></description>
			<content:encoded><![CDATA[<p>Using telnet in bash scripts to automate some stuff ? It&#8217;s really easy, here&#8217;s an example to tell &#8220;hello world&#8221; on telnet server :<br />
<code></p>
<p>req="hello world"<br />
server="my_server 1234"<br />
val=`( echo open ${server}<br />
  sleep 3<br />
  echo "${req}"<br />
  sleep 1 ) | telnet`<br />
echo $val<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/administration/telnet-in-bash-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create list of screenshots for list of urls ?</title>
		<link>http://bokov.net/weblog/search-engines/how-to-create-list-of-screenshots-for-list-of-urls/</link>
		<comments>http://bokov.net/weblog/search-engines/how-to-create-list-of-screenshots-for-list-of-urls/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 13:34:24 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[search engines]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[screenshots]]></category>
		<category><![CDATA[thumbnails]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=510</guid>
		<description><![CDATA[Okay, we have text file with list of urls and want to have firefox&#8217;s screenshots from this pages and also we need to have this screenshots in some normalized resolution ( like all images should be in 300&#215;400 &#8211; thumbnails ). First of all you need to install Command line print Firefox add-on. Then create [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, we have text file with list of urls and want to have firefox&#8217;s screenshots from this pages and also we need to have this screenshots in some normalized resolution ( like all images should be in 300&#215;400 &#8211; thumbnails ). First of all you need to install <a href="http://sites.google.com/site/torisugari/commandlineprint2">Command line print Firefox add-on</a>. Then create some simple script which will run firefox with needed url, print screenshot and close ( in my case via kill &#8211; may be it&#8217;s too brutal ) firefox in cycle. It may look like this  ( url_list.txt &#8211; file with urls &#8211; each url on its own line <img src='http://bokov.net/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ), after running this script you will have many *.png files which is screenshots for ulrs &#8211; 0.png &#8211; for first url in urls_list.txt, 1.png for second and so on.<br />
<code><br />
#!/bin/bash<br />
id=0<br />
while read line<br />
do<br />
firefox -print $line -printmode png -printdelay 10 -printfile ${id}.png<br />
ps ax | grep firefox  | awk '{ print $1 }' | xargs kill -9 ;<br />
id=$[$id+1]<br />
done &lt; urls_list.txt<br />
</code></p>
<p>And now then we have screenshots ( all this guys are in different resolution in common ) then we need to normalize them &#8211; to create thumbnails for all images in 300&#215;400 resolution &#8211; convert helps!<br />
<code><br />
for f in *.png;<br />
do<br />
convert -thumbnail 300x400!  ${f} thumb_${f}<br />
done<br />
</code><br />
And we have many thumb_*.pn with 300&#215;400 resolution all. A little note &#8211; using resolution without ! sign will work in another way &#8211; resize will be processed proportionally with using resize only for one dimension ( bigger one ).</p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/search-engines/how-to-create-list-of-screenshots-for-list-of-urls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SVN vs GIT : performance tests and comparing table</title>
		<link>http://bokov.net/weblog/project-managment/comparing-svn-vs-git-in-performance-test/</link>
		<comments>http://bokov.net/weblog/project-managment/comparing-svn-vs-git-in-performance-test/#comments</comments>
		<pubDate>Mon, 17 May 2010 13:38:44 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[project managment]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[version control systems]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=377</guid>
		<description><![CDATA[Here&#8217;s some stuff about ( yeah, I know &#8211; &#8216;geeks, stop migrating from svn and git and vise versa &#8211; just developer code and don&#8217;t spent time on this!&#8216; ) svn and git comparison. What do we have : git and svn installed on a same server, empty both svn and git repositories &#8211; I [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some stuff about ( yeah, I know &#8211; &#8216;<em>geeks, stop migrating from svn and git and vise versa &#8211; just developer code and don&#8217;t spent time on this!</em>&#8216; ) svn and git comparison.</p>
<p>What do we have : git and svn installed on a same server, empty both svn and git repositories &#8211; I will add same data and provide same changes in both repositories,  and also, in another folder, I will checkout how update changes works &#8211; so in this tests I&#8217;m going to figure out how it works for &#8216;commiters&#8217; and for &#8216;those who update changes&#8217;. My tests deal with  typical operations with version control systems  &#8211; checkout time for adding, pushing and pulling various types of data and checkout how update for them will work &#8211; test&#8217;s detailed information is below table. For git I use git+ssh protocol, for svn I use svn protocol. I don&#8217;t provide any special configuration nor for git nor for svn &#8211; all settings is about to be default. Also I would like to note that this tests is partially incomplete &#8211; I don&#8217;t checkout how delete, branching, merging and some other functions works &#8211; so in future I will try to add these points onto this test. Main result of this test &#8211; git is faster than svn about a 2-3 times in typical configuration. There&#8217;s only one really bad points &#8211; git works bad on pretty big files ( > 300 mb size), for some big size ( ~1gb ) it git even can exit with error about memory leak &#8211; there&#8217;s some special git-related project &#8211; like <a href="http://caca.zoy.org/wiki/git-bigfiles">git-bigfiles</a> &#8211; this stuff should help you to work with git and big files together.</p>
<div>
<table border="3" width="100%" align="left">
<tbody>
<tr>
<th></th>
<th>svn</th>
<th>git</th>
<th>svn/git</th>
</tr>
<tr>
<td><span style="text-decoration: underline;"><a href="#test1">Test 1</a></span> : adding boost 1_43</td>
<td>add  ( 1 sec )+ commit ( 600 sec ) = 601 sec</td>
<td>add ( 3 sec ) + commit ( 86 sec ) + push ( 612 sec ) = 701 sec</td>
<td>0.85</td>
</tr>
<tr>
<td>Test 2: checkout repository after <span style="text-decoration: underline;"><a href="#test1">Test 1</a></span></td>
<td>svn co = 109 sec</td>
<td>clone = 18 sec</td>
<td>6.05</td>
</tr>
<tr>
<td><span style="text-decoration: underline;"><a href="#test3">Test 3</a></span> : small changes in sources &#8211; add first line with comment to some files &#8211; 346 files changed</td>
<td>svn commit = 5 sec</td>
<td>commit(2 sec ) + push ( 2 sec ) =4 sec</td>
<td>~1</td>
</tr>
<tr>
<td>Test 4: update after this <span style="text-decoration: underline;"><a href="#test3">Test 3</a></span></td>
<td>svn update = 15 sec</td>
<td>git pull ( 7 sec)</td>
<td>~2</td>
</tr>
<tr>
<td><a href="#test5">Test 5</a>: bigger change  &#8211; add first line with comment to 5363 files</td>
<td>svn commit = 103 sec</td>
<td>commit ( 6 sec ) + push ( 18 sec ) = 24 sec</td>
<td>4.29</td>
</tr>
<tr>
<td>Test 6: update after <a href="#test5">Test 5</a></td>
<td>svn update = 28 sec</td>
<td>git pull = 12 sec</td>
<td>2.3</td>
</tr>
<tr>
<td><a href="#test7">Test 7</a>: real-life project add ( 2.6 gb of data )</td>
<td>svn add(21) + svn commit(1h 2m 25s) = 3 766 sec</td>
<td>add (38 ) + commit ( 1m23 ) + push ( 18m28 ) = 1 m 51 + 18m 28sec= 20 m 19 sec = 20 m 19 sec = 1 219 sec</td>
<td>3.1</td>
</tr>
<tr>
<td>Test 8: update after <a href="$test7">Test 7</a></td>
<td>svn update ( 11m 58 sec ) =  718 sec</td>
<td>git pill = 5m 27 sec = 327 sec</td>
<td>~2.2</td>
</tr>
<tr>
<td><a href="#test9">Test 9</a>: source change (change namespace visibility)</td>
<td>svn commit ( 1m 28 sec ) = 98 sec</td>
<td>commit (5 sec ) + push ( 3 sec) = 8 sec</td>
<td>12.25</td>
</tr>
<tr>
<td>Test 10 : update after <a href="#test9">Test 9</a></td>
<td>svn up  = 22 sec</td>
<td>pull ( 9sec)</td>
<td>2.4</td>
</tr>
<tr>
<td>Test 11: full checkout project</td>
<td>svn co 12m 45sec = 765 sec</td>
<td>pull ( 4 min 3 sec ) =  243 sec</td>
<td>3.14</td>
</tr>
<tr>
<td><a href="#test12">Test 12</a>: big file test : apache log ( 50 mb )</td>
<td>svn add(3) + commit (1m 27s ) = 1m 30 sec = 90 sec</td>
<td>add (3) + commit(6) + push (1m 18 sec) = 1m 17 sec = 77 sec</td>
<td>1.16</td>
</tr>
<tr>
<td>Test 13 update after <a href="#12">test 12</a></td>
<td>up = 26 sec</td>
<td>pull  = 17 sec</td>
<td>1.52</td>
</tr>
<tr>
<td><a href="#test14">Test 14</a> : big files test: c++ sources in one file ( 70 mb )</td>
<td>add(3) + commit(1m 15 sec) = 1m 18 sec =  78 sec</td>
<td>add (2) + commit (2) + push ( 56 sec ) = 1 m = 60 sec</td>
<td>1.3</td>
</tr>
<tr>
<td>Test 15 : update after <a href="test14">Test 14</a></td>
<td>up = 28 sec</td>
<td>pull = 14 sec</td>
<td>~2</td>
</tr>
<tr>
<td><a href="#test16">Test 16</a>: 100 MB xml with encoded data</td>
<td>add(3) + commit (8m 37 sec)= 8m 40 sec = 520 sec</td>
<td>add (9 sec) + commit (1) + push ( 24m 34 sec) = 24 m 44 sec = 1484</td>
<td>0.35</td>
</tr>
<tr>
<td>Test 17 : update after <a href="test16">Test 16</a></td>
<td>up = 52 sec</td>
<td>pull = 47 sec</td>
<td>1.10</td>
</tr>
<tr>
<td><a href="#test18">Test 18</a> : 300 MB xml with encoded data</td>
<td>add ( 1 ) + commit( 9 m 26 sec )= 9m 27 sec = 567 sec</td>
<td>add (3) + commit(8) +push (17m  12 sec) = 17 m 33 sec = 1053 sec</td>
<td>0.53</td>
</tr>
<tr>
<td>Test 19:  update after <a href="#test18">test 18</a></td>
<td>1m 39 sec</td>
<td>pull= 1m 29 sec</td>
<td>1.1</td>
</tr>
<tr>
<td><a href="#test20">Test 20</a> : 1200 MB xml with encoded data</td>
<td>1h 24m 34s</td>
<td><a>failed</a></td>
<td>?</td>
</tr>
<tr>
<td>Test 21 : update after <a href="test20">Test 20</a></td>
<td>5m 47 sec</td>
<td><a>failed</a></td>
<td>?</td>
</tr>
<tr>
<td><em> </em></td>
<td><em> </em></td>
<td><em> </em></td>
<td><em>~2.6</em></td>
</tr>
</tbody>
</table>
</div>
<p>So &#8211; In common we have that git is about 2.6 faster than svn.</p>
<p>I understand that this is may be very non-precious tests and also I don&#8217;t check how delete or branching works, but anyway I checkout my own most used operations during this test. In common we can see that git is more than 2 times faster than svn &#8211; everything looks fine with git, except one really bad thing  &#8211; work with big ( more than 100 mb size ) files &#8211; for this type of file svn is really works faster, and for too big ( more than 1 GB files ) git even crashed during &#8216;git push&#8217; command with &#8216;<em>fatal: Out of memory, malloc failed</em>&#8216; message.</p>
<p><a name="test1"><br />
<strong>Test1</strong></a> boost 1_43 C++ library :  29135 files and 31609 objects  including folders, 286 Mb summary size</p>
<p><a name="test3"><strong>Test 3</strong> </a><br />
I just add first line to some cpp files :<br />
<code><br />
find ./ -name "*a???.cpp" -exec sed -i 1i"//test comment `date` : {}" {} \;<br />
</code></p>
<p><a name="test5"> <strong>Test 5 </strong></a><br />
Change all *.cpp files in the same way :<br />
<code><br />
find ./ -name "*.cpp" -exec sed -i 1i"//big test comment2 `date` : {}" {} \;<br />
</code></p>
<p><a name="test6"><strong>Test 7</strong>:  Add  real-life repository :  many sources in cpp, perl, erlang, makefiles, bash scripts, MS word documents, images, pdf&#8217;s, compiled binaries, resource files, etc,  in sum it contains 4605 files, size is about 2.6G</a></p>
<p><a name="test9"><strong>Test 9</strong>:</a><br />
Refactoring simulation : make to use  &#8220;std::&#8221; specifier for all cerr and cout. Not sure it&#8217;s really safe in real-life-development, but it&#8217;s okay for test purpose.<br />
<code><br />
find ./ -name "*.h"   -exec sed -i "s/  cerr/std::cerr/g" {} \;<br />
find ./ -name "*.cpp"   -exec sed -i "s/  cerr/std::cerr/g" {} \;<br />
find ./ -name "*.cpp"   -exec sed -i "s/  cout/std::coutr/g" {} \;<br />
</code></p>
<p><a name="test11"><strong>Test 11</strong></a>:  checkout whole project</p>
<p><a name="test12"><strong>Test 12</strong></a>: adding 50 mb text file &#8211; apache logs</p>
<p><a name="test14"><strong>Test 14</strong></a>: adding 72 mb file  &#8211; many c++ sources concantenated in one big file</p>
<p><a name="test16"><strong>Test 16</strong></a>: small xml : 100 mb &#8211; xml file sample from real life</p>
<p><a name="test18"><strong>Test 18</strong></a>: medium xml : 300 mb &#8211; same ( but bigger ) real-life xml fil</p>
<p><a name="test20"><strong>Test 20</strong></a>: large xml : 1200 mb &#8211; sample of pretty big real-life xml</p>
<p><a name="git_failed">git push failed</a> with error message of memory leak ( as I can see ) : &#8220;fatal: Out of memory, malloc failed&#8221;</p>
<p>I collect some usefull information about different source text repositories <a href="http://bokov.net/weblog/project-managment/version-control-systems-git-svn-cvs-mercury-links/">version control systems : git, svn, cvs, mercury links</a> &#8211; take a look on this if you&#8217;re interested in different VCS system using.</p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/project-managment/comparing-svn-vs-git-in-performance-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using JSON with bash</title>
		<link>http://bokov.net/weblog/programming/using-json-with-bash/</link>
		<comments>http://bokov.net/weblog/programming/using-json-with-bash/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 07:21:42 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[jsawk]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=341</guid>
		<description><![CDATA[Using json in bash : jsawk : work with an array of JSON objects read from stdin, filter them using JavaScript to produce a results array that is printed to stdout. For example get&#8217;s json ( from Yahoo image search by &#8216;madonna&#8217; query ) and add some info ( madonna&#8217;s real name ) to this [...]]]></description>
			<content:encoded><![CDATA[<p>Using json in bash :</p>
<ul>
<li><a href="http://github.com/micha/jsawk">jsawk</a> : work with an array of JSON objects read from stdin, filter them using JavaScript to produce a results array that is printed to stdout. For example get&#8217;s json ( from Yahoo image search by &#8216;madonna&#8217; query ) and add some info ( madonna&#8217;s real name ) to this</li>
<p><code> wget http://bokov.net/json_example.json<br />
cat json_example.json  | ./jsawk "this.ResultSet.RealName=\"Louise Ciccone\"" &gt; updated_info.json<br />
</code></p>
<li>you can use some bash/awk/sed stuff to parse json. For example &#8211; list all image urls from json</li>
<p><code>wget http://bokov.net/json_example.json<br />
cat json_example.json  | sed -e 's/[{}]/''/g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i&lt;=n; i++) print a[i]}' | grep '"ClickUrl":' | sed 's/:/ /1' | awk -F" " '{ print $2 }'<br />
</code></p>
<li>or use library from <a href="http://www.json.org/">json.org</a> for language which you like <img src='http://bokov.net/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<p>via <a href="http://l-o-n-g.livejournal.com/146422.html">v.kruchkov</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/programming/using-json-with-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving git repo from github to another location with ssh access</title>
		<link>http://bokov.net/weblog/project-managment/moving-git-repo-from-github-to-another-location-with-ssh-access/</link>
		<comments>http://bokov.net/weblog/project-managment/moving-git-repo-from-github-to-another-location-with-ssh-access/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 08:49:10 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[project managment]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=333</guid>
		<description><![CDATA[We have git repo at github (  and would like to move onto some our corporate box inside our network, for example on internal.bokov.net. This repository is shared for group of developers and all who have ssh access onto internal.bokov.net shall have right to commits onto git repository. So first of all prepare place for [...]]]></description>
			<content:encoded><![CDATA[<p>We have git repo at github (  and would like to move onto some our corporate box inside our network, for example on internal.bokov.net. This repository is shared for group of developers and all who have ssh access onto internal.bokov.net shall have right to commits onto git repository. So first of all prepare place for git repo at new hosting :<br />
<code><br />
ssh user@internal.bokov.net<br />
cd var<br />
mkdir git_repo<br />
chmod 777 git_repo<br />
cd git_repo<br />
mkdir my_project<br />
cd my_project<br />
git init --bare --shared=all<br />
cd objects<br />
chmod g+ws *<br />
</code></p>
<p>Next clone existing repo and change its settings to point onto internal.bokov.net<br />
<code><br />
git clone --bare git@github.com:bokov/github_project.git<br />
git remote add -t master -m master origin ssh://internal.bokov.net/var/git_repo/my_project/<br />
git push origin master<br />
</code></p>
<p>to start work with new repo just use<br />
<code><br />
git clone ssh://internal.bokov.net/var/git_repo/my_project/<br />
</code></p>
<p>have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/project-managment/moving-git-repo-from-github-to-another-location-with-ssh-access/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu usefull tips</title>
		<link>http://bokov.net/weblog/administration/add-user-to-ubuntu/</link>
		<comments>http://bokov.net/weblog/administration/add-user-to-ubuntu/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 16:03:38 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[stuff]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=328</guid>
		<description><![CDATA[Ubuntu doesn&#8217;t asking for login after boot up ( may happen after unexpected shutdown ) : press Ctrl-Alt-F1 to login in terminal mode and use fsck to fix it Add user short memo : [root@my-box ~]# useradd -g users -u 560 tuser [root@my-box ~]# passwd tuser ps. sudo will be required in not-root case Proper [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>Ubuntu doesn&#8217;t asking for login after boot up ( may happen after unexpected shutdown ) :<br />
press Ctrl-Alt-F1 to login in terminal mode and use fsck to fix it
</li>
<p></p>
<li>Add user short memo :<code><br />
[root@my-box ~]# useradd -g users -u 560 tuser<br />
[root@my-box ~]# passwd tuser<br />
</code><br />
ps. sudo will be required in not-root case <img src='http://bokov.net/weblog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</li>
<p></p>
<li> Proper access rights for .ssh files :<code><br />
chmod 700 ~/.ssh<br />
chmod 600 ~/.ssh/id_rsa<br />
chmod 644 ~/.ssh/id_rsa.pub<br />
chmod 644 ~/.ssh/authorized_keys<br />
chmod 644 ~/.ssh/known_hosts<br />
</code>
</li>
<p></p>
<li> List all files in folder sorted by size :  <code><br />
find . -type f -exec  du -k "{}" \; | sort -n<br />
</code>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/administration/add-user-to-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

