<?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>Things n&#039; Stuff</title>
	<atom:link href="http://geek.co.il/wp/feed" rel="self" type="application/rss+xml" />
	<link>http://geek.co.il/wp</link>
	<description>Thoughts about the universe in general</description>
	<lastBuildDate>Sun, 15 Jan 2012 12:41:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>Scanning Hand Written Texts Into High Quality Digital Files</title>
		<link>http://geek.co.il/wp/2012/01/04/scanning-hand-written-texts-into-high-quality-digital-files</link>
		<comments>http://geek.co.il/wp/2012/01/04/scanning-hand-written-texts-into-high-quality-digital-files#comments</comments>
		<pubDate>Tue, 03 Jan 2012 23:37:21 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2012/01/04/scanning-hand-written-texts-into-high-quality-digital-files</guid>
		<description><![CDATA[The purpose of this exercise is to convert a hand written note &#8211; such as your signature &#8211; to high quality digital files that can be used to embed &#8220;hand write&#8221; into documents &#8211; such as when someone asks you to fax them a &#8220;signed&#8221; copy of the PDF they emailed you. You&#8217;d be surprised [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of this exercise is to convert a hand written note &#8211; such as your signature &#8211; to high quality digital files that can be used to embed &#8220;hand write&#8221; into documents &#8211; such as when someone asks you to fax them a &#8220;signed&#8221; copy of the PDF they emailed you. You&#8217;d be surprised how often that happens around here.</p>
<p>Required Ingridients:</p>
<ul>
<li>A computer with The GIMP installed</li>
<li>Your handy smart phone with a 5MP or better camera</li>
<li>A good pen and paper.</li>
</ul>
<p>So anyway, here&#8217;s the process from top to bottom, with pictures:</p>
<ol>
<li>Sit down at a proper table, and using a good black heavy-line pen on a white clean high-density paper, write what you need to write &#8211; slowly and deliberately but without pauses. Try not to smear the ink so you get clean continuous lines, otherwise the quality suffers a lot.<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/write-out.jpg"><img class="alignnone  wp-image-1896" title="write-out" src="http://geek.co.il/wp/wp-content/uploads/2012/01/write-out.jpg" alt="" width="576" height="432" /><span id="more-1895"></span></a></li>
<li>Now take your phone and start the camera app. Make sure that flash is on (not auto &#8211; always on), and if your camera supports it, set the &#8220;auto focus&#8221; mode to &#8220;Macro&#8221;. Position the camera close to the paper so that it sees your whole text and hold the shutter button (don&#8217;t release it yet) to let the camera focus. If you don&#8217;t get a clean focus then don&#8217;t take the shot, move the camera a bit away and try again until you get a clean focus.</li>
<li>After the picture is taken, load it into the computer. This part is usually the most complicated part of the whole process. On my phone I have &#8220;Google Docs&#8221; app installed, so I &#8220;Share&#8221; to &#8220;Docs&#8221; and I then use the browser to go to Google Docs and download the image file.<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/2012-01-03-22.21.01.jpg"><img class="alignnone  wp-image-1898" title="Hello World" src="http://geek.co.il/wp/wp-content/uploads/2012/01/2012-01-03-22.21.01.jpg" alt="" width="640" height="480" /></a></li>
<li>Now its time to start GIMP, load the picture and do the magic:<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_001.png"><img class="alignnone  wp-image-1899" title="Selection_001" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_001-300x207.png" alt="" width="441" height="303" /></a></li>
<li>The first tool to use is the &#8220;Crop&#8221; tool from the toolbox &#8211; we need the image contain only the actual hand written note we want to convert, and specifically we need to get rid of the edges of the picture where the flash didn&#8217;t highlight the paper well (because the camera was so close to the paper<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_0011.png"><img class="alignnone  wp-image-1902" title="Crop tool" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_0011.png" alt="" width="754" height="574" /></a><br />
The &#8220;Auto Shrink&#8221; feature is normally very useful for these kinds of jobs, but because of the inherently &#8220;noisy&#8217; background of the paper, it wouldn&#8217;t work at all &#8211; just do your best manually and leave a bit of margin around the text. When you&#8217;re done setting up the box around the text, then click the center of the selection to make the crop.</li>
<li>Next we need to clear the image of most of the background noise of the paper before the real work can begin &#8211; to do this we will use the popular &#8220;Unsharp Mask&#8221; filter<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_019.png"><img class="alignnone size-full wp-image-1912" title="Select &quot;Filters&quot; &quot;Enhance&quot; &quot;Unsharp Mask&quot;" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_019.png" alt="" width="790" height="466" /></a><br />
When the &#8220;Unsharp Mask&#8221; dialog comes up, push both the &#8220;Radius&#8221; and &#8220;Amount&#8221; sliders all the way to the end, while leaving the &#8220;Threshold&#8221; value at its default small value (I usually set it to 5, but any small number will work fine)<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_019.png"><img class="alignnone size-full wp-image-1913" title="Unsharp Mask at work" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_019.png" alt="" width="665" height="491" /></a><br />
After you apply the filter, the image would look drastically different, as you can see in the example below, but we&#8217;re not done yet<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_020.png"><img class="alignnone size-full wp-image-1914" title="Image much cleared up, but there are still a lot of artifacts" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_020.png" alt="" width="666" height="440" /></a><br />
If you look closely you&#8217;ll see that there are still some color artifacts present. In this example the photograph source is of rather high quality, but with less high quality input you may still see here some blobs and spots which should get taken care of by the next step.</li>
<li>To completely separate the hand written text from the background, we will use the &#8220;Threshold&#8221; command from the &#8220;Colors&#8221; menu &#8211; this will highlight in black only the ink from the photograph and will clear everything else to white. When the &#8220;Threshold&#8221; dialog opens, click the &#8220;Auto&#8221; button to automatically select the correct threshold value.<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_0191.png"><img class="alignnone size-full wp-image-1915" title="Threshold dialog" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_0191.png" alt="" width="781" height="406" /></a><br />
At this point we are basically done with the major part of the work. We need only prepare the image for embedding and possibly due a bit more clean up if the original wasn&#8217;t of a good enough quality and we still got some black blotches where there shouldn&#8217;t be any.</li>
<li>The next step is to remove the white background from the image so it can be later embed the image into another document without having a white box around the text, that hides whatever we were supposedly &#8220;writing over&#8221;. From the &#8220;Colors&#8221; menu select the &#8220;Color to Alpha&#8221; command and apply its default setting (which should be to have the color White converted to transparency)<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_004.png"><img class="alignnone size-full wp-image-1905" title="Desktop 5_004" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_004.png" alt="" width="591" height="362" /></a></li>
<li>If we still got some inky looking blotches, left from the previous stage that we want to remove, you can clean them up manually by adding a layer mask<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_015.png"><img class="alignnone size-full wp-image-1916" title="Add a layer mask" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_015.png" alt="" width="654" height="535" /></a><br />
And set it up to start completely white (opaque &#8211; which is the default)<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_016.png"><img class="alignnone size-full wp-image-1917" title="Layer mask dialog" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_016.png" alt="" width="347" height="473" /></a><br />
Once that is done &#8211; and you can see the layer mask as a white box to the right of the layer preview in the layers tab, take a paintbrush from the toolbox, and touch it to where you have noise that you want removed, careful not to touch actual lines<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_017.png"><img class="alignnone size-full wp-image-1918" title="Paintbrush tool" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_017.png" alt="" width="525" height="401" /></a><br />
Finally apply the layer mask by right clicking the layer in the layers tab and selecting &#8220;Apply Mask&#8221;</li>
<li>The last step is to save the result as a PNG file &#8211; so that we keep the transparency of the background.</li>
</ol>
<p>The new image is now ready for import into your PDF editing software of choise, or into any other document where you need to fake ink on paper. You can also, obviously, keep the digital file and use it many times without bothering your hardware (pen, paper and camera) again.</p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2012/01/04/scanning-hand-written-texts-into-high-quality-digital-files/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>מתכון: מרק חורף צהוב עם אפונה</title>
		<link>http://geek.co.il/wp/2011/12/03/%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%a6%d7%94%d7%95%d7%91-%d7%a2%d7%9d-%d7%90%d7%a4%d7%95%d7%a0%d7%94</link>
		<comments>http://geek.co.il/wp/2011/12/03/%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%a6%d7%94%d7%95%d7%91-%d7%a2%d7%9d-%d7%90%d7%a4%d7%95%d7%a0%d7%94#comments</comments>
		<pubDate>Sat, 03 Dec 2011 21:15:51 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Food]]></category>
		<category><![CDATA[Soups and Stews]]></category>
		<category><![CDATA[מתכונים]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/12/03/%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%a6%d7%94%d7%95%d7%91-%d7%a2%d7%9d-%d7%90%d7%a4%d7%95%d7%a0%d7%94</guid>
		<description><![CDATA[הנה מתכון למרק חם וצהוב לחורף, אם אתם בקטע של מרקים צהוביים (מזרחיים, מישהו היה אומר? אולי &#8211; לא יודע). הבסיס הוא אפונה יבשה צהובה (split pea) אז אפשר לקרוא למרק הזה מרק אפונה צהובה, אבל אני מעדיף &#8220;מרק צהוב עם אפונה&#8221; (בין השאר בגלל שאפשר להכין אותו בלי אפונה). מרכיבים: 400 גרם אפונה יבשה [...]]]></description>
			<content:encoded><![CDATA[<p>הנה מתכון למרק חם וצהוב לחורף, אם אתם בקטע של מרקים צהוביים (מזרחיים, מישהו היה אומר? אולי &#8211; לא יודע). הבסיס הוא אפונה יבשה צהובה (split pea) אז אפשר לקרוא למרק הזה מרק אפונה צהובה, אבל אני מעדיף &#8220;מרק צהוב עם אפונה&#8221; (בין השאר בגלל שאפשר להכין אותו בלי אפונה).</p>
<h4>מרכיבים:</h4>
<ul>
<li>400 גרם אפונה יבשה צהובה. אפשר להחליף בעדשים חומות או עדשים כתומות (אם כי הן קטנות יותר ונוטות להפוך לעיסה במרק). לא הייתי ממליץ לשים אפונה יבשה ירוקה או עדשים ירוקות כי המרק לא יקבל את הצבע הצהוב הרצוי שלו.</li>
<li>בצל גדול</li>
<li>תפוח אדמה בינוני או גדול. ניסיתי להחליף לקולורבי &#8211; תחליך התפ&#8221;א הסטנדרטי שלי וזה עובד, אבל לא מדהים.</li>
<li>שני גזרים בינוניים שטופים. אני בד&#8221;כ לא מקלף אותם למרות שאני יודע שיש כאלה שאוהבים את זה, ואני אומר &#8211; כל הויטמינים בקליפה!</li>
<li>2-3 פטריות &#8211; להסמיך את המרק. אפשר גם להחליף בקישוא אבל זה נותן למרק צבע יותר ירוק.</li>
</ul>
<h4>הכנה:</h4>
<p>להעמיד קלחת קטנה עם מים רותחים על חום בינוני-גבוה ולשפוך פנימה את האפונה היבשה או העדשים. לתת לזה לרחוש ולהוסיף מדי פעם מים אם המים לא מכסים את האפונה. נניח לאפונה להתבשל ולהתרכך בזמן שאנחנו מכינים את שאר הרכיבים.</p>
<p>לשים בסיר כף שמן ולקצוץ פנימה את הבצל. בגדול את הבצל אמורים לגרור כמו שנעשה את שאר הירקות, אבל בצל ופומפיה יסתיים בדמעות, אז אני פשוט קוצץ אותו לחתיכות קטנות. לשים על חום בינוני ולתת לבצל להתאדות עד שהוא שקוף. כשהבצל מוכן ומתחיל קצת להשחים, נשתמש בפומפיה בשביל לגרור לתוך הסיר את התפ&#8221;א (כדאי לקלף קודם, אבל אני מניח שלא חייבים) ואת הגזרים. אם החלטנו להשתמש בקישוא במקום בפטריה (או בנוסף &#8211; אני גמיש) אז גם הוא נכנס עכשיו. לכסות את הסיר ולתת לתערובת להתבשל לבד כ-20 דקות. כדאי לפתוח ולערבב מדי פעם.</p>
<p>כשהירקות מוכנים, להוריד את האפונה ולשטוף אותה במים נקיים &#8211; כדי לנקות את כל העמילנים ושאר השטויות שיוצאות בזמן הבישול ועושות קצף &#8211; אני שופך בזהירות את כל המים מהקלחת בלי לאבד את האפונה, ואז ממלא במים נקיים ושופך שוב פעם או פעמיים. לבסוף להוסיף את האפונה &#8211; בלי מים &#8211; לסיר. אם אנחנו רוצים לשים פטריות בפנים (מומלץ &#8211; זה גם מוסיף מאוד לטעם), אז עכשיו זה הזמן להוסיף אותן לסיר, שוב ע&#8221;י לגרור אותן בפומפיה.</p>
<p>למלא את הסיר במים רותחים, ולהביא לרתיחה. לערבב מדי פעם עד שהמרק רותח ואז להוריד לאש קטנה. לבשל כ-20 דקות, וכדאי לערבב מדי פעם.</p>
<p>אחרי 20 דקות, הגיע הזמן להוסיף תבלינים: אני שם כפית כורכום, שתי כפיות כמון, חצי כפית מלח, פלפל פפריקה מתוקה וג&#8217;ינגר כל אחד. לחילופין אבקת קארי המבוססת על כמון כורכום וכוסברה תחליף את רוב התבלינים האלה.</p>
<p>לבשל עוד 10 דקות על אש קטנה ולקרוא למרק &#8220;מוכן&#8221;.</p>
<p>בתיאבון.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://lukeford.net/blog/?p=38511">Longer, Hotter And More Water!</a> (lukeford.net)</li>
<li class="zemanta-article-ul-li"><a href="http://thespectacledbean.wordpress.com/2011/11/25/yesterdays-turkey-is-todays-soup/">Yesterday&#8217;s Turkey Is Today&#8217;s Soup</a> (thespectacledbean.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://balanceandblueberries.wordpress.com/2011/11/18/pea-soup-is-good-for-the-soul/">Pea Soup is good for the soul</a> (balanceandblueberries.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f9275130-cbbd-4ad7-869d-b5de1c4ce0a2" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/12/03/%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%a6%d7%94%d7%95%d7%91-%d7%a2%d7%9d-%d7%90%d7%a4%d7%95%d7%a0%d7%94/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Subversion svnserve daemon on CentOS</title>
		<link>http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos</link>
		<comments>http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos#comments</comments>
		<pubDate>Mon, 28 Nov 2011 15:04:04 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Secure Shell]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svnserve]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos</guid>
		<description><![CDATA[When you want to host a Subversion repository on your CentOS (or RHEL) server, its quite annoying that the only options available to serve your repository are SSH (using the svn+ssh:// schema in the Subversion URLs &#8211; it is basically set up out of the box, not tweaking necessary) and Apache&#8217;s mod_dav_svn (using the http:// [...]]]></description>
			<content:encoded><![CDATA[<p>When you want to host a <a class="zem_slink" title="Apache Subversion" href="http://subversion.apache.org/" rel="homepage">Subversion</a> repository on your <a class="zem_slink" title="CentOS" href="http://www.centos.org/" rel="homepage">CentOS</a> (or <a class="zem_slink" title="Red Hat Enterprise Linux" href="http://www.redhat.com/rhel/" rel="homepage">RHEL</a>) server, its quite annoying that the only options available to serve your repository are <a class="zem_slink" title="Secure Shell" href="http://en.wikipedia.org/wiki/Secure_Shell" rel="wikipedia">SSH</a> (using the <code>svn+ssh://</code> schema in the Subversion URLs &#8211; it is basically set up out of the box, not tweaking necessary) and Apache&#8217;s mod_dav_svn (using the <code>http://</code> or <code>https://</code> schema in the Subversion URLs &#8211; this is somewhat complex to setup but good instructions are easy to find on the web).</p>
<p>The main advantage of either of these methods is security: both have easy transport security (SSH by default, Apache if you set it to server over SSL) and are easy to setup authentication for (SSH authenticate against the system&#8217;s accounts using <a class="zem_slink" title="Pluggable Authentication Modules" href="http://en.wikipedia.org/wiki/Pluggable_Authentication_Modules" rel="wikipedia">PAM</a> and Apache authenticate against basically anything with a simple setup).</p>
<p>The main disadvantage of these methods are that they are slow (SSH is apparently somewhat faster then HTTP) and when supporting multiple large projects of many developers I started running into all kinds of weird connection errors when you try to manipulate many files on many projects at the same time.</p>
<p>Subversion itself offers another alternative using their own network service called svnserve &#8211; this is a standard unix daemon that listens on a specific port and uses a native protocol to communicate with Subversion clients (using the <code>svn://</code> schema in Subversion URLs). It offers very good performance, but no transport security (encryption) by default. Another major problem with using svnserve as a network service is that while CentOS ships the binary itself (it is required as part of the way that the svn+ssh:// protocol is implemented) it doesn&#8217;t ship any support files to run it as a standalone service nor to help with its configuration. Also by default svnserve can only authenticate users using its own Apache-style password database file &#8211; which makes it unsuitable to integrate in large organizations.</p>
<p><span id="more-1878"></span></p>
<p>In this article I&#8217;ll document how I setup snvserve as a network service to support a large development environment. The requirements do not include transport security because the server is on a private network and can only be accessed by trusted computers (either local or through a VPN), but we do need to have Subversion users authenticate against a central authentication server that is used by all local services. In my setup the authentication services is Mirosoft ActiveDirectory, but the local server is setup to authenticate to the ActiveDirectory using PAM, so we will setup svnserve to use PAM and gloss over the ActiveDirectory specifics.</p>
<p>The process is as follows:</p>
<ol>
<li>Set up your server: Install CentOS 6 and configure PAM to authenticate to your central authentication. Verify that users can SSH into the server using their login credentials.</li>
<li>Set up your Subversion repository: Install subversion and use svnadmin to create your repository. In the below examples I&#8217;ve created the repository under /var/svn</li>
<li>Set up svnserve to require authentication and do the authentication using the Cyrus SASL libraries: copy the file <code>svnserve.conf</code> from your repository&#8217;s configuration directory (for example <code>/var/svn/svnserve.conf</code>) to <code>/etc/svnserve.conf</code>. Edit it and add in the <code>[general]</code> section the following lines: <code><br />
anon-access = none<br />
auth-access = write<br />
realm = The Name of Your Repository<br />
</code> make sure that all other settings in that section are commented out. Now add, at the bottom of the file, a new section like this: <code><br />
[sasl]<br />
use-sasl = true<br />
</code></li>
<li>Setup the Cyrus SASL library to work with the <code>saslauthd</code> authentication service: create the file <code>/etc/sasl2/svn.conf</code> with the following content: <code><br />
pwcheck_method: saslauthd<br />
mech_list: plain login<br />
</code></li>
<li>Start the <code>saslauthd</code> service and make sure it always run when the system start, by executing the following commands:<code><br />
# service saslauthd start<br />
# chkconfig saslauthd on<br />
</code></li>
<li>Set up <code>saslauthd</code> to allow svnserve to authenticate using the main system&#8217;s PAM configuration, by executing the following command:<code><br />
# cd /etc/pam.d<br />
# ln -s system-auth svn<br />
</code></li>
<li>Create the <a class="zem_slink" title="UNIX System V" href="http://en.wikipedia.org/wiki/UNIX_System_V" rel="wikipedia">SysV</a> initialization script for svnserve &#8211; this will allow you to start and stop svnserve using the <code>service</code> command and have it run when the system start. This is the major part that I expected CentOS to ship but is missing. Creating a good SysV script is not trivial &#8211; you can do it yourself but I suggest using the script presented here. I&#8217;ve used the script from <a href="http://mohanjith.net/blog/2007/07/svnserve-init-script.html">this blog post</a> which is not bad but its implementation of <code>status</code> didn&#8217;t report the status of a dead process, so I modified it and you can download my modified version <a title="svnserve SysV init script" href="http://geek.co.il/wp/wp-content/uploads/2011/11/svnserve.gz">here</a>. The file is compressed because of WordPress, just download it, run it through gunzip and copy the resulting file to <code>/etc/init.d/svnserve</code> and then give it &#8220;execute permissions&#8221; using: <code><br />
# chmod 755 /etc/init.d/svnserve<br />
</code></li>
<li>Create a configuration file for the service by creating and editing the file <code>/etc/sysconfig/subversion.conf</code> with this content: <code><br />
OPTIONS="--config-file=/etc/svnserve.conf -r /var/svn"<br />
</code><br />
We use the <code>-r</code> option to limit svnserve access to only our repository, so have the value there point to your actual repository if its not <code>/var/svn</code></li>
<li>Set up svnserve to run when the system start, and then start the service itself: <code><br />
# chkconfig svnserve on<br />
# service svnserve start<br />
</code></li>
</ol>
<p>And that&#8217;s it &#8211; you should have svnserve listening on port 3690 and ready to serve clients. The URL you use to access the repository should include only the server name as svnserve access is already rooted to only your repository by the configuration file. So for example if my server is called <code>svn</code> then the URL will be <code>svn://svn</code>.</p>
<p>This setup will still allow you to access the repository using the <code>svn+ssh://</code> protocol as you would under a normal setup. It can be a bit confusing as access over SSH uses different paths then over the Subversion svnserve network service, because you have to use the full path to the repository on the local file system in the <code>svn+ssh://</code> URL. To circumvent this, its possible to get the SSH access to also be rooted to your repository&#8217;s path and thus be symmetric with the above setup. To do this, create a new file at <code>/usr/local/bin/svnserve</code> and put the following code in it: <code><br />
#!/bin/bash<br />
exec /usr/bin/svnserve "$@" -r /var/svn<br />
</code><br />
Give the file &#8220;execute permissions&#8221; by running <code><br />
# chmod 755 /usr/local/bin/svnserve<br />
</code>, so it can be executed by the Subversion client instead of the system&#8217;s svnserve binary. Now both native Subversion and SSH access use basically the same URL, except for the schema part.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://waterbiscuit.wordpress.com/2011/08/04/centossubversion-configuration/">CentOS &#8211; Subversion Configuration</a> (waterbiscuit.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/7505832/passwords-and-svn">Passwords and svn</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/7520886/importing-a-subversion-repository">Importing a subversion repository</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/375869/subversion-merging-repositories">Subversion &#8211; Merging Repositories</a> (stackoverflow.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=83f84754-5ff9-460b-a839-a9c61c13faa2" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>כן, אני מצטט את XKCD &#8211; תתבעו אותי</title>
		<link>http://geek.co.il/wp/2011/11/25/%d7%9b%d7%9f-%d7%90%d7%a0%d7%99-%d7%9e%d7%a6%d7%98%d7%98-%d7%90%d7%aa-xkcd-%d7%aa%d7%aa%d7%91%d7%a2%d7%95-%d7%90%d7%95%d7%aa%d7%99</link>
		<comments>http://geek.co.il/wp/2011/11/25/%d7%9b%d7%9f-%d7%90%d7%a0%d7%99-%d7%9e%d7%a6%d7%98%d7%98-%d7%90%d7%aa-xkcd-%d7%aa%d7%aa%d7%91%d7%a2%d7%95-%d7%90%d7%95%d7%aa%d7%99#comments</comments>
		<pubDate>Fri, 25 Nov 2011 00:56:15 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/25/%d7%9b%d7%9f-%d7%90%d7%a0%d7%99-%d7%9e%d7%a6%d7%98%d7%98-%d7%90%d7%aa-xkcd-%d7%aa%d7%aa%d7%91%d7%a2%d7%95-%d7%90%d7%95%d7%aa%d7%99</guid>
		<description><![CDATA[הקומיקס הזה של XKCD מתאר בדיוק את הרגשת חוסר האונים שיש לי לפחות פעמיים כל שבוע: [מוצג כאן ללא אישור המחבר - אני מקווה שלא אכפת לו]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com/979/">הקומיקס הזה של XKCD</a> מתאר בדיוק את הרגשת חוסר האונים שיש לי לפחות פעמיים כל שבוע:<br />
<a href="http://xkcd.com/979/"><img src="http://geek.co.il/wp/wp-content/uploads/2011/11/wisdom_of_the_ancients.png" alt="All long help threads should have a sticky globally-editable post at the top saying &#039;DEAR PEOPLE FROM THE FUTURE: Here&#039;s what we&#039;ve figured out so far ...&#039;" title="wisdom_of_the_ancients" width="485" height="270" class="size-full wp-image-1872" /></a></p>
<p>[מוצג כאן ללא אישור המחבר - אני מקווה שלא אכפת לו]</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/25/%d7%9b%d7%9f-%d7%90%d7%a0%d7%99-%d7%9e%d7%a6%d7%98%d7%98-%d7%90%d7%aa-xkcd-%d7%aa%d7%aa%d7%91%d7%a2%d7%95-%d7%90%d7%95%d7%aa%d7%99/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>מאמר אקראי על תשישות החלטות</title>
		<link>http://geek.co.il/wp/2011/11/17/%d7%9e%d7%90%d7%9e%d7%a8-%d7%90%d7%a7%d7%a8%d7%90%d7%99-%d7%a2%d7%9c-%d7%aa%d7%a9%d7%99%d7%a9%d7%95%d7%aa-%d7%94%d7%97%d7%9c%d7%98%d7%95%d7%aa</link>
		<comments>http://geek.co.il/wp/2011/11/17/%d7%9e%d7%90%d7%9e%d7%a8-%d7%90%d7%a7%d7%a8%d7%90%d7%99-%d7%a2%d7%9c-%d7%aa%d7%a9%d7%99%d7%a9%d7%95%d7%aa-%d7%94%d7%97%d7%9c%d7%98%d7%95%d7%aa#comments</comments>
		<pubDate>Thu, 17 Nov 2011 14:30:37 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/17/%d7%9e%d7%90%d7%9e%d7%a8-%d7%90%d7%a7%d7%a8%d7%90%d7%99-%d7%a2%d7%9c-%d7%aa%d7%a9%d7%99%d7%a9%d7%95%d7%aa-%d7%94%d7%97%d7%9c%d7%98%d7%95%d7%aa</guid>
		<description><![CDATA[באחד הפודקסטים שאני שומע &#8211; Stack Exchange Podcast עם ג&#8217;ואל ספולסקי וג&#8217;ף אטווד &#8211; ספולסקי הזכיר כבר כמה פעמים מחקר שנעשה באוניברסיטת בן גוריון על &#8220;גורמים חיצוניים בהחלטות שיפוטיות&#8221; שבו החוקר מדד את אחוז ההצלחה בבקשות חנינה בהשוואה לכמה זמן עבר מאז ארוחת הבוקר של השופט ששומע את בקשת החנינה. ספיציפית החוקר &#8211; שי דנצינגר [...]]]></description>
			<content:encoded><![CDATA[<p>באחד הפודקסטים שאני שומע &#8211; Stack Exchange Podcast עם ג&#8217;ואל ספולסקי וג&#8217;ף אטווד &#8211; ספולסקי הזכיר כבר כמה פעמים מחקר שנעשה באוניברסיטת בן גוריון על &#8220;<a href="http://www.pnas.org/content/108/17/6889">גורמים חיצוניים בהחלטות שיפוטיות</a>&#8221; שבו החוקר מדד את אחוז ההצלחה בבקשות חנינה בהשוואה לכמה זמן עבר מאז ארוחת הבוקר של השופט ששומע את בקשת החנינה.</p>
<p>ספיציפית החוקר &#8211; שי דנצינגר &#8211; מצא ששופטים הדנים בבקשות חנינה של אסירים ישראלים מחלקים את הישיבות שלהם לשלושה חלקים המופרדים ביניהם בהפסקות אוכל, ובהנתן שאנחנו מפקטרים החוצה כל שיקול אחר (בין אם הוא לגיטימי או לא &#8211; כמו אחוז מזמן המאסר המקורי שהאסיר כבר עשה, חומרת הפשע, השתייכות עדתית וכו&#8217;) אפשר לראות בצורה מובהקת ירידה דרמטית באחוז ההצלחה של בקשות חנינה בין תחילת וסוף כל חלק, כשאחרי ההפסקה אחוזי ההצלחה חוזרים לרמתם הקודמת.</p>
<p><span id="more-1860"></span></p>
<p>יש כמה מאמרים באינטרנט שסוקרים את עבודת המחקר ומציאים מסקנות, לדוגמה <a href="blogs.discovermagazine.com/notrocketscience/2011/04/11/justice-is-served-but-more-so-after-lunch-how-food-breaks-sway-the-decisions-of-judges/">הסקירה של הבלוג &#8220;Not Rocket Science&#8221; של מגזין &#8220;Discover&#8221;</a>‮ שהיא מעניינת &#8211; ואני ממליץ עליה אם לא בא לכם לקרוא את המאמר המקורי, אבל רציתי לדבר על תשישות החלטות (&#8220;Decision Fatigue&#8221;) בהקשרים של טכנולוגית תקשורת &#8211; נושא שקרוב אלי בהרבה מאשר היעילות של המערכת השיפוטית הישראלית.</p>
<p>הזיהוי של ההתנהגות האנושית שבה ככל שאנשים נדרשים לבצע יותר החלטות &#8211; ו\או החלטות קשות יותר &#8211; כך הם נהיים יותר עדישים לבחירות שלהם, אינו משהו חדש או מפתיע לכל מי שצופה בהתנהגות אנושית באיזו שהיא רמה, בין אם מדובר מעצבת ממשקי משתמש חובבנית או פסיכולוג מורשה, כשבמאמר הנדון מה שבעיקר אמור להפתיע זה שההתנהגות הזאת נראית, בעוצמה, גם אצל שופטים מקצועיים שאמון עליהם שהחלטות שלהם חייבות להיות נקיות מכל שיקול חיצוני &#8211; מכיוון שהן נוגעות במישרין לחירות של אדם או לעיתים אפילו לחייו. כל שכן אפשר לזהות את ההתנהגות הזאת בכל מקום בחייו של אדם, בעיקר בעידן המודרני שבו אנחנו נאלצים לבצע החלטות אלפי או מיליוני פעמים ביום.</p>
<p>הכשל לזהות את הבעיה, ולתת פתרון נכון, נפוץ בקרב מי שמודעים לבעיה: אפילו באותו פודקסט (<a href="http://blog.stackoverflow.com/2011/10/se-podcast-24/">פודקסט מספר 24</a>, באזור דקה 63), קצת לאחר שספולסקי מזכיר את הנושא של תשישות החלטות, הם מדברים על ממשק המשתמש של המנהלים שבו רשימת האפשרויות לסימון סיבת סגירת שאלה היא ארוכה מדי &#8211; מעל 20 אפשרויות וצריך שיהיה שם לא יותר מ-16 אפשרויות שונות: שזה נשמע כמו התאמה נכונה לתשישות החלטות, אבל זו עדיין אופטימיזציה גרועה: רעיון יותר טוב הוא לחלק את האפשרויות לעץ החלטות רדוד ולהוביל את המשתמש דרך &#8220;ממשק אשף&#8221; המציג כל החלטה בתורה &#8211; לדוגמה, אם צריך לבחור בין כ-30 אפשרויות, אפשר לתרגם את זה לצעד אחד הבוחר בין כל האפשרויות (עץ החלטות בעומק 1) או סדרה של שאלות כן/לא (עץ החלטות בעומק 5) עם כי האופטימום הוא איפשהו באמצע &#8211; כנראה משהו כמו שלושה צעדים עם 3~4 החלטות בכל צעד, כמו &#8220;מבחן אמריקאי&#8221;.</p>
<p>מעבר לממשקי המשתמש, את תשישות ההחלטות &#8211; או אולי תרגום טוב יותר יהיה &#8220;הלם החלטות&#8221; (כמו &#8220;הלם קרב&#8221; &#8211; &#8220;combat fatigue&#8221;) אפשר לראות גם בחיים האמיתיים, בעיקר אצל עובדים בחברות סטארט-אפ: כמות הפרוייקטים הפתוחים בכל רגע נתון, והצורך לעבור כל הזמן בין עבודה מרוכזת בנושא אחד לעבודה בנושא אחר, לענות על דואר, להתייעץ או ליעץ לעובדים אחרים, וכו&#8217; היא בעצמה יוצרת עומס החלטות כבד &#8211; אפילו בלי להתחשב בעבודה עצמה. </p>
<p>לדעתי השיקול של הפחת הלם החלטות צריך להיות בין השיקולים הראשונים שצריך להתחשב בהם כשבאים לתכנן מערכות לשימוש בני אדם &#8211; בין אם זה ממשקי משתמש לתוכנה או נהלי והרגלי עבודה בחברות טכנולוגיה, וכל אדם הנמצא בחשיפה להלם החלטות צריך להיות מודע לסכנות הכרוכות בכך ולתכנן דרכי מניעה &#8211; רק לצערי שאין לי כרגע שום רעיון בנושא, ואשמח לשמוע כל הצעה ועצה.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/17/%d7%9e%d7%90%d7%9e%d7%a8-%d7%90%d7%a7%d7%a8%d7%90%d7%99-%d7%a2%d7%9c-%d7%aa%d7%a9%d7%99%d7%a9%d7%95%d7%aa-%d7%94%d7%97%d7%9c%d7%98%d7%95%d7%aa/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>כמעט מתכון: מרק חורף בלי מאמץ</title>
		<link>http://geek.co.il/wp/2011/11/16/%d7%9b%d7%9e%d7%a2%d7%98-%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%91%d7%9c%d7%99-%d7%9e%d7%90%d7%9e%d7%a5</link>
		<comments>http://geek.co.il/wp/2011/11/16/%d7%9b%d7%9e%d7%a2%d7%98-%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%91%d7%9c%d7%99-%d7%9e%d7%90%d7%9e%d7%a5#comments</comments>
		<pubDate>Wed, 16 Nov 2011 13:34:37 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Food]]></category>
		<category><![CDATA[מתכונים]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/16/%d7%9b%d7%9e%d7%a2%d7%98-%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%91%d7%9c%d7%99-%d7%9e%d7%90%d7%9e%d7%a5</guid>
		<description><![CDATA[זה לא באמת מתכון &#8211; יותר המלצת צרכנות: סנפרוסט הוציאה ממש לאחרונה סדרה חדשה של מוצרי ירקות קפואים בדמות לקט ירקות קפואים ביחד עם ציר למרק. אני לקוח של סנפרוסט כבר הרבה שנים ואחד הדברים שתמיד תמצאו אצלי במקפיא זה ירקות של סנפרוסט. ספציפית תמיד יש לי שקית של לקט נורמנדי ל&#8221;מרק חרום&#8221;: אם באים [...]]]></description>
			<content:encoded><![CDATA[<p>זה לא באמת מתכון &#8211; יותר המלצת צרכנות: <a href="http://www.eati.co.il/frozen/685-sunfrost-marak.html">סנפרוסט הוציאה ממש לאחרונה סדרה חדשה של מוצרי ירקות קפואים בדמות לקט ירקות קפואים ביחד עם ציר למרק</a>. אני לקוח של סנפרוסט כבר הרבה שנים ואחד הדברים שתמיד תמצאו אצלי במקפיא זה ירקות של סנפרוסט. ספציפית תמיד יש לי שקית של לקט נורמנדי ל&#8221;מרק חרום&#8221;: אם באים במפתיע מבקרים רעבים ב-2 בלילה , אז אפשר תמיד לזרוק את התוכן של שקית לקט נורמנדי לסיר, להוסיף קופסאת רסק עגבניות תבלינים ומים רותחים, ותוך חצי שעה יש מרק חם וטעים.</p>
<p>הפעם סנפרוסט מציעים כבר את הכל בשקית אחת: גם הירקות, גם הציר עם התיבול, רק חסר מים. ניסיתי את ה&#8221;מרק שעועית&#8221; שלהם, ובגלל שאני לא יכול להשאיר שום דבר כמו שהוא היה (מסורת ארוכת שנים של לנסות לתקן דברים שלא מקולקלים), התחלתי בלאדות סלרי קצוץ עם פלפל אדום חתוך לקוביות, הוספתי כרשה קצוצה לעוד שתי דקות ואז את התוכן של שקית המרק של סנפרוסט, וכמובן למלא במים רותחים. המרק יצא קצת יותר מימי ממה שאני מעדיף (אני אוהב נזידים סמיכים), אבל טעים ואין אפילו צורך לתבל מעבר לציר שבשקית. מעולה לאנשים שנשארים בבית כי הם חולים בשפעת ולא רוצים להדביק את המשרד <img src='http://geek.co.il/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>גם מי שחרד ממרכיבים מלאכותיים באוכל תעשייתי יכול להרגע: הדברים הכי גרועים שיש בשקית הם <a href="http://en.wikipedia.org/wiki/Citric_acid#Foods.2C_other">חומצת לימון</a> כמייצב, <a href="http://en.wikipedia.org/wiki/Xanthan_gum">גומי קסנטן</a> כחומר עיבוי, ו<a href="http://www.foodnavigator.com/Legislation/Rosemary-extracts-get-final-EU-approval-for-food-preservation">תמצית רוזמרין</a> כמעכב חימצון.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/16/%d7%9b%d7%9e%d7%a2%d7%98-%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%91%d7%9c%d7%99-%d7%9e%d7%90%d7%9e%d7%a5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Nvidia drivers on Fedora 16 &#8211; the wrong way</title>
		<link>http://geek.co.il/wp/2011/11/15/installing-nvidia-drivers-on-fedora-16-the-wrong-way</link>
		<comments>http://geek.co.il/wp/2011/11/15/installing-nvidia-drivers-on-fedora-16-the-wrong-way#comments</comments>
		<pubDate>Tue, 15 Nov 2011 14:15:00 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/15/installing-nvidia-drivers-on-fedora-16-the-wrong-way</guid>
		<description><![CDATA[This is how to install the official Nvidia drivers on Fedora 16. Its the &#8220;wrong way&#8221; because in Fedora you should install the Nvidia drivers using RPMs provided by rpmfusion.org, or &#8220;better&#8221; yet &#8211; use the open source nouveau driver that is provided with Fedora 16 and at this point does enough rudimentary 3D acceleration [...]]]></description>
			<content:encoded><![CDATA[<p>This is how to install the <em>official</em> Nvidia drivers on Fedora 16. Its the &#8220;wrong way&#8221; because in Fedora you should install the Nvidia drivers using RPMs provided by <a href="http://rpmfusion.org/Configuration/">rpmfusion.org</a>, or &#8220;better&#8221; yet &#8211; use the open source nouveau driver that is provided with Fedora 16 and at this point does enough rudimentary 3D acceleration to run GNOME 3.</p>
<p>So why do that? because you can try the latest beta drivers from Nvidia&#8217;s web site (the stable drivers are usually already supported by rpmfusion) and sometimes the rpmfusion complex kernel module setup doesn&#8217;t work well &#8211; especially if you install custom kernels.</p>
<p>If you still want to do this the &#8220;right way&#8221;, head over to <a title="Fedora 16 nVidia Drivers Install Guide" href="http://www.if-not-true-then-false.com/2011/fedora-16-nvidia-drivers-install-guide-disable-nouveau-driver/">this article on &#8220;If !1 0&#8243; to get the simple instructions</a>.</p>
<p><strong>Warning:</strong> this procedure requires you to know the password for the &#8220;root&#8221; account and login using the text console.</p>
<p><span id="more-1852"></span></p>
<h4>Installation procedure</h4>
<ol>
<li>Go to <a href="http://nvidia.com">Nvidia&#8217;s web site</a> and look for the driver that you want to download. After you select the driver and click the large &#8220;Download&#8221; button, you will be taken to the license agreement screen where you are expected to click the &#8220;Agree &amp; Download&#8221; button. Don&#8217;t click on it, instead right click and copy the link&#8217;s URL.</li>
<li>Open a terminal &#8211; such as <code>gnome-terminal</code> on GNOME or <code>konsole</code> on KDE.</li>
<li>Type <code>su -</code> to get root access (you will need to type in the root password).</li>
<li>Type &#8216;<code>wget</code>&#8216; followed by a space and paste the URL you got from Nvidia. It should look something like this:<br />
<code>wget http://download.nvidia.com/XFree86/Linux-x86_64/285.05.09/NVIDIA-Linux-x86_64-285.05.09.run</code></li>
<li>After the download is done, we will need to turn off the default nouveau driver so that the Nvidia driver can be loaded: type &#8216;<code>gedit /etc/default/grub</code>&#8216; to edit the GRUB default command line arguments. In the window that opens you should have text that looks like this:<br />
<code>GRUB_CMDLINE_LINUX="quiet rhgb"</code><br />
You need to add the arguments &#8220;<code>rdblacklist=nouveau nouveau.modeset=0</code>&#8221; to this list. Comparing to the above example, after editing it should look like this:<br />
<code>GRUB_CMDLINE_LINUX="quiet rhgb rdblacklist=nouveau nouveau.modeset=0"</code><br />
After you&#8217;ve changed the text, save and close the editor</li>
<li>Recreate the GRUB configuration file using the command<br />
<code>grub2-mkconfig -o /boot/grub2/grub.cfg</code></li>
<li>Reboot the computer. When the computer boots, the boot splash screen should not be graphical and when the login screen comes up it should be in a very low resolution.</li>
<li>Hit CTRL+ALT+F2 to move to the text console and login as &#8220;root&#8221;</li>
<li>Execute<br />
<code>init 3</code><br />to disable the graphical display manager.</li>
<li>Run the Nvidia insaller by running it through the bash shell script processor, like this:<br />
<code>bash NVIDIA-Linux-x86_64-285.05.09.run</code><br />
be sure to replace the file name with the actual file you downloaded &#8211; usually typing &#8220;<code>NV</code>&#8221; and pushing the TAB key will complete the file name correctly.</li>
<li>In the NVidia driver setup answer &#8220;Yes&#8221; to all the questions.</li>
<li>When the setup completes, execute<br />
<code>init 5</code><br />
to bring back the graphical display manager. This will move the screen to the graphical login and you can now log in with the NVidia driver enabled, but at this point its recommended that you use CTRL+ALT+F2 again to get back to the text console and logout from there. Use CTRL+ALT+F1 to get back to the graphical display.</li>
</ol>
<p>If you ever want to change back to the original configuration, just edit the GRUB default argument list by removing the arguments we&#8217;ve added at step 5, recreate the GRUB configuration file as in step 6, then log in as root in a text console and do these steps:</p>
<ol>
<li>Disable the graphical manager as in step 9.</li>
<li>Uninstall the Nvidia driver using<br />
<code>bash NVIDIA-Linux-x86_64-285.05.09.run --uninstall</code></li>
<li>Remove the Nvidia-generated configuration file using<br />
<code>rm -f /etc/X11/xorg.conf</code></li>
<li>Execute<br />
<code>reboot</code><br />
To reboot your computer.</li>
</ol>
<p>And that should be that.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/15/installing-nvidia-drivers-on-fedora-16-the-wrong-way/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Script day: find the oldest file in a directory structure</title>
		<link>http://geek.co.il/wp/2011/11/14/script-day-find-the-oldest-file-in-a-directory-structure</link>
		<comments>http://geek.co.il/wp/2011/11/14/script-day-find-the-oldest-file-in-a-directory-structure#comments</comments>
		<pubDate>Mon, 14 Nov 2011 16:53:57 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[File Management]]></category>
		<category><![CDATA[log retention]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/14/script-day-find-the-oldest-file-in-a-directory-structure</guid>
		<description><![CDATA[This piece of script came in handy when I wrote a utility that &#8220;recycles&#8221; space on a logging partition: before log rotation archives the current log file, we move some old log files (depending on some archive freshness policy) to a remote storage that archives older files. The problem is that the &#8220;old archive storage&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>This piece of script came in handy when I wrote a utility that &#8220;recycles&#8221; space on a logging partition: before log rotation archives the current log file, we move some old log files (depending on some archive freshness policy) to a remote storage that archives older files.</p>
<p>The problem is that the &#8220;old archive storage&#8221; also has limited disk space and I got fed up managing the archive by hand. The solution I came up is to scan the hierarchy of  log files in the storage (logs are stored hierarchically according to origin and type) and delete old files until I have enough room to move some newer files in. That way the &#8220;old archive storage&#8221; is always kept full and keeps as much back-log as possible and does this automatically.</p>
<p>The piece of code that determines which files we want to delete works like this:</p>
<ol>
<li>Use <code>find</code> to list all the files in the directory structure</li>
<li>Pipe it to <code>perl</code> and collect all the file names in a list</li>
<li>Use perl&#8217;s sort operator to compare the modification times of each file in the list and show them in the order (i.e. oldest first)</li>
<li>Use <code>head</code> to get just the first file</li>
</ol>
<p>So it looks like this:</p>
<p><code>find /mnt/httpd_back/ -type f | perl -nle 'next unless -f; push @files, $_; END { foreach $file (sort { @a=stat($a); @b=stat($b); $a[9] &lt;=&gt; $b[9] } @files) { print $file; }}' | head -n1<br />
</code></p>
<p>Note: normally we use <code>head</code> to get some initial output and terminate the process early before it does more costly work &#8211; when <code>head</code> has enough data it terminates the pipe sending <code>SIGPIPE</code> to the upstream process and that usually terminates the process that generates the data. In this case &#8211; and in all other cases involving sort &#8211; the upstream process buffers all the data in its own memory before outputting anything, so it can sort everything, and using <code>head</code> here is just a filter to get what I want and does not actually save me from doing all the work. I could have easily done the same thing inside the perl script itself by replacing the block of  <code>print $file;</code> with <code>print $file; last;</code> &#8211; this has the same effect as using head, because <code>head</code> will send <code>SIGPIPE</code> to <code>perl</code> after getting the first print and will terminate it. Deciding which way you want to go is probably more about readability of the code and I prefer my original version because its easier to read to non-perl specialists.</p>
<p>I can then just remove that file, see if I have enough room to move in the newer log file and if no &#8211; repeat the process.</p>
<p>This would work well, I believe, but it may be inefficient if I find a bunch of small files and I want to copy in a large file. So what I did next is to take advantage of the fact that all the log files I have are named using the following simple format:</p>
<p><code>&lt;service&gt;-&lt;type&gt;_log-&lt;year&gt;&lt;month&gt;&lt;day&gt;.gz</code></p>
<p>and that allows me to easily find all the log files that record the same day and eliminate them at the same time. Subsequent moving of additional files will likely succeed because I cleared out all the log files of an entire day. If not, I can always go and clear up another day&#8217;s worth of logs.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=a8ef261f-81bb-4291-9d06-ccb32a631329" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/14/script-day-find-the-oldest-file-in-a-directory-structure/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>צלצול ניתוק (&#8220;צינתוק&#8221;) מבית 012 סמייל</title>
		<link>http://geek.co.il/wp/2011/11/13/%d7%a6%d7%9c%d7%a6%d7%95%d7%9c-%d7%a0%d7%99%d7%aa%d7%95%d7%a7-%d7%a6%d7%99%d7%a0%d7%aa%d7%95%d7%a7-%d7%9e%d7%91%d7%99%d7%aa-012-%d7%a1%d7%9e%d7%99%d7%99%d7%9c</link>
		<comments>http://geek.co.il/wp/2011/11/13/%d7%a6%d7%9c%d7%a6%d7%95%d7%9c-%d7%a0%d7%99%d7%aa%d7%95%d7%a7-%d7%a6%d7%99%d7%a0%d7%aa%d7%95%d7%a7-%d7%9e%d7%91%d7%99%d7%aa-012-%d7%a1%d7%9e%d7%99%d7%99%d7%9c#comments</comments>
		<pubDate>Sun, 13 Nov 2011 13:08:57 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Evangelism]]></category>
		<category><![CDATA[Consumers]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/13/%d7%a6%d7%9c%d7%a6%d7%95%d7%9c-%d7%a0%d7%99%d7%aa%d7%95%d7%a7-%d7%a6%d7%99%d7%a0%d7%aa%d7%95%d7%a7-%d7%9e%d7%91%d7%99%d7%aa-012-%d7%a1%d7%9e%d7%99%d7%99%d7%9c</guid>
		<description><![CDATA[אם אתם רואים שהתקשרו אליכם ממספר שמתחיל בספרות 072-200 (לדוגמא 072-2003144), אל תתקשרו בחזרה: אלה אנשי מכירות של חברת 012 סמייל שרוצים למכור לכם משהו, ונראה שהחלט לנקוט בגישת &#8220;צלצול/ניתוק&#8221; כדי לעודד את לקוחותיהם לחזור אליהם. כנראה כדרך לחסוך בזמני המתנה של אנשי מכירות: אם המערכת האוטומטית גורמת ללקוחות להתקשר לאיש המכירות, אז איש המכירות [...]]]></description>
			<content:encoded><![CDATA[<p>אם אתם רואים שהתקשרו אליכם ממספר שמתחיל בספרות 072-200 (לדוגמא 072-2003144), אל תתקשרו בחזרה: אלה אנשי מכירות של חברת 012 סמייל שרוצים למכור לכם משהו, ונראה שהחלט לנקוט בגישת &#8220;צלצול/ניתוק&#8221; כדי לעודד את לקוחותיהם לחזור אליהם. כנראה כדרך לחסוך בזמני המתנה של אנשי מכירות: אם המערכת האוטומטית גורמת ללקוחות להתקשר לאיש המכירות, אז איש המכירות לא צריך לבזבז זמן בהמתקנה שהלקוח ירים את הטלפון.</p>
<p>אני לא חושב שהשימוש הזה מתנגש עם חוק מניעת דואר זבל (תיקון מס&#8217; 40 לחוק התקשורת), אפילו לא תחת <a title="תיקון 47 לחוק התקשורת - חוק נגד " href="http://oknesset.org/bill/2876/">תיקון 47 לחוק התקשורת הידוע כחוק נגד &#8220;צינתוק&#8221;</a> (<a href="http://www.ynet.co.il/articles/0,7340,L-4052404,00.html">ראו גם את התביעה היצוגית בנושא</a>) מכיוון שאני לקוח של 012 ותחת חוק התקשורת מותר להם לשלוח לי דברי פרסום, אבל עדיין מדובר בחוצפה ממדרגה ראשונה &#8211; לצפות שאני אשלם עבור משלוח דבר פרסומת אלי.</p>
<p>אז כל מה שיש לי לעשות הוא להמליץ לקוראי להזהר ולא לחזור לשיחות טלפון שלא נענו מחברת -012 סמייל.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/13/%d7%a6%d7%9c%d7%a6%d7%95%d7%9c-%d7%a0%d7%99%d7%aa%d7%95%d7%a7-%d7%a6%d7%99%d7%a0%d7%aa%d7%95%d7%a7-%d7%9e%d7%91%d7%99%d7%aa-012-%d7%a1%d7%9e%d7%99%d7%99%d7%9c/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handling &#8220;Package file is invalid&#8221; problems on CyanogenMod 7</title>
		<link>http://geek.co.il/wp/2011/11/01/handling-package-file-is-invalid-problems-on-cyanogenmod-7</link>
		<comments>http://geek.co.il/wp/2011/11/01/handling-package-file-is-invalid-problems-on-cyanogenmod-7#comments</comments>
		<pubDate>Tue, 01 Nov 2011 13:59:03 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[CyanogenMod]]></category>
		<category><![CDATA[Motorola]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/01/handling-package-file-is-invalid-problems-on-cyanogenmod-7</guid>
		<description><![CDATA[Update: The latest update for CyanogenMod for Milestone &#8211; version 7.1.0.3 solves this problem as well. Lately I&#8217;ve been having problems updating software on my Motorola Milestone (1, as in A853) running CyanogenMod 7.1 (thanks to Nadalbak who maintains an unofficial and unsupported port of CyanogenMod for this old device). When I start the Android [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> The latest update for CyanogenMod for Milestone &#8211; version 7.1.0.3 solves this problem as well.</p>
<p>Lately I&#8217;ve been having problems updating software on my Motorola Milestone (1, as in A853) running CyanogenMod 7.1 (thanks to <a title="Nadalbak Milestone CyanogenMod port" href="http://android.doshaska.net/">Nadalbak</a> who maintains an unofficial and unsupported port of CyanogenMod for this old device). When I start the Android Market and do an update of an existing application, I get the error &#8220;Package file is invalid&#8221; for any application. Sometimes removing an application and reinstalling it will work, but often not.</p>
<p>There could be several problems that cause this, apparently a problem with the file permissions on the file systems is common, and if this is your problem then it can be fixed by opening the terminal emulator, executing &#8220;su&#8221; to gain super-user permissions and then running &#8220;fix_permissions&#8221; (it will take a while to complete).</p>
<p>If this doesn&#8217;t solve the problem for you, then likely the problem is that you ran out of space on your &#8220;data&#8221; partition or &#8220;cache&#8221; partition. This is very common if you have a large &#8220;apps partition&#8221; on your SD card and you are in the habit of installing tons of applications &#8211; I know I am <img src='http://geek.co.il/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
<p><span id="more-1836"></span></p>
<p>The problem is the &#8220;Dalvik cache&#8221; that gets full and apparently the operating system doesn&#8217;t clear old files from it so it will eventually run out of space.</p>
<p>I&#8217;ve tried cleaning the Dalvik cache, using Titanium backup and the OpenRecovery menu &#8211; but that doesn&#8217;t clean the cache properly for some reason, likely because it expects the cache to be on the &#8220;data&#8221; partition but in CyanogenMod 7 for Milestone the Dalvik cache is on the &#8220;cache&#8221; partition.</p>
<p>To solve the problem, boot into OpenRecovery then select &#8220;Wipe cache&#8221; from the main menu. Please note that you must wipe the entire cache partition and not just the Dalvik cache. Also make sure not to choose the similar option to wipe the data partition as that will remove all your personal data from the phone&#8230;</p>
<p>Good luck.</p>
<h4>Update:</h4>
<p>If your /cache partition is constantly overloaded in your Mileston A853 running CyanogenMode 7.1, you can disable the hosting of the apps dalvik cache under /cache by editing the system&#8217;s build.prop file. To do it follow these instructions.</p>
<ol>
<li>Start a terminal in your phone using the terminal emulator app (or an alternative &#8211; I use ConnectBot).</li>
<li>Execute <code>su</code> and approve the super user mode.</li>
<li>Execute <code>mount /system -o remount,rw</code> to allow editing the build.prop file.</li>
<li>Execute <code>vi /system/build.prop</code> to edit the file.</li>
<li>Find the instruction <code>dalvik.vm.dexopt-cache-only</code> &#8211; you can type <code>/dalvik&lt;ENTER&gt;</code> to find it. Move the cursor to the end of the line and press on &#8220;A&#8221; to start editing. Delete the &#8220;1&#8243; at the end of the that line and write &#8220;0&#8243; instead.</li>
<li>Issue an &#8220;ESC&#8221; button (in ConnectBot you can do it by pressing the camera shutter button) and then type &#8220;:x&#8221; to save the changes and leave the editor.</li>
<li>Execute <code>mount /system -o remount,ro</code> to return the system files to read only mode.</li>
<li>Reboot to OpenRecovery and use it to clear the dalvik cache and the cache partition, and then reboot the phone.</li>
<li>
</li>
</ol>
<p>Your device should now have enough space in the /cache partition.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://beast4romtheeast.wordpress.com/2011/10/13/cyanogenmod-7-1-released/">CyanogenMod 7.1 Released</a> (beast4romtheeast.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://pocketnow.com/android/netflix-for-android-officially-recognizes-cyanogenmod-roms">Netflix for Android Officially Recognizes CyanogenMod ROMs</a> (pocketnow.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=1e32da23-1c9a-4620-a589-0c6baa9af717" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/01/handling-package-file-is-invalid-problems-on-cyanogenmod-7/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

