<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Frane Bandov's Blog</title>
	
	<link>http://frane.offbyte.com</link>
	<description />
	<lastBuildDate>Thu, 18 Nov 2010 02:43:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/FraneBandov" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="franebandov" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://frane.offbyte.com/?pushpress=hub" /><item>
		<title>New Release: Eject Volume v0.3</title>
		<link>http://frane.offbyte.com/2010/07/12/new-release-eject-volume-v0-3/</link>
		<comments>http://frane.offbyte.com/2010/07/12/new-release-eject-volume-v0-3/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 16:48:49 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Eject Volume]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=192</guid>
		<description><![CDATA[Eject Volume v0.3 is out. As always, you can download it here. Besides the slight redesign, it offers three new features, namely the volume icons, support for network volumes and an &#8220;Eject All&#8221; button. It&#8217;s a major rewrite of the original code, which makes it more modular and faster. The handling of the volumes is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://frane.offbyte.com/eject-volume/">Eject Volume v0.3</a> is out. As always, you can download it <a href="http://frane.offbyte.com/eject-volume/">here</a>.
Besides the slight redesign, it offers three new features, namely the volume icons, support for network volumes and an &#8220;Eject All&#8221; button.
It&#8217;s a major rewrite of the original code, which makes it more modular and faster. The handling of the volumes is now done via a Cocoa widget-plugin that improves speed and makes listing and ejecting of volumes more stable.
Have fun with it!</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2010/07/12/new-release-eject-volume-v0-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>rating_for – A context-based rating plugin for Rails</title>
		<link>http://frane.offbyte.com/2010/07/09/rating_for-a-context-based-rating-plugin-for-rails/</link>
		<comments>http://frane.offbyte.com/2010/07/09/rating_for-a-context-based-rating-plugin-for-rails/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 13:50:29 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails 2]]></category>
		<category><![CDATA[rails 3]]></category>
		<category><![CDATA[rating]]></category>
		<category><![CDATA[rating_for]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=180</guid>
		<description><![CDATA[Today I&#8217;ve released my rating_for plugin for Rails. It allows to add multiple rating categories to one ActiveRecord model. For example if you&#8217;re building a hotel review website, the rating_for plugin can save you some work: class Hotel &#60; ActiveRecord::Base &#160; rating_for :room_service &#160; rating_for :quality end four_seasons = Hotel.find_by_name&#40;&#34;Four Seasons&#34;&#41; four_seasons.rating_for_quality.add&#40;10&#41; four_seasons.rating_for_room_service.add&#40;9&#41; rating = [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve released my rating_for plugin for Rails. It allows to add multiple rating categories to one ActiveRecord model. For example if you&#8217;re building a hotel review website, the rating_for plugin can save you some work:</p>

<div class="codecolorer-container rails default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="rails codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">class</span> Hotel <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#CC00FF; font-weight:bold;"><span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span></span><br />
&nbsp; rating_for <span style="color:#ff3333; font-weight:bold;">:room_service</span><br />
&nbsp; rating_for <span style="color:#ff3333; font-weight:bold;">:quality</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
four_seasons = Hotel.<span style="color:#9900CC;">find_by_name</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;Four Seasons&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
four_seasons.<span style="color:#9900CC;">rating_for_quality</span>.<span style="color:#5A0A0A; font-weight:bold;">add</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">10</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
four_seasons.<span style="color:#9900CC;">rating_for_room_service</span>.<span style="color:#5A0A0A; font-weight:bold;">add</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">9</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
<br />
rating = Rating.<span style="color:#5A0A0A; font-weight:bold;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:value</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">7</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
marriott = Hotel.<span style="color:#9900CC;">find_by_name</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'Marriott'</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
marriott.<span style="color:#9900CC;">rating_for_room_service</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> rating<br />
<br />
hotels = Hotel.<span style="color:#9900CC;">find_where_quality_has_average_rating_of</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">10</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></div>

<p>For more info and installation instructions, you should take a look at the plugin&#8217;s <a href="http://github.com/">GitHub</a> page: <a href="http://github.com/frane/rating_for">http://github.com/frane/rating_for</a></p>

<p>By the way: Since we&#8217;re currently on the edge between Rails 2.3 and 3.0, I&#8217;m happy to announce that the rating_for plugin is compatible with both versions.</p>

<p>Any kind of feedback is welcome and if you&#8217;ve got questions, just ask!</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2010/07/09/rating_for-a-context-based-rating-plugin-for-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eject Volume v0.2</title>
		<link>http://frane.offbyte.com/2010/03/17/eject-volume-v0-2/</link>
		<comments>http://frane.offbyte.com/2010/03/17/eject-volume-v0-2/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 22:59:50 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Eject Volume]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=174</guid>
		<description><![CDATA[Today, I&#8217;ve released version 0.2 of my Eject Volume dashboard widget for Mac OS X. It&#8217;s a bugfix release that fixes some bugs, which I encountered lately. Since its release in February 2009, the version 0.1 of Eject Volume has been downloaded over 10.000 times and was recently even blogged about as useful utility on [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I&#8217;ve released version 0.2 of my <a href="http://frane.offbyte.com/eject-volume">Eject Volume</a> dashboard widget for Mac OS X. It&#8217;s a bugfix release that fixes some bugs, which I encountered lately.
Since its release in February 2009, the version 0.1 of Eject Volume has been downloaded over 10.000 times and was recently even <a href="http://macovod.net/2010/03/moi-lyubimye-vidzhety-dlya-dashboard/">blogged</a> about as <a href="http://mac.appstorm.net/roundups/utilities-roundups/10-remarkably-useful-dashboard-widgets/">useful utility</a> on some other sites. Not bad for two hours of work <img src='http://frane.offbyte.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2010/03/17/eject-volume-v0-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My shiny new iPhone</title>
		<link>http://frane.offbyte.com/2009/05/18/my-shiny-new-iphone/</link>
		<comments>http://frane.offbyte.com/2009/05/18/my-shiny-new-iphone/#comments</comments>
		<pubDate>Mon, 18 May 2009 16:13:41 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=167</guid>
		<description><![CDATA[Today my shiny new iPhone arrived. It&#8217;s really cool and I&#8217;m really happy to finally have it. For months now I wanted replace my old cell phone and with a new one. The iPhone was my preferred choice, but I didn&#8217;t like T-Mobile&#8217;s cell phone plans for the iPhone and I was quite happy with [...]]]></description>
			<content:encoded><![CDATA[<p>Today my shiny new iPhone arrived. It&#8217;s really cool and I&#8217;m really happy to finally have it. For months now I wanted replace my old cell phone and with a new one. 
The iPhone was my preferred choice, but I didn&#8217;t like T-Mobile&#8217;s cell phone plans for the iPhone and I was quite happy with my plan. I hat already started to look for other phones, when I got a phone call from T-Mobile. The nice lady on the phone explained that they wanted thank for being a loyal customer and that I could get a new phone if I renew my contract. When I asked if I could get an iPhone, the T-Mobile lady responded that I would have to pay a small fee but that could have it if I want. 
So I renewed my contract (I was going to do that anyway) and got my iPhone. It&#8217;s really funny how things sometimes sort themselves out all on their own.</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2009/05/18/my-shiny-new-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails I18n and emails</title>
		<link>http://frane.offbyte.com/2009/04/07/rails-i18n-and-emails/</link>
		<comments>http://frane.offbyte.com/2009/04/07/rails-i18n-and-emails/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 14:57:11 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[I18n]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=154</guid>
		<description><![CDATA[Since version 2.2, Ruby on Rails comes with an integrated support for internationalization (I18n) which makes developing multi-language websites very easy. Here&#8217;s how it works. Recently I worked on a project where I used the I18n API to provide multi-language support. The website had a user system and the user was able to change the [...]]]></description>
			<content:encoded><![CDATA[<p>Since version 2.2, Ruby on Rails comes with an integrated support for internationalization (I18n) which makes developing multi-language websites very easy. <a href="http://www.artweb-design.de/2008/7/18/the-ruby-on-rails-i18n-core-api">Here&#8217;s how it works.</a>
Recently I worked on a project where I used the I18n API to provide multi-language support. The website had a user system and the user was able to change the  web-site&#8217;s language in his/her profile. Basically, there was a model &#8220;User&#8221; with an attribute &#8220;language&#8221;, which was stored in the database. Every time when a user would log in on the website, the web-site&#8217;s language would change to the user&#8217;s preset language with:</p>

<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">I18n.<span style="color:#9900CC;">locale</span> = current_user.<span style="color:#9900CC;">language</span></div></div>

<p>However, there was a problem with the emails, which a user automatically received from the web-site. I used a cron-job with Rails&#8217; &#8220;script/runner&#8221; to periodically send mails from a model like this:</p>

<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">class</span> Task<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">send_mails</span><br />
&nbsp; &nbsp; User.<span style="color:#9900CC;">all</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#ff3333; font-weight:bold;">:conditions</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;want_mail = 1&quot;</span> <span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>user<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; UserMailer.<span style="color:#9900CC;">deliver_daily_mail</span><span style="color:#006600; font-weight:bold;">&#40;</span>user<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>

<p>The mail template was translated with the Rails I18n API like this:</p>

<div class="codecolorer-container rails default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="rails codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">&lt;%</span>= I18n.<span style="color:#9900CC;">t</span> <span style="color:#996600;">'daily_mail.hello'</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#0066ff; font-weight:bold;">@user</span>.<span style="color:#9900CC;">name</span> <span style="color:#006600; font-weight:bold;">%&gt;</span><br />
...</div></div>

<p>The problem was only that the mails were sent out in English because the web-sites default language (I18n.default_locale) was English and there was no &#8220;I18n.locale&#8221; set in &#8220;script/runner&#8221;. 
The easiest solution to that problem is to set the locale somewhere in your email setup:</p>

<div class="codecolorer-container ruby default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">class</span> UserMailer <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActionMailer::Base</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> daily_mail<span style="color:#006600; font-weight:bold;">&#40;</span>user<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; I18n.<span style="color:#9900CC;">locale</span> = user.<span style="color:#9900CC;">language</span><br />
&nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@recipients</span> &nbsp;= user.<span style="color:#9900CC;">email</span><br />
&nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@from</span> &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color:#996600;">&quot;The Daily Mailer &lt;daily_mail@example.com&gt;&quot;</span><br />
&nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@subject</span> &nbsp; &nbsp; = I18n.<span style="color:#9900CC;">t</span> <span style="color:#996600;">'daily_mail.subject'</span><br />
&nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@sent_on</span> &nbsp; &nbsp; = <span style="color:#CC00FF; font-weight:bold;">Time</span>.<span style="color:#9900CC;">now</span><br />
&nbsp; &nbsp; <span style="color:#0066ff; font-weight:bold;">@body</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:user</span><span style="color:#006600; font-weight:bold;">&#93;</span> = user<br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>

<p>Alternatively, it&#8217;s possible to set the language in the email template:</p>

<div class="codecolorer-container rails default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="rails codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#006600; font-weight:bold;">&lt;%</span>= I18n.<span style="color:#9900CC;">t</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'daily_mail.hello'</span>, <span style="color:#ff3333; font-weight:bold;">:locale</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0066ff; font-weight:bold;">@user</span>.<span style="color:#9900CC;">locale</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#0066ff; font-weight:bold;">@user</span>.<span style="color:#9900CC;">name</span> <span style="color:#006600; font-weight:bold;">%&gt;</span><br />
...</div></div>

<p>It&#8217;s more a logical then a technical problem, but it shows how (logically) complicated multi-language web-sites can be.</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2009/04/07/rails-i18n-and-emails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows server lockout</title>
		<link>http://frane.offbyte.com/2009/03/11/windows-server-lockout/</link>
		<comments>http://frane.offbyte.com/2009/03/11/windows-server-lockout/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 01:44:52 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=143</guid>
		<description><![CDATA[Since there are not only unix-based servers out there in the web, I sometimes also encounter Windows servers which I have to maintain. Usually, you connect to a Windows server using Microsoft&#8217;s &#8220;Remote Desktop Connection&#8221; (RDC) client. If you&#8217;re not running a terminal server, the number of allowed sessions on the server is limited to [...]]]></description>
			<content:encoded><![CDATA[<p>Since there are not only unix-based servers out there in the web, I sometimes also encounter Windows servers which I have to maintain.</p>

<p>Usually, you connect to a Windows server using Microsoft&#8217;s &#8220;Remote Desktop Connection&#8221; (RDC) client. If you&#8217;re not running a terminal server, the number of allowed sessions on the server is limited to two sessions at a time.</p>

<p>Unfortunately a session isn&#8217;t ended and closed if you close your RDC client window, but only if you log off, i.e. by clicking on &#8220;Start&#8221; -> &#8220;Log Off&#8221;. So if you just close your RDC window without to log yourself really off, there&#8217;s a good chance that you lock yourself out from the server and thus get the following message &#8220;Terminal Server Has Exceeded the Maximum Number of Allowed Connections&#8221;.</p>

<p>If you have access to your server, you can easily log on to the server on-site and remove all &#8220;dead&#8221; sessions, but if your server is somewhere on this planet where you can&#8217;t just go over to, you should be served by using the following command:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\&gt;mstsc -v:your_server_name_or_ip -admin</div></div>

<p>This command gives you access to a special session, namely the session 0 and you should be able to log in as &#8220;Administrator&#8221; and remove the dead sessions.</p>

<p>This two sessions at a time restriction is really annoying and it gets even more annoying if other people also use the server and don&#8217;t log off correctly. Having such stupid problems is probably one reason why many people get mad a Microsoft and their products. It&#8217;s simply a licensing issue you don&#8217;t have on Linux and *BSD systems <img src='http://frane.offbyte.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2009/03/11/windows-server-lockout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Eject Volume</title>
		<link>http://frane.offbyte.com/2009/02/21/introducing-eject-volume/</link>
		<comments>http://frane.offbyte.com/2009/02/21/introducing-eject-volume/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 16:05:50 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Dashboard]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Eject Volume]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=138</guid>
		<description><![CDATA[I&#8217;ve written my first MacOS X Dashboard widget today. It&#8217;s called Eject Volume and provides a handy way to eject volumes which are mounted on your system. More information about the widget and a download option is provided here.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written my first MacOS X Dashboard widget today. It&#8217;s called Eject Volume and provides a handy way to eject volumes which are mounted on your system. 
More information about the widget and a download option is provided <a href="http://frane.offbyte.com/eject-volume/">here</a>.</p>

<p><img src="http://frane.offbyte.com/wp-content/uploads/2009/02/screenshot.png" alt="Eject Volume Screenshot" title="Eject Volume Screenshot" width="202" height="227" class="alignleft size-full wp-image-75" /></p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2009/02/21/introducing-eject-volume/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upgrading Debian Etch to Lenny</title>
		<link>http://frane.offbyte.com/2009/02/19/upgrading-debian-etch-to-lenny/</link>
		<comments>http://frane.offbyte.com/2009/02/19/upgrading-debian-etch-to-lenny/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 20:49:11 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Etch]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=63</guid>
		<description><![CDATA[On last Saturday Debian 5.0 &#8220;Lenny&#8221; has been released as stable. This probably means a lot of updating work for many administrators. I was updating a couple of servers during the last days. Due to Debian&#8217;s APT system it&#8217;s a pretty easy process. Step 1: Edit your /etc/apt/sources.list. Replace every occurrence of &#8220;etch&#8221; (I assume [...]]]></description>
			<content:encoded><![CDATA[<p>On last Saturday <a href="http://www.debian.org">Debian</a> 5.0 &#8220;<a href="http://debian.org/News/2009/20090214">Lenny</a>&#8221; has been released as stable. This probably means a lot of updating work for many administrators. I was updating a couple of servers during the last days. Due to Debian&#8217;s APT system it&#8217;s a pretty easy process.</p>

<p><strong>Step 1:</strong>
Edit your <em>/etc/apt/sources.list</em>. Replace every occurrence of &#8220;etch&#8221; (I assume you&#8217;re updating from Debian &#8220;Etch&#8221;) with &#8220;lenny&#8221;. Your sources.list should now be looking roughly like that:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">deb http://ftp.de.debian.org/debian/ stable main<br />
deb-src http://ftp.de.debian.org/debian/ stable main<br />
<br />
deb http://security.debian.org/ stable/updates main contrib<br />
deb-src http://security.debian.org/ stable/updates main contrib</div></div>

<p><strong>Step 2:</strong>
Simply run <em>apt-get update</em>and you should probably get something like this:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">srv:~# apt-get update<br />
Get:1 http://ftp.de.debian.org stable Release.gpg [386B]<br />
Hit http://ftp.de.debian.org stable Release &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
Get:2 http://security.debian.org stable/updates Release.gpg [189B]<br />
Hit http://security.debian.org stable/updates Release<br />
...<br />
Hit http://security.debian.org stable/updates/main Sources<br />
Hit http://security.debian.org stable/updates/contrib Sources<br />
Fetched 2B in 0s (15B/s)<br />
Reading package lists... Done<br />
W: There is no public key available for the following key IDs:<br />
4D270D06F42584E6<br />
W: You may want to run apt-get update to correct these problems</div></div>

<p>Apparently, this means you need to get the public key for 4D270D06F42584E6. <img src='http://frane.offbyte.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   This can easily be done with the following commands.</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">srv:~# gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 4D270D06F42584E6<br />
gpg: directory `/root/.gnupg' created<br />
gpg: can't open `/gnupg/options.skel': No such file or directory<br />
gpg: keyring `/root/.gnupg/secring.gpg' created<br />
gpg: keyring `/root/.gnupg/pubring.gpg' created<br />
gpg: requesting key F42584E6 from hkp server wwwkeys.eu.pgp.net<br />
gpg: /root/.gnupg/trustdb.gpg: trustdb created<br />
gpg: key F42584E6: public key &quot;Lenny Stable Release Key &lt;debian-release@lists.debian.org&gt;&quot; imported<br />
gpg: no ultimately trusted keys found<br />
gpg: Total number processed: 1<br />
gpg: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; imported: 1<br />
srv:~# apt-key add /root/.gnupg/pubring.gpg <br />
OK</div></div>

<p><em>Please note that the key ID and though the public key needed on your system can differ from this one.</em></p>

<p><strong>Step 3</strong>
Finally, you can rerun the package-list update and run the actual upgrade.</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">srv:~# apt-get update<br />
srv:~# apt-get dist-upgrade</div></div>

<p>Depending on your machine&#8217;s capacity and your internet connection speed the upgrade can take from about 15 minutes to some hours. The avarege time my updates took was 30 minutes. After that you can reboot your freshly upgraded system with the new kernel and you&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2009/02/19/upgrading-debian-etch-to-lenny/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic Authentication problems with Phusion Passanger (mod_rails)</title>
		<link>http://frane.offbyte.com/2009/01/30/basic-authentication-problems-with-phusion-passanger-mod_rails/</link>
		<comments>http://frane.offbyte.com/2009/01/30/basic-authentication-problems-with-phusion-passanger-mod_rails/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 18:39:01 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[mod_rails]]></category>
		<category><![CDATA[Phusion Passenger]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=55</guid>
		<description><![CDATA[Phusion Passenger aka. &#8220;mod_rails&#8221; is great! It makes Rails deployment pretty easy and time-saving. Unfortunately it has a bug in it&#8217;s current 2.0.6 version which breaks Basic Authentication. Though this bug is fixed in the unreleased 2.1 version (see here) you need to care about the problem by yourself for now. The only working solution [...]]]></description>
			<content:encoded><![CDATA[<p>Phusion Passenger aka. &#8220;mod_rails&#8221; is great! It makes Rails deployment pretty easy and time-saving.
Unfortunately it has a bug in it&#8217;s current 2.0.6 version which breaks Basic Authentication. Though this bug is fixed in the unreleased 2.1 version (<a href="http://code.google.com/p/phusion-passenger/issues/detail?id=94">see here</a>) you need to care about the problem by yourself for now.
The only working solution for me was to user Rails&#8217; Basic Authentication functionality by hacking the following into my application controller:</p>

<div class="codecolorer-container rails default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="rails codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">class</span> ApplicationController <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#CC00FF; font-weight:bold;"><span style="color:#6666ff; font-weight:bold;">ActionController::Base</span></span><br />
<br />
&nbsp; <span style="color:#5A0A0A; font-weight:bold;">before_filter</span> <span style="color:#ff3333; font-weight:bold;">:http_auth</span> &nbsp;<br />
&nbsp; <br />
&nbsp; ...<br />
<br />
&nbsp; <span style="color:#9900CC;">private</span> <br />
&nbsp; <br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> http_auth<br />
&nbsp; &nbsp; authenticate_or_request_with_http_basic <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>user_name, password<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; &nbsp; user_name == <span style="color:#996600;">&quot;JohnDoe&quot;</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> password == <span style="color:#996600;">&quot;secret123&quot;</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>

<p>At this point you can be as creative as you want with reading the user name and password form a file or database and checking hashed passwords instead of plain text.
For my purposes this was just enough, so I didn&#8217;t waste any more time on it.
At the end of this post be warned: Basic Authentication through Rails does only protect your application, but it does <em>not</em> protect the static content in your public directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2009/01/30/basic-authentication-problems-with-phusion-passanger-mod_rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Archiving Thunderbird e-mails</title>
		<link>http://frane.offbyte.com/2009/01/02/archiving-thunderbird-e-mails/</link>
		<comments>http://frane.offbyte.com/2009/01/02/archiving-thunderbird-e-mails/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 13:24:10 +0000</pubDate>
		<dc:creator>Frane</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[erchive]]></category>
		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://frane.offbyte.com/?p=45</guid>
		<description><![CDATA[Looking for a smart way to archive your e-mails from Thunderbird? There are many advices like copy your &#8220;/home/(username)/.mozilla/&#8230;&#8221; directory, which (in my opinion) are not very smart. After googling quite a while, I found a very cool TB extension called SmartSave and it lives up to its name! It needed less than ten seconds [...]]]></description>
			<content:encoded><![CDATA[<p>Looking for a smart way to archive your e-mails from <a href="http://www.getthunderbird.com">Thunderbird</a>?
There are many advices like copy your &#8220;/home/(username)/.mozilla/&#8230;&#8221; directory, which (in my opinion) are not very smart.
After googling quite a while, I found a very cool TB extension called <a href="https://addons.mozilla.org/de/thunderbird/addon/2887">SmartSave</a> and it lives up to its name!
It needed less than ten seconds to export 1900 mails with a total size of 150 MB. 
I like it!</p>
]]></content:encoded>
			<wfw:commentRss>http://frane.offbyte.com/2009/01/02/archiving-thunderbird-e-mails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic page generated in 1.583 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-05-20 15:43:21 --><!-- Compression = gzip -->

