<?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 Projects</title>
	<atom:link href="http://geek.co.il/wp/category/projects/feed" rel="self" type="application/rss+xml" />
	<link>http://geek.co.il/wp</link>
	<description>Thoughts about the universe in general</description>
	<lastBuildDate>Thu, 09 Sep 2010 01:45:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Kohana 3 RHEL/CentOS RPMs</title>
		<link>http://geek.co.il/wp/2010/05/28/kohana-3-rhelcentos-rpms</link>
		<comments>http://geek.co.il/wp/2010/05/28/kohana-3-rhelcentos-rpms#comments</comments>
		<pubDate>Fri, 28 May 2010 14:56:10 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Development Tools]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Red Hat Enterprise Linux]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2010/05/28/kohana-3-rhelcentos-rpms</guid>
		<description><![CDATA[As I have not found any available, here is my build for Kohana &#8211; the PHP development framework &#8211; for RHEL 5 based operating systems. You can find Kohana RPM for the current stable release 3.0.5 here, and the source RPM is available here in case you want to rebuild it yourself (and you might, [...]]]></description>
			<content:encoded><![CDATA[<p>As I have not found any available, here is my build for <a class="zem_slink freebase/guid/9202a8c04000641f800000000a9ff71c" title="Kohana (web framework)" rel="homepage" href="http://kohanaphp.com">Kohana</a> &#8211; the <a class="zem_slink freebase/en/php" title="PHP" rel="homepage" href="http://www.php.net/">PHP</a> development framework &#8211; for <a class="zem_slink freebase/en/red_hat_enterprise_linux" title="Red Hat Enterprise Linux" rel="homepage" href="http://www.redhat.com/rhel/">RHEL</a> 5 based operating systems.</p>
<p>You can find <a href="http://rpms.geek.co.il/centos5/x86_64/">Kohana RPM for the current stable release 3.0.5 here</a>, and <a href="http://rpms.geek.co.il/centos5/SRPMS/">the source RPM is available here</a> in case you want to rebuild it yourself (and you might, details follow). New releases to correspond with new releases from Kohana will be updated there as needed.</p>
<p>This package is built on a <a class="zem_slink freebase/en/centos" title="CentOS" rel="homepage" href="http://www.centos.org/">CentOS</a> 5.4 machine, with pretty much default settings.</p>
<p><span id="more-1537"></span></p>
<p>Please note that Kohana is not tested with the PHP version 5.1.6 which is what RHEL/CentOS 5 uses by default, so there could be some problems with using it on such a default installation of the operating system. There was one place where Kohana uses a function in a way that is not supported on PHP 5.1.6, and I had to <a class="zem_slink freebase/en/patch" title="Patch (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Patch_%28computing%29">patch</a> that with a workaround.</p>
<p>This package includes additional patches that I felt where necessary, some to work around Kohana issues and some to add functionality that I felt is missing or or lacking. If there is interest I can expand on the work there. I do intend to submit all patches upstream, of course &#8211; once I&#8217;m more familiar with the community process of Kohana.</p>
<p>In the mean time, you can try it out and let me know if it works for you or not.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://blog.taragana.com/index.php/archive/top-5-free-linux-distributions-for-servers-in-2010/">Top 5 Free Linux Distributions for Servers in 2010</a> (taragana.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/248c6a04-81fb-44ee-b14a-ff6be15d39e1/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=248c6a04-81fb-44ee-b14a-ff6be15d39e1" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-info"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2010/05/28/kohana-3-rhelcentos-rpms/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script day &#8211; randomly rotate GNOME desktop backgrounds</title>
		<link>http://geek.co.il/wp/2008/07/01/script-day-randomly-rotate-gnome-desktop-backgrounds</link>
		<comments>http://geek.co.il/wp/2008/07/01/script-day-randomly-rotate-gnome-desktop-backgrounds#comments</comments>
		<pubDate>Tue, 01 Jul 2008 19:00:23 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2008/07/01/script-day-randomly-rotate-gnome-desktop-backgrounds</guid>
		<description><![CDATA[I kind of collect desktop wallpapers &#8211; I have a lot of those, several thousands. It is a bit ridiculous as I mostly use maximized windows all the time so if not for the fact that in work I live on the console and I have a transparent terminal, I would rarely see my desktop [...]]]></description>
			<content:encoded><![CDATA[<p>I kind of collect desktop wallpapers &#8211; I have a lot of those, several thousands. It is a bit ridiculous as I mostly use maximized windows all the time so if not for the fact that in work I live on the console and I have a transparent terminal, I would rarely see my desktop wallpaper. </p>
<p>That being said, with a wallpaper collection, you want a software to manage it and cycle your desktop through the wallpapers. KDE has this function built it &#8211; just go to configure your wallpaper and select a directory of wallpapers, choose whether you want to cycle through the images sequentially or randomly, the delay and your done. </p>
<p>Not so in GNOME &#8211; simplicity for simplicity&#8217;s sake<span id="more-509"></span>: I would have said that you get the same configurability as MS-Windows, but its not true &#8211; in GNOME&#8217;s &#8220;Background&#8221; configuration dialog, if you don&#8217;t use an image you can configure the background color to be a single color, a vertical or a horizontal color gradient (for the last two options you actually get to choose starting and ending color). MS-Windows users &#8211; eat your heart out! :-p</p>
<p>So what can a GNOME user do? There are a few 3rd party software that can tackle the task, at least one is even available in the repositories of most Linux distributions. Initially I tried <a href="http://wallpapoz.akbarhome.com/">wallpapoz</a> which has a UI which is not really simplistic, and not really usable. Its written in Python and uses a weird client/server setup where the application UI is just a client that configures the server, and you have to run the server to actually get the functionality. Its not really comfortable to use under any circumstances and I also feel that its random selection could use some help (no reason for me to see the same wallpaper 3 times on the same day when you have more the a thousand images to choose from). </p>
<p>After I gave up on wallpapoz, I tried <a href="http://drapes.mindtouchsoftware.com/">Desktop Drapes</a>. Its has a much more modern UI and is written in GNOME&#8217;s &#8220;next-gen&#8221; programming framework: .net, and it even promises to monitor the wallpaper directory for me and automatically add new wallpapers that appear there. Unfortunately it can&#8217;t really take the load of so many wallpapers on its UI, and while it runs fine as long as I don&#8217;t open the configuration window, it doesn&#8217;t looks like it holds up on its promise to add new wallpapers without resorting to using the nice looking but very unresponsive user interface.</p>
<p>When Desktop Drapes stopped working for me recently, I decided to go all scripty like &#8211; GNOME is using <a href="http://www.gnome.org/projects/gconf/">GConf</a> as its internal configuration system, and GConf is a MS-Windows registry like configuration directory with a few obvious advantages:</p>
<ul>
<li>It is rather small and simple in its layout and amount of stuff</li>
<li>It is very user-centric &#8211; while there is a system GConf registry, each user loads its own registry and no registry database other then the currently logged in user is actually loaded in a session</li>
<li>The backend storage for GConf is just a bunch of XML files, which is makes it easy to manage in case you need to (and you never need to)</li>
<li>It has both a graphical editor which shows help for each configuration value and a command line tool which you can use to manipulate the registry</li>
<li>And best of all &#8211; when you change a configuration value, it immediately takes effect!</li>
</ul>
<p>A quick search in <code>gconf-editor</code> (the graphical GConf interface) brings up the following key:<br />
<code><br />
/desktop/gnome/background/picture_filename<br />
</code><br />
and changing it using<br />
<code><br />
gconftool-2 -s /desktop/gnome/background/picture_filename string &lt;path -to-image&gt;<br />
</code><br />
immediately applies the new desktop background.</p>
<p>To get our wallpapers to rotate automatically, all one needs to do is figure out a way to call <code>gconftool-2</code> from cron, passing it a random wallpaper every time. </p>
<p>Bash to the rescue! Bash has a useful random number generator &#8211; just use <code>$RANDOM</code> for a 15 bit random number. For my purposes I think that 15 bit is a bit low (considering the number of wallpapers I have), so I use <code>$RANDOM * $RANDOM</code> for a bit more entropy. A quick hack and we end up with something like this:</p>
<p><code><br />
WALLPAPERS_DIR=$HOME/Documents/Images/wallpapers<br />
gconftool-2 -s /desktop/gnome/background/picture_filename -t string "$WALLPAPERS_DIR/$(ls $WALLPAPERS_DIR | head -n $(( $RANDOM * $RANDOM % $(cd $WALLPAPERS_DIR; ls | wc -l) + 1 )) | tail -1)"<br />
</code></p>
<p>Now to stick this into cron using <code>crontab -e</code> and you have &#8220;a poor man&#8217;s wallpaper manager&#8221; <img src='http://geek.co.il/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>A simple explanation of what is going on here &#8211; the heart of this one-liner is the <code>$(( ... ))</code> block which figures out a random number that corresponds to a file in the wallpapers directory &#8211; its basically <code>RANDOM_VALUE modulo COUNT_WALLPAPERS + 1</code>. the rest is just listing the wallpaper files and using <code>head</code> and <code>tail</code> to cut out just the file that I wanted.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2008/07/01/script-day-randomly-rotate-gnome-desktop-backgrounds/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Script day &#8211; read configuration files</title>
		<link>http://geek.co.il/wp/2008/04/23/script-day-read-configuration-files</link>
		<comments>http://geek.co.il/wp/2008/04/23/script-day-read-configuration-files#comments</comments>
		<pubDate>Wed, 23 Apr 2008 20:16:49 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2008/04/23/script-day-read-configuration-files</guid>
		<description><![CDATA[This is not really a script &#8211; more of a snippet. I don&#8217;t have a lot of spare time these days, so I can justify posting a snippet and calling it &#8220;script day&#8221; . A lot of unix configuration files use the # sign to add comments to configuration files, and a lot of software [...]]]></description>
			<content:encoded><![CDATA[<p>This is not really a script &#8211; more of a snippet. I don&#8217;t have a lot of spare time these days, so I can justify posting a snippet and calling it &#8220;script day&#8221; <img src='http://geek.co.il/wp/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  .</p>
<p>A lot of unix configuration files use the <code>#</code> sign to add comments to configuration files, and a lot of software comes with very well documented files &#8211; i.e. has lots of comments. So much that if you just want a quick glimpse at the configuration that is active (not commented out) its very difficult to wade through all the documentation.</p>
<p>Here&#8217;s a simple grep that will filter out all the junk and leave you with just the active configuration settings:<br />
<code><br />
egrep -v '^(#|\s*$)' &lt;config file&gt;<br />
</code><br />
and on the standard output you&#8217;d get only lines that are not commented out or empty.</p>
<p>Do note that some configuration files can also use <code>;</code> as a comment character, but modifying the grep to support this is trivial.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2008/04/23/script-day-read-configuration-files/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Script day &#8211; find Java jar files that contain a Java class</title>
		<link>http://geek.co.il/wp/2007/11/12/script-day-find-java-jar-files-that-contain-a-java-class</link>
		<comments>http://geek.co.il/wp/2007/11/12/script-day-find-java-jar-files-that-contain-a-java-class#comments</comments>
		<pubDate>Mon, 12 Nov 2007 16:07:01 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2007/11/12/script-day-find-java-jar-files-that-contain-a-java-class</guid>
		<description><![CDATA[From time to time I need to work with a Java program or library that requires some import which I&#8217;m not familiar with. Its often very easy to just copy the fully qualified class name and search for it on Google which usually helps identify the product that contains this class. But if you know [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I need to work with a Java program or library that requires some import which I&#8217;m not familiar with. Its often very easy to just copy the fully qualified class name and search for it on Google which usually helps identify the product that contains this class. </p>
<p>But if you know that you have this class on your system somewhere, and you are just not sure which jar file you need to add to your project for it to compile &#8211; this script will come in handy:</p>
<p><span id="more-295"></span></p>
<p>The script below generates a list of jar files, then look for the specified pattern (using grep) in each jar file&#8217;s directory and prints each jar file that contains a class to match the pattern. The script has two modes of operation &#8211; the default mode uses the operating system&#8217;s <code>locate</code> implementation to look for all jar files in the file system &#8211; this is very fast, but the list may not be up to date and contain files that were deleted and/or missing new files that were recently added. The second mode, triggered by the &#8216;<code>-j</code>&#8216; command line option uses <code>find</code> to get the list of all jar files under the system&#8217;s Java libraries directory (<code>/usr/share/java</code>) &#8211; while this works directly on the file system,  it is also relatively fast because we limit the search to a rather small directory tree and doesn&#8217;t suffer from <code>locate</code>&#8216;s dependency on a database which may not be up to date.</p>
<p>The script:<br />
<code><tt>
<pre>
#!/bin/sh
</pre>
<p />
<pre>
ONLY_JAVA_DIR=
</pre>
<p />
<pre>
function getJars() {
    if [ -n "$ONLY_JAVA_DIR" ]; then
        find /usr/share/java/ -name '*.jar' | egrep '[^]0-9]\.jar$'
    else
        locate 'jar' | egrep '[^]0-9]\.jar$'
    fi
}
</pre>
<p />
<pre>
class=
</pre>
<p />
<pre>
while [ -n "$1" ]; do
    case "$1" in
        -j)
            ONLY_JAVA_DIR="yes"
            ;;
        *)
            class="$1"
            ;;
    esac
    shift
done
</pre>
<pre>
export IFS="
"
</pre>
<p />
<pre>
for file in $(getJars); do
    [ -f "$file" ] &#038;&#038; (unzip -l "$file" 2>/dev/null | grep -q $class) &#038;&#038; echo $file;
done
</pre>
<p></tt></code></p>
<p>I often just write this script down as a one liner (it is simple as replacing <code>getJars</code> with a wildcard match of your choice and packing the for loop into a single line), but when using the <code>locate</code> mode, its common to encounter directories and files with spaces in their name and this usually causes bash to break horribly &#8211; the default record separator which is used by the <code>for</code> command matches spaces and breaks a single file path with spaces inside into two or more different paths. To fix this we change the value of <code>IFS</code> (the bash record separator definition) locally to only include new lines (hence the weird assignment) and we make sure that <code>getJars()</code> generates a list of files where each file path is on a line by its own.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2007/11/12/script-day-find-java-jar-files-that-contain-a-java-class/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script day &#8211; simple log graphing toolּ</title>
		<link>http://geek.co.il/wp/2007/11/07/script-day-simple-log-graphing-tool%d6%bc</link>
		<comments>http://geek.co.il/wp/2007/11/07/script-day-simple-log-graphing-tool%d6%bc#comments</comments>
		<pubDate>Wed, 07 Nov 2007 14:37:01 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2007/11/07/script-day-simple-log-graphing-tool%d6%bc</guid>
		<description><![CDATA[I wrote similar versions of this script over the years to analyze all kinds of logs, but here&#8217;s one for posterity: This script is useful if you have a log for which you want to analyze load over time &#8211; transactions per second or whatnot (the version below does this for Apache httpd logs, but [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote similar versions of this script over the years to analyze all kinds of logs, but here&#8217;s one for posterity:</p>
<p>This script is useful if you have a log for which you want to analyze load over time &#8211; transactions per second or whatnot (the version below does this for Apache httpd logs, but it can be easily modified to analyze anything). For apache (and most other HTTP servers) there are many readily available log analysis software packages that do a much better job then what one can do in a simple script, but you might not have such software pre-configured or it can&#8217;t filter what you need or you just want to analyze something else &#8211; in which case this script will come in handy.</p>
<p>The script receives time stamped log events &#8211; each event on a line &#8211; and collects the temporal information for each line. Then it will dump a simple vertical graph (i.e. time is on the Y axis) of load over time in the resolution that you want. Its output looks something like this:<br />
<code><tt>
<pre style="font-size: 9pt;">
Oct 30 14:40:00 2007 |#############                                    | 3.8 x/sec
Oct 30 14:50:00 2007 |##########################################       | 6.3 x/sec
Oct 30 15:00:00 2007 |###########################################      | 6.5 x/sec
Oct 30 15:10:00 2007 |#############################################    | 6.6 x/sec
Oct 30 15:20:00 2007 |###############################                  | 5.4 x/sec
</pre>
<p></tt></code><br />
<span id="more-294"></span><br />
(The output is obviously formated for terminals with monospaced fonts, so it won&#8217;t look as good here).</p>
<p>As you can see the script will dump summary lines for each time unit (as per the required resolution) with a bar depicting the number of requests and a value noting the number of requests per second (or whatever you want &#8211; it is easy to modify).</p>
<p>Running it is very simple &#8211; the script accepts log lines from standard input and you normally want to feed it the output of some filter, so for example &#8211; lets say I want to check the request load on some Apache httpd server resource accessible under <code>/some/resource</code>, with a 10 minute resolution &#8211; so I will run:<br />
<code><br />
grep '/some/resource' /var/log/httpd/access_log | ./graphlog.pl 600<br />
</code><br />
This uses grep to filter the Apache access log and will output only log events that access <code>/some/resource</code> into the graphing script (called <code>graphlog.pl</code> here). The graphing script was instructed to collect log events into batches of 10 minutes (600 seconds) for display. The result looks like what you see above.</p>
<p>Anyway, here&#8217;s the script: &#8211; with a lot of comments to better let you know what&#8217;s going on. Its written in perl and uses the &#8216;<code>-l</code>&#8216; switch to instruct perl to add a new line after each print command &#8211; this saves me a tiny bit of work as I only print the graph, with one command per line.<br />
<code><tt>
<pre>
#!/usr/bin/perl -l
</pre>
<p />
<pre>
# some "safety" features for perl which I recommend to always use - it tells the perl
# compiler to fail the compiling on common errors such as typos in variable names
use strict 'refs';
</pre>
<p />
<pre>
# I'm using these two time formatting procedures from the POSIX support package
use POSIX qw(mktime ctime);
</pre>
<p />
<pre>
# we're parsing log lines like this:
# 90.149.88.157 - - [07/Nov/2007:14:00:16 +0200] "GET /some/resource HTTP/1.1" 200 4936 "-" "Mozilla/5.0 (bla bla bla)"
# I'm not filtering it - that is the job of something on the outside
</pre>
<p />
<pre>
# helper list of known month abbreviations so I can understand english formatted dates
my %months = ( 'Jan' => 0, 'Feb' => 1, 'Mar' => 2, 'Apr' => 3, 'May' => 4, 'Jun' => 5, 'Jul' => 6, 'Aug' => 7, 'Sep' => 8, 'Oct' => 9, 'Nov' => 10, 'Dec' => 11 );
</pre>
<p />
<pre>
# the method that converts formatted time stamps to useful UNIX time stamps
sub dateToTime($) {
&nbsp;&nbsp;&nbsp;&nbsp;my ($date) = @_;
</pre>
<p />
<pre>
&nbsp;&nbsp;&nbsp;&nbsp;# clean up the input to only leave the date and time in the required formatting, dropping everything
&nbsp;&nbsp;&nbsp;&nbsp;# before the timestamp
&nbsp;&nbsp;&nbsp;&nbsp;$date =~ s,^[^\d:/]+,,g;
&nbsp;&nbsp;&nbsp;&nbsp;# and after the time stamp
&nbsp;&nbsp;&nbsp;&nbsp;$date =~ s,[^\w\d:/]+.*,,g;
&nbsp;&nbsp;&nbsp;&nbsp;# sanity check - if the date isn't parseable return an undefined value
&nbsp;&nbsp;&nbsp;&nbsp;return undef unless $date =~ m|(\d{1,2})/(\w{3})/(\d{4}):(\d{2}):(\d{2}):(\d{2})|;
&nbsp;&nbsp;&nbsp;&nbsp;# use mktime() to convert the time fields to a unix time stamp
&nbsp;&nbsp;&nbsp;&nbsp;return mktime($6, $5, $4, $1, $months{$2}, ($3 - 1900));
}
</pre>
<p />
<pre>
# read the required resolution in seconds from the command line
my $res = shift @ARGV;
# initialize some local variables
my (%counters, $max);
</pre>
<p />
<pre>
# parse each line from stdin
while (&lt;&gt;) {
&nbsp;&nbsp;&nbsp;&nbsp;# the above is perl magic for "read one line from standard input each iteration of the loop"
&nbsp;&nbsp;&nbsp;&nbsp;# figure out the log event's time stamp
&nbsp;&nbsp;&nbsp;&nbsp;m|\[(\d+[^\]]+\d+)\]| and my $time = dateToTime($1);
&nbsp;&nbsp;&nbsp;&nbsp;# count the log event
&nbsp;&nbsp;&nbsp;&nbsp;$cur = ++$counters{int($time / $res)};
&nbsp;&nbsp;&nbsp;&nbsp;# check if the new counter value is the current largest counter value -
&nbsp;&nbsp;&nbsp;&nbsp;# this is used for normalizing the graph
&nbsp;&nbsp;&nbsp;&nbsp;$max = $cur if $max < $cur;
}
</pre>
<p />
</pre>
<pre>
# normalize on width 80 (just because, change it to whatever is good for your terminal)
my $unit = $max / 80;
</pre>
<p />
<pre>
# go over each counter, in progressive temporal order and graph the value
foreach my $time (sort { $a < => $b } keys %counters) {
&nbsp;&nbsp;&nbsp;&nbsp;chomp(my $strtime = ctime($time * $res)); # format the time for display
&nbsp;&nbsp;&nbsp;&nbsp;my $size = ($counters{$time}/$unit); # figure out the bar size for this event
&nbsp;&nbsp;&nbsp;&nbsp;# print the bar size with a "something per second" value
&nbsp;&nbsp;&nbsp;&nbsp;print  "$strtime |" . ("#" x $size) . (" " x (80 - $size)) . "| " . (int($counters{$time}/$res*10)/10) . " x/sec";
}
</pre>
<p></tt></code></p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2007/11/07/script-day-simple-log-graphing-tool%d6%bc/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script day &#8211; manually find a thumbnail for a video</title>
		<link>http://geek.co.il/wp/2007/11/02/script-day-manually-find-a-thumbnail-for-a-video</link>
		<comments>http://geek.co.il/wp/2007/11/02/script-day-manually-find-a-thumbnail-for-a-video#comments</comments>
		<pubDate>Fri, 02 Nov 2007 00:56:13 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2007/11/02/script-day-manually-find-a-thumbnail-for-a-video</guid>
		<description><![CDATA[In a vain effort to fuel my blog with some content ( ) I&#8217;ll try to get into the habit of posting some throw-away scripts I&#8217;m writing for my personal use (at work and at home). Hopefully some people would find them interesting, or maybe &#8211; god forbid &#8211; useful. Today we have a script [...]]]></description>
			<content:encoded><![CDATA[<p>In a vain effort to fuel my blog with some content ( <img src='http://geek.co.il/wp/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) I&#8217;ll try to get into the habit of posting some throw-away scripts I&#8217;m writing for my personal use (at work and at home). Hopefully some people would find them interesting, or maybe &#8211; god forbid &#8211; useful.</p>
<p>Today we have a script that will help you pick out a nice thumbnail for a movie file &#8211; this is useful when setting up movie galleries and stuff. Of course it can be done automatically (most gallery software that support video files has automatic thumbnail extraction) but they rarely choose the best shot. The script here below would extract 100 frames from the first 30 seconds of a movie file and display them using an image browser. The script would also open a file browser window &#8211; the user will then pick the desired thumbnail image and drop it into the file browser, and then close the image browser. The script would then complete the process by naming the selected thumbnail image to be the same name as the original movie (with a different extension of course).</p>
<p><span id="more-291"></span></p>
<p>Requirements:</p>
<ul>
<li><code>ffmpeg</code> &#8211; for frame extraction</li>
<li>Image Magick&#8217;s <code>convert</code> &#8211; for thumbnail post processing</li>
<li><code>gthumb</code> &#8211; as the image browser</li>
<li><code>nautilus</code> &#8211; as the file browser</li>
</ul>
<p>This script was written to run on my GNOME desktop, so its <em>a bit</em> GNOME centric, but <code>gthumb</code> and <code>nautilus</code> can be easily swapped for gwenview and dolphin, so no worries there. <code>mencoder</code> can possibly be used instead of <code>ffmpeg</code>, but I don&#8217;t know the command line for that. Image Magick is of course indispensible. The script below generates PNG thumbnails, but generating other formats &#8211; for example JPEG simply requires changing every instance of &#8220;png&#8221; to &#8220;jpg&#8221;.</p>
<p>Running the script is simple &#8211; supposedly its called &#8220;findthumbnail&#8221;, so I run it by providing on the command line all the video files I wish to execute it on, for example if I want to generate thumbnails for all my <code>flv</code> (Flash Video) files, then I&#8217;ll run<br />
<code><br />
findthumbnail *.flv<br />
</code><br />
The script would run on each file separately and would skip files for which there&#8217;s already an existing thumbnail. Currently the main problem is that post-processing the frames into thumbnails takes a long time (maybe 30 seconds on a fast computer) all the time the user has no feedback and is just siting there twiddling thumbs.</p>
<p>Anyway, here&#8217;s the code:<br />
<code><br />
#!/bin/sh<br />
</code><code>
<pre>
while [ -n "$1" ]; do
    vid="$1"
    shift
</pre>
<p></code><code>
<pre>
    if ! [ -f "$vid" ]; then
        echo "File not found: $1" >&#038;2
        continue
    fi
</pre>
<p></code><code>
<pre>
    vidname="$(echo $vid | sed -e 's/\.[^\.]*$//')"
    if [ -f "${vidname}.png" ]; then
        echo "File $vid already has a thumbnail"
        continue
    fi
</pre>
<p></code><code>
<pre>
    if [ -z "$browser" ]; then
        nautilus -n .
        browser=yes
    fi
</pre>
<p></code><code>
<pre>
    mkdir -p $HOME/.local/tmp/thumbs.$$
    ffmpeg -i "$vid" -r 3 -vframes 100  -y $HOME/.local/tmp/thumbs.$$/vid_frame_%03d.png
    (
        cd $HOME/.local/tmp/thumbs.$$
        for file in *.png; do
            convert "$file" -resize x300 -gravity center -crop 400x300+0+0 +repage thumb_"$file"
        done
        rm vid_frame*.png -f
    )
</pre>
<p></code><code>
<pre>
    gthumb $HOME/.local/tmp/thumbs.$$
    rm -rf $HOME/.local/tmp/thumbs.$$
</pre>
<p></code><code>
<pre>
    mv thumb_vid_frame_*.png "${vidname}.png"
done
</pre>
<p></code></p>
<p>See ? pretty simple.</p>
<p>Installation is simple creating a text file somewhere and putting that code into it. Its pretty white space insensitive, except for the first line &#8211; in order for the kernel to be able to run it there mustn&#8217;t be any white space before the first character. I usually put such scripts under <code>~/.local/bin</code> which is in my local execution path, so this script would go into <code>~/.local/bin/findthumbnail</code>. After you create the file, you just need to give it execute permissions &#8211; your favorite file browser should have this option in the file properties dialog, but from the command line you&#8217;d do something like<br />
<code><br />
chmod a+x ~/.local/bin/findthumbnail<br />
</code></p>
<p>A simple explanation of the various stages is in order, I think: we loop as long as we have some value from the command line &#8211; and for each loop we get the (current) first parameter from the command line and remove it. We then check if the file exists &#8211; if not we log an error and check the next parameter. If there is a file by that name, we strip the extension from the filename and check if there is already a thumbnail for that movie &#8211; that way we can rerun the script on a directory and it will only generate thumbnails that are missing. If there isn&#8217;t an old thumbnail we can go on to create a temporary directory, extract some frames from the video file into said temp directory (using <code>ffmpeg</code>), create thumbnails from the frames (using <code>convert</code>) and remove the used frames. Lastly we launch the image browser and wait for it to be closed by the user. when the image browser is done we clean up the temporary directory and if the user has chosen a thumbnail then we make sure its named like the original file. </p>
<p>I skipped the part about opening the file browser because this is slightly more complicated &#8211; I want to open only one file browser, regardless how many video files I&#8217;m processing, but I don&#8217;t want to open the browser if I&#8217;m not going to process any files. So I only open the file browser after I decide that I am going to do some work, and then I use a variable to flag that I already opened the file browser so I don&#8217;t need to do it again.</p>
<p>Thats it. Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2007/11/02/script-day-manually-find-a-thumbnail-for-a-video/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>הפעלת חלונות XP תחת מכונה וירטואלית בלינוקס</title>
		<link>http://geek.co.il/wp/2007/08/21/running-windows-in-a-linux-kvm-kernel-virtual-machine</link>
		<comments>http://geek.co.il/wp/2007/08/21/running-windows-in-a-linux-kvm-kernel-virtual-machine#comments</comments>
		<pubDate>Tue, 21 Aug 2007 19:43:16 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2007/08/21/running-windows-in-a-linux-kvm-kernel-virtual-machine</guid>
		<description><![CDATA[החל מגרסה 2.6.20 של גרעין מערכת ההפעלה לינוקס, נוספה יכולת למערכת ההפעלה המאפשרת להריץ מכונה וירטואלית על גבי מערכת ההפעלה עצמה, ללא תוכנה חיצונית. אם יש ברשותכם מחשב המריץ גרסה עדכנית של מערכת הפעלה מבוססת לינוקס, הנה רשימת הצעדים כדי להפעיל את חלונות בתוך מכונה וירטואלית, בלי לכבות את הלינוקס ובלי צורך בתוכנה נוספת (כמו [...]]]></description>
			<content:encoded><![CDATA[<p>החל מגרסה 2.6.20 של גרעין מערכת ההפעלה לינוקס, נוספה יכולת למערכת ההפעלה המאפשרת להריץ מכונה וירטואלית על גבי מערכת ההפעלה עצמה, ללא תוכנה חיצונית. אם יש ברשותכם מחשב המריץ גרסה עדכנית של מערכת הפעלה מבוססת לינוקס,  הנה רשימת הצעדים כדי להפעיל את חלונות בתוך מכונה וירטואלית, בלי לכבות את הלינוקס ובלי צורך בתוכנה נוספת (כמו VMWare או VirtualBox), בעזרת KVM <bdo dir="rtl">:</bdo> Kernel Virtual Machine.</p>
<p><span id="more-254"></span></p>
<p>המצרכים:</p>
<ul>
<li>מחשב מודרני עם תמיכה בהאצת וירטואליזציה בחומרה. בלי מעבד עם האצת חומרה, אפשר להריץ את חלונות רק בעזרת סימולטור וזה מאוד מאוד איטי (לא טוב לבריאות הנפש). מעבדים העונים לדרישות הן מעבדי אינטל מסדרת Core 2 או מעבדים של AMD מסדרת Athlon64 FX ומעלה.</li>
<li>מערכת הפעלה לינוקס עם קרנל 2.6.20 ומעלה, לדוגמה <a href="http://fedoraproject.org">פדורה 7</a> או <a href="http://ubuntu.com">אובונטו 7.04</a></li>
<li>חבילות התוכנה המתאימות &#8211; דרך מנהל התוכנה של מערכת ההפעלה יש לבקש להתקין את חבילת <code>kvm</code>.</li>
<li>תקליטור של חלונות XP (רצוי גרסת Professional) ומספר רשיון חוקי ותקף. אם המחשב שעליו הולכת להיות מותקנת המערכת מכיל כבר התקנה של חלונות (או הכיל בעבר ואותו רשיון לא נצא בשימוש באף מערכת אחרת כרגע) אז אפשר להשתמש באותו קוד רשיון, אחרת יש לרכוש רשיון חדש &#8211; <a href="http://web.zap.co.il/model.asp?model_id=377515">עותק של Microsoft Window XP Professional OEM באנגלית ניתן לרכוש החל מ-640 ש&#8221;ח</a></li>
</ul>
<h4>התקנה</h4>
<p>הגדרה והתקנה של המכונה הוירטואלית נעשית כולה בפקודות טקסט בטרמינל &#8211; כיום עוד אין ממשק תצורה גרפי שתומך בצורה טובה בבנית מכונות וירטואליות של KVM. אי לכך ובהתאם לזאת, נא להפעיל תוכנת טרמינל, בהתאם למערכת ההפעלה שלכם וסביבת העבודה הגרפית. ב-GNOME כדאי להפעיל את gnome-terminal שנמצא בד&#8221;כ תחת Applications->Accessories בשם Terminal, או תחת Applications->System Tools. ב-KDE כדאי להפעיל את konsole שנמצא בד&#8221;כ תחת System->Terminal. את כל שאר הפקודות יש להקיש בטרמינל אלא אם נאמר במפורש אחרת.</p>
<p>לפני שנתחיל בהתקנה, יש להוריד כמה תסריטים שכתבתי, שיעזרו בהפעלת ה-KVM, ולהתקין אותם למערכת ההפעלה. מכיוון שחלקים שונים מהתהליך דורשים הרשאות מנהל מערכת, התסריט דורש הרשאות root ואוכף את זה בעזרת פקודת sudo שמופעלת באופן אוטומטי כשהתסריט מופעל שלא עם הרשאות מתאימות. כתוצאה מכך, וכדי להקל את ההפעלה של המכונות הוירטואליות על ידי משתמשים שונים, אני ממליץ להוריד את הקבצים הנ&#8221;ל ולהתקין אותם בתיקיית <code>/usr/local/bin</code>, אבל אפשר להתקין אותם בכל תיקייה כרצונכם. בנוסף צריך להגדיר למשתמשים המעוניינים להפעיל מכונות וירטואליות הרשאות sudo ל-<code>kvm-start</code>, או לאפשר להם להריץ את התוכנה כ-root בצורה אחרת.<br />
יש להוריד את שני הקבצים <a href="http://geek.co.il/articles/kvm/kvm-start">kvm-start</a> ו-<a href="http://geek.co.il/articles/kvm/kvm-network-setup">kvm-network-setup</a> ולשמור אותם על בתיקייה כפי שתואר. לאחר מכן יש להפעיל כ-root (או בעזרת sudo) את הפקודות הבאות על מנת לאפשר להריץ את התסריטים:<br />
<code><br />
chmod 755 /usr/local/bin/kvm-start /usr/local/bin/kvm-network-setup<br />
</code><br />
 (ציינתי את התיקייה <code>/usr/local/bin</code> כפי שהסברתי למעלה, במקרה ולא שם נשמרו הקבצים, יש לשנות את הנתיב בהתאם)</p>
<p>ניגש להתקנה:</p>
<ol>
<li>דבר ראשון יש לייצר את דמות הכונן הקשיח שלתוכה נתקין את מערכת ההפעלה &#8211; אין אפשרות בשלב זה להשתמש ב-KVM עם מחיצה אמיתית ולכן צריך ליצור קובץ על הכונן הקשיח הרגיל שבתוכו תתבצע סימולציה של כונן קשיח. יש לכך גם יתרונות רבים: שימוש בכונן וירטואלי מונע שגיאות שיכולות לגרום למחיקה של מערכת ההפעלה האמיתית,  מאפשר לשכפל ולשמור גיבוי של מערכת ההפעלה ועוד כמה דברים יותר מורכבים (אולי אגע בהם בהמשך). הפקודה שצריך להקיש  היא:<br />
<code><br />
qemu-img create windows.img -f qcow2 6G<br />
</code><br />
על מנת ליצור כונן וירטואלי בגודל של 6GB. אפשר כמובן ליצור כונן בכל גודל שיכול להתאים לכמות המקום הפנוי בכונן הקשיח האמיתי, אבל יש לזכור שהתקנה של חלונות XP כולל עדכונים לוקחת כ-3.5GB בעצמה בלי שום דבר אחר. עם אנטי וירוס ועדכון דפדפן (ל-Firefox או Internet Explorer 7, או שניהם) אנחנו כבר ב-4GB. בכל מקרה, הקובץ שנוצר לא מייד תופס את כל המקום שציינו &#8211; הפורמט של הכונן הוירטואלי שבחרנו &#8211; qcow &#8211; לוקח שטח מהכונן האמיתי רק לפי השטח שבאמת מנוצל בכונן המדומה, ולכן הקובץ מתחיל מאוד קטן וגדל לפי מה ששומרים בתוכו. למרות זאת מומלץ מאוד לא לעשות &#8220;over booking&#8221; של הכונן המדומה ולא לבקש יותר גודל מכמות המקום הפנוי בכונן האמיתי מכיוון שזה יכול ליצור תקלות מוזרות במערכת ההפעלה הוירטואלית.</li>
<li>השלב הבא הוא להשיג תקליטור של חלונות ולדאוג שה-KVM יוכל לקרוא אותו. אם יש לנו תקליטור אמיתי אז כמובן שיש לשים אותו בכונן, אבל אם ברשותנו קובץ ISO של חלונות אז אין צורך לצרוב אותו &#8211; KVM יוכל לקרוא את קובץ ה-ISO ישירות כאילו הוא תקליטור אמיתי.</li>
<li>עכשיו אפשר לגשת להפעלה של המכונה הוירטואלית, ולהחל בהתקנה של חלונות. אם ברשותנו תקליטור אמיתי, יש להפעיל:<br />
<code><br />
kvm-start windows.img --windows --cdrom<br />
</code><br />
לעומת זאת, אם נעדיף להתקין מקובץ ISO (לדוגמה כי אין במחשב כונן תקליטורים אמיתי), אז צריך להפעיל:<br />
<code><br />
kvm-start windows.img --windows --cd-image ms-windows-xp.iso<br />
</code><br />
(כמובן שיש להחליף את <code>ms-windows-xp.iso</code> בשם הקובץ האמיתי(</p>
<p>הציון של <code>--windows</code> מטרתו להכריח את חלונות להיות מותקן בלי תמיכה ב-ACPI, שאחרת המערכת לא תותקן כמו שצריך ותסרב לרוץ. לאחר ההתקנה אין צורך להוסיף את האפשרות הזאת במהלך הפעלה רגילה.
</li>
<li>עכשיו צריך להופיע חלון ובו נטען התקליטור של חלונות. בשביל להתחיל את ההתקנה, יש ללחוץ על איזשהוא מקש תוך חמש שניות מרגע שהתקליטור נטען &#8211; תופיע על כך הודעה בחלון, ולאחר מכן ממשיכים עם התקנה רגילה של חלונות.</li>
<li>כשההתקנה מסתיימת חלונות יאתחל את המחשב הוירטואלי. יתכן והמחשב יצליח לעשות אתחול מסודר, ויתכן שהוא פשוט יכבה &#8211; במקרה שהחלון פשוט נעלם, בשורות הפקודה יש לחזור על הפקודה הקודמת ולהריץ אותה שוב כדי להשלים את השלב השני של ההתקנה.</li>
<li> בתום השלב השני, חלונות ינסה לכבות את המחשב שוב. הפעם יש לוודא שהמחשב הוירטואלי אכן נכבה והחלון נעלם &#8211; אם הוא ממשיך באתחול רגיל, פשוט יש לסגור את החלון כמו חלון של ישום רגיל. עכשיו אפשר להפעיל את המערכת הוירטואלית בלי התקליטור, בצורה הזאת:<br />
<code><br />
kvm-start windows.img<br />
</code><br />
והמערכת תופעל מהתחלה בצורה רגילה. </li>
<li>עכשיו אפשר להגדיר את חיבור הרשת. אנחנו הולכים להשתמש בהגדרות סטאטיות בשביל הרשת הוירטואלית &#8211; ככה היה לי קל יותר לכתוב את התסריטים:<br />
יש לגשת לחיבורי הרשת (אני בד&#8221;כ לוחץ כפתור ימני על &#8220;Network Places&#8221; ובוחר &#8220;Properties&#8221;) ולהכנס לדיאלוג ה-TCP/IP properties של חיבור הרשת. שם יש להגדיר את כתובת ה-IP  כ-<code>192.168.100.2</code>, את הרשת כ-<code>255.255.255.0</code> ואת ה-gateway כ-<code>192.168.100.1</code>. בנוסף יש להגדיר את שרתי השמות לפי מה שמוגדר במחשב המארח. אני בד&#8221;כ כותב <code>194.90.1.5</code> (שרת השמות של נטוויז&#8217;ן. אני כדי משוכנע שלא אכפת להם, למרות שאני לא לקוח). לאשר ולסגור את הדיאלוג. הרשת צריכה לעבוד עכשיו ואפשר לבדוק זאת על ידי הפעלת הדפדפן (Internet Explorer בלבד, לצערי). ההגדרות הנ&#8221;ל קבועות בתסריט הגדרות הרשת (<code>kvm-network-setup</code> ואפשר לשנות אותן ידנית אבל עוד אין אפשרות להגדיר את זה באופן נוח.	</li>
<li>מומלץ בשלב זה להפעיל את Windows Update ולהתקין את כל עדכוני האבטחה. דבר זה ידרוש אתחול המערכת מספר פעמים נוספות אבל לא יגזול יותר משעתיים שלוש על מחשב מודרני עם חיבור מהיר לאינטרנט</li>
</ol>
<p>יש לשים לב שהממשק הגרפי של המחשב הוירטואלי לא תופס את העכבר באופן אוטומטי &#8211; כדי להשתמש בעכבר בתוך המכונה הוירטואלית צריך ללחוץ על החלון עם אחד מלחצני העכבר, ואז העכבר יתפס על ידי המכונה הוירטואלית. כשהעכבר תפוס הוא אינו יכול לחרוג מגבולות החלון של המכונה הוירטואלית, ובשביל לשחרר אותו כדי לחזור לשולחן העבודה האמיתי צריך ללחוץ על CTRL ו-ALT בו זמנית.</p>
<p>יש אפשרות לשפר את המצב על ידי שימוש ב-VNC, שהוא פרוטוקול תקשורת המאפשר העברה של תצוגה גרפית מלאה על גבי הרשת &#8211; בדומה ל-Remote Desktop של חלונות. כשמפעילים את מצב ה-VNC של KVM, לא מופיע חלון רגיל כשמפעילים את המכונה הוירטואלית, אלא במקום זאת מופעל שרת VNC מקומי, בלי תצוגה, שאפשר להתחבר אליו בעזרת תוכנת לקוח של VNC (שמגיעה עם כל מערכת הפעלה מודרנית היום), לדוגמה vncviewer או krdc (אני ממליץ על האחרון). כדי להפעיל את KVM במצב VNC יש להריץ:<br />
<code><br />
kvm-start windows.img --vnc<br />
</code><br />
אחרי שמערכת ההפעלה עולה אפשר להתחבר לתצוגה, לדוגמה על ידי krdc על ידי הרצה &#8211; משורת הפקודה או בעזרת דיאלוג &#8220;הפעל&#8221; הרגיל של שולחן העבודה &#8211; של הפקודה <code>krdc :1</code>. </p>
<p>תוכנת הלקוח של VNC תופסת את העכבר באופן אוטומטי כשהוא נכנס לחלון של התצוגה ומשחררת את העכבר כשמושכים אותו מחוץ לחלון. הבעיה היחידה היא שאין סנכרון טוב בין הסמן של העכבר בתוך המכונה הוירטואלית לבין הסמן הפנימי של תוכנת ה-VNC (מסיבות טכניות שאין טעם להכנס אליהן כרגע). כדי לפתור זאת צריך להכנס ל-Control Panel בחלונות, ולמצוא את הגדרות העכבר, ושם תחת Pointer Options לכבות את &#8220;Enhance pointer precision&#8221; ולכוון את &#8220;Pointer Speed&#8221; כך שיהיה בדיוק באמצע. עכשיו לאשר ולסגור.התוצאה צריכה להיות שהסמן של העכבר במערכת ההפעלה הוירטואלית וב-VNC נעים באותה מהירות אבל כנראה לא ממש אחד על השני &#8211; צריך לאפס אותם על ידי שמביאים את הסמן של העכבר במערכת ההפעלה לאחת הפינות, יוצאים מהחלון וחוזרים.</p>
<h4>חשוב מאוד</h4>
<p>במצב VNC, סגירת החלון של תוכנת ה-VNC לא מכבה את המחשב הוירטואלי &#8211; אפילו אם החלונות עשה shutdown והגיע למסך של &#8220;You may now turn off your computer&#8221;, ה-KVM עדיין רץ. אם הרצנו אותו משורת הפקודה אז אפשר לחזור לטרמינל ולהקיש CTRL ו-C ביחד כדי ל&#8221;שבור&#8221; את ה-KVM, אחרת צריך למצוא את ה-kvm ברשימת התהליכים ולהרוג אותו משם (ברשימת התהליכים יופיע גם <code>kvm-start</code> &#8211; יש להזהר לא להרוג אותו אלא רק את התהליך הראשי של ה-KVM. לאחר שהתהליך הראשי יכבה, <code>kvm-start</code> צריך לנקות אחריו, ולאחר מכן הוא יסגר לבד).</p>
<p>זהו לבינתיים. ל-<code>kvm-start</code> יש הרבה אפשרויות נוספות להריץ את ה-KVM, ואפשר להפעיל <code>kvm-start --help</code> בשביל לקבל רשימה מלאה. אם יש למישהו בעיות להפעיל את המערכת הוא מוזמן לפנות אלי, כמו כן אשמח לקבל הצעות ושיפורים לתסריטים. </p>
<p>בהצלחה.</p>
<p><a href='http://geek.co.il/wp/wp-content/uploads/2007/08/windows-is-scanning-for-viruses.png' title='Windows is afraid of viruses'><img width="750" src='http://geek.co.il/wp/wp-content/uploads/2007/08/windows-is-scanning-for-viruses.png' alt='Windows is afraid of viruses' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2007/08/21/running-windows-in-a-linux-kvm-kernel-virtual-machine/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>דרושה: ספריה</title>
		<link>http://geek.co.il/wp/2005/07/31/%d7%93%d7%a8%d7%95%d7%a9%d7%94-%d7%a1%d7%a4%d7%a8%d7%99%d7%94</link>
		<comments>http://geek.co.il/wp/2005/07/31/%d7%93%d7%a8%d7%95%d7%a9%d7%94-%d7%a1%d7%a4%d7%a8%d7%99%d7%94#comments</comments>
		<pubDate>Sun, 31 Jul 2005 07:52:26 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2005/07/31/%d7%93%d7%a8%d7%95%d7%a9%d7%94-%d7%a1%d7%a4%d7%a8%d7%99%d7%94</guid>
		<description><![CDATA[קראתי את הפוסט האחרון של xslf באתר שלה (ברוכה השבה לארצנו) ודבר אחד עורר בי תהיה &#8211; היא מדברת שם על שני ספרים שקראה, ומקשרת אותם לעמוד המתאים באמזון &#8211; כמו שכולם עושים. דבר שלחלוטין לא ברור לי. כשאני חושב על &#8220;מקום של ספרים&#8221; (או &#8220;אתר של ספרים&#8221; לצורך הנושא), אני חושב על &#8220;ספריה&#8221;, לא [...]]]></description>
			<content:encoded><![CDATA[<p dir="rtl">
קראתי את הפוסט האחרון של <a href="http://www.xslf.com/archives/000183.html">xslf</a> באתר שלה (ברוכה השבה לארצנו) ודבר אחד עורר בי תהיה &#8211; היא מדברת שם על שני ספרים שקראה, ומקשרת אותם לעמוד המתאים באמזון &#8211; כמו שכולם עושים.
</p>
<p dir="rtl">
דבר שלחלוטין לא ברור לי.<span id="more-22"></span> כשאני חושב על &#8220;מקום של ספרים&#8221; (או &#8220;אתר של ספרים&#8221; לצורך הנושא), אני חושב על &#8220;ספריה&#8221;, לא &#8220;חנות ספרים&#8221;, וקצת מוזר לי שכשמישהו מדבר על ספרים הקישור הוא <strong>תמיד</strong> מסוג &#8211; &#8220;קראתי ספר טוב, לכו תקנו אותו&#8221;.
</p>
<p dir="rtl">
האמת &#8211; ניסיתי לחפש משהו אחר: אתר אינטרנט על ספרים, שאינו חנות ספרים מקוונת או אתר השוואת מחירים או חיפוש ספרים לקניה (isdn.nu הוא דוגמה לשתי הקטגוריות האחרונות), והדבר היחיד שמצאתי הוא Book Crossing שבצורה מצערת מאוד אין בו דרך טובה או נוחה למצוא ספרים עם כותרת מסויימת או אפילו של מחבר מסוים (לדוגמא, החיפוש <a href="http://www.bookcrossing.com/search/?title=the+hobit&#038;author=&#038;category=&#038;isbn=&#038;bcid=&#038;status=0&#038;screenname=&#038;=Wait...">The Hobit</a> לוקח המון זמן והתוצאה היא שתי כניסות שלכל אחת מהן איות שונה. נסו עכשיו ללחוץ על שם הסופר באחת הכניסות &#8211; התוצאה: 0 ספרים. מאוד מוזר.
</p>
<p dir="rtl">
אבל לא באתי לדבר על הבאגים ב-<a href="http://www.bookcrossing.com">Book Crossing</a> (שמלבד הבעיות הקטנות האלה הוא אתר מצוין, שבכלל לא מתיימר להיות אתר מידע על ספרים). למרות חיפושים רבים בגוגל, לא הצלחתי למצוא אתר &#8220;ספרייתי&#8221; (להבדיל מאתר של ספריה) &#8211; אתר שסוקר ספרים מתוך חדוות הקריאה, ולא מתוך חדוות הקניה.
</p>
<p dir="rtl">
אולי אני צריך להרים את הכפפה?</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2005/07/31/%d7%93%d7%a8%d7%95%d7%a9%d7%94-%d7%a1%d7%a4%d7%a8%d7%99%d7%94/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
