<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>.: the bojicas &#187; Science &amp; Technology</title>
	<atom:link href="http://blog.bojica.com/category/science-technology/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.bojica.com</link>
	<description>family is all that matters. think!</description>
	<lastBuildDate>Sun, 27 Jun 2010 16:22:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>Copyright &#xA9; 2010 .: the bojicas </copyright>
		<managingEditor>bojicas@gmail.com ()</managingEditor>
		<webMaster>bojicas@gmail.com ()</webMaster>
		<category>posts</category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>family is all that matters. think!</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>bojicas@gmail.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://blog.bojica.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://blog.bojica.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>.: the bojicas</title>
			<link>http://blog.bojica.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Ctags and Vim for Ruby on Rails Development</title>
		<link>http://blog.bojica.com/2010/06/27/ctags-and-vim-for-ruby-on-rails-development</link>
		<comments>http://blog.bojica.com/2010/06/27/ctags-and-vim-for-ruby-on-rails-development#comments</comments>
		<pubDate>Sun, 27 Jun 2010 14:44:53 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=263</guid>
		<description><![CDATA[Tagging is a feature that gives vim IDE-like code browsing powers. :help tags A tag is an identifier that appears in a &#8220;tags&#8221; file. It is a sort of label that can be jumped to. For example: In C programs each function name can be used as a tag. The &#8220;tags&#8221; file has to be [...]]]></description>
			<content:encoded><![CDATA[<p>Tagging is a feature that gives vim IDE-like code browsing powers.</p>

<div class="wp_syntax"><div class="code"><pre class="viml" style="font-family:monospace;">:help tags</pre></div></div>

<p><cite>A tag is an identifier that appears in a &#8220;tags&#8221; file.  It is a sort of label that can be jumped to.  For example: In C programs each function name can be used as a tag.  The &#8220;tags&#8221; file has to be generated by a program like ctags, before the tag commands can be used.</cite></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ctags <span style="color: #660033;">-R</span> <span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>is probably the most simple usage of <b>ctags</b> command from the command line, issued from the root of the Rails project. The result is a file named <b>tags</b> which indexed all objects, so it makes easy to jump, for example, to a Ruby method definition just by using <b>CTRL-[</b> shortcut anywhere in the code where that method is used.</p>
<p>However, <b>ctags</b> can be told to exclude some of the files and directories and it makes sense to ignore the <b>.git</b> and <b>log</b> directories as they do not contain useful information:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ctags <span style="color: #660033;">-R</span> <span style="color: #660033;">--exclude</span>=.git <span style="color: #660033;">--exclude</span>=log <span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>But it would be more useful if we could have access to the Rails core method definitions and documentation, as well as for the included gems. Bellow, I have included the gem directory of my default ruby (ruby-head under rvm):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ctags <span style="color: #660033;">-R</span> <span style="color: #660033;">--exclude</span>=.git <span style="color: #660033;">--exclude</span>=log <span style="color: #000000; font-weight: bold;">*</span> ~<span style="color: #000000; font-weight: bold;">/</span>.rvm<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>ruby-head<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<h3>Navigation tips:</h3>
<ul>
<li><b>:ta belongs_to</b> jumps to <b>belongs_to</b> method definition</li>
<li><b>CTRL-]</b> if you see a call to a method and wonder what it does, position the cursor inside the method name and hit <b>CTRL-]</b></li>
<li><b>CTRL-T</b> to go back from the method definition</li>
</ul>
<p>Two other useful shortcuts: <b>CTRL-I</b> and <b>CTRL-O</b> &#8211; think of them <b>in</b> and <b>out</b> the method definition.</p>
<h3>Navigating through a list of methods with similar names</h3>

<div class="wp_syntax"><div class="code"><pre class="viml" style="font-family:monospace;">:ta /^validates_*</pre></div></div>

<p>will look for all method definitions that starts with the given string. By default it will jump to the first definition found, but we can do more.</p>
<p>Following vim commands can be used to navigate through the method definitions:</p>
<ul>
<li><b>:ts</b> shows the list</li>
<li><b>:tn</b> goes to the next tag in that list</li>
<li><b>:tp</b> goes to the previous tag in that list</li>
<li><b>:tf</b> goes to the first tag of the list</li>
<li><b>:tl</b> goes to the last tag of the list</li>
</ul>
<h3>Resources:</h3>
<ul>
<li>:help tags</li>
<li>man ctags</li>
<li>The Geek Stuff: <a href="http://www.thegeekstuff.com/2009/04/ctags-taglist-vi-vim-editor-as-sourece-code-browser/">tags and Taglist: Convert Vim Editor to Beautiful Source Code Browser for Any Programming Language</a></li>
<li>Codeulate Screencasts: <a href="http://www.codeulatescreencasts.com/products/vim-for-rails-developers">Vim for Rails Developers</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2010/06/27/ctags-and-vim-for-ruby-on-rails-development/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting back sqlite3 to Mac OS X</title>
		<link>http://blog.bojica.com/2009/05/10/getting-back-sqlite3-to-mac-os-x</link>
		<comments>http://blog.bojica.com/2009/05/10/getting-back-sqlite3-to-mac-os-x#comments</comments>
		<pubDate>Sun, 10 May 2009 13:38:58 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Science & Technology]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=204</guid>
		<description><![CDATA[For some reason, I lost my SQLite version from my Mac OS X 10.5 Leopard. I hardly suspect MonoFramework for the &#8220;damage&#8221; caused, as /usr/bin/sqlite3 has been replaced with a link to a non-existent file from MonoFramework Library. A quick and dirty fix is to bring back the sqlite3 source and install it in the [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, I lost my SQLite version from my Mac OS X 10.5 Leopard. I hardly suspect MonoFramework for the &#8220;damage&#8221; caused, as <em>/usr/bin/sqlite3</em> has been replaced with a link to a non-existent file from <em>MonoFramework Library</em>.</p>
<p>A quick and dirty fix is to bring back the sqlite3 source and install it in the *nix fashion (configure, make, make install). For future reference, I am listing the full sequence of commands I&#8217;ve typed in <em>Terminal</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">curl http:<span style="color: #000000; font-weight: bold;">//</span>www.sqlite.org<span style="color: #000000; font-weight: bold;">/</span>sqlite-3.6.14.tar.gz <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> zx
<span style="color: #7a0874; font-weight: bold;">cd</span> sqlite-3.6.14
<span style="color: #c20cb9; font-weight: bold;">autoconf</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #666666; font-style: italic;"># check if SQLite is installed properly</span>
sqlite3 <span style="color: #660033;">--version</span>
<span style="color: #666666; font-style: italic;"># 3.6.14</span>
<span style="color: #c20cb9; font-weight: bold;">which</span> sqlite3
<span style="color: #666666; font-style: italic;"># /usr/local/bin/sqlite3</span></pre></div></div>

<p><strong>Note</strong> the new path: prefix=/usr/local, so the CLI (command line interface) sqlite3 will be accessible via /usr/local/bin/sqlite3. As sqlite is part of the core Mac, I believe it is wise not to interfere with any of the original libraries (not only CLI).</p>
<p>Do you know a &#8220;cleaner&#8221;, Mac OS X like (.dmg) way to restore SQLite? Please comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2009/05/10/getting-back-sqlite3-to-mac-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Plone to show Dubai time</title>
		<link>http://blog.bojica.com/2009/04/30/setting-up-plone-to-show-dubai-time</link>
		<comments>http://blog.bojica.com/2009/04/30/setting-up-plone-to-show-dubai-time#comments</comments>
		<pubDate>Thu, 30 Apr 2009 19:44:13 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Science & Technology]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=200</guid>
		<description><![CDATA[As a short introduction, Plone is an excellent content and document management system. I would not insist on its features and installation as it installs as a normal Mac OS X application. For this, you may find more visiting Plone.org website. In exchange, I will present the issue I had with the timezone for Dubai [...]]]></description>
			<content:encoded><![CDATA[<p>As a short introduction, <em>Plone</em> is an excellent content and document management system. I would not insist on its features and installation as it installs as a normal Mac OS X application. For this, you may find more visiting <a class="external-link" href="http://plone.org">Plone.org</a> website.</p>
<p>In exchange, I will present the issue I had with the timezone for Dubai and the workaround&#8230;</p>
<p>For some reason, the default Plone installation doesn&#8217;t pick the right time for <em>Asia/Dubai</em>.</p>
<p>So I googled back and forward but couldn&#8217;t find the correct answer.</p>
<p align="left">In fact, those tips will work for something like <em>Europe/Berlin</em> (eg setting up <em>TZ</em> variable to <em>Europe/Berlin</em>), but setting up <em>TZ</em> environment variable to <em>Asia/Dubai</em> will give me something like <em>GMT+10</em>? Obviously wrong.</p>
<p>So, the workaround is to set up the <em>TZ</em> environment variable to something more general, like <em>Etc/GMT+4</em>. We don&#8217;t care about daylight saving issues, so it should work all year round.</p>
<p>Enough words, let me know show you some code. Let&#8217;s suppose that you downloaded version 3.2.2 from <a class="external-link" href="http://plone.org/products/plone">http://plone.org/products/plone</a> for Mac OS X and used the Stand Alone installation, then, edit <em>/Applications/Plone/zinstance/buildout.cfg</em> file and locate the following lines under <em>[instance]</em> section:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># You may also control the environment variables for the instance.</span>
environment-vars =
    PYTHON_EGG_CACHE <span style="color: #800000;">${buildout:directory}</span><span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>.python-eggs</pre></div></div>

<p>Now add the TZ environment variable to point to Etc/GMT+4:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># You may also control the environment variables for the instance.</span>
environment-vars =
    PYTHON_EGG_CACHE <span style="color: #800000;">${buildout:directory}</span><span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>.python-eggs
    TZ Etc<span style="color: #000000; font-weight: bold;">/</span>GMT+<span style="color: #000000;">4</span></pre></div></div>

<p>Save the file, then run from your Terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>Plone<span style="color: #000000; font-weight: bold;">/</span>zinstance<span style="color: #000000; font-weight: bold;">/</span>
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>plonectl stop
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>buildout
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>plonectl start</pre></div></div>

<p>Now, back in your favourite browser and launch <a class="external-link" href="../../.">http://localhost:8080/Plone</a>.</p>
<p>You would see now, that Plone will report the correct time.</p>
<p>Bellow, let me show you a snapshot of the same blog post, edited in Plone:</p>
<p><a href='http://www.quicksnapper.com/bojicas/image/setting-up-plone-to-show-dubai-time-portal' alt='View the image at QuickSnapper.com'><img src='http://www.quicksnapper.com/files/2282/24094828149F9FEE4C2661_m.png' title='Hosted by QuickSnapper.com' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2009/04/30/setting-up-plone-to-show-dubai-time/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping session data across subdomains in Rails 2.3.2</title>
		<link>http://blog.bojica.com/2009/04/29/keeping-session-data-across-subdomains-in-rails-232</link>
		<comments>http://blog.bojica.com/2009/04/29/keeping-session-data-across-subdomains-in-rails-232#comments</comments>
		<pubDate>Wed, 29 Apr 2009 15:52:24 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[w2task]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=194</guid>
		<description><![CDATA[Upgrading to Rails 2.3.2 I came across with the error of not keeping the session data between subdomains. That meant I had to authenticate each time I would change the subdomain. The fix is simple. Prior to version 2.3.2, I have had something like this in environments/development.rb file: ActionController::Base.session_options[:session_domain] = '.w2task.local' In Rails 2.3.2, I [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both">Upgrading to Rails 2.3.2 I came across with the error of not keeping the session data between subdomains. That meant I had to authenticate each time I would change the subdomain.</p>
<p style="clear: both">The fix is simple.</p>
<p style="clear: both">
<p style="clear: both">Prior to version 2.3.2, I have had something like this in <em>environments/development.rb</em> file:</p>
<p style="clear: both">
<pre lang="ruby" style="clear: both">ActionController::Base.session_options[:session_domain] = '.w2task.local'
</pre>
<p style="clear: both">
<p style="clear: both">In Rails 2.3.2, I had to change this line into:</p>
<p style="clear: both">
<pre lang="ruby" style="clear: both">config.action_controller.session = {
  :domain => ".w2task.local"
}
</pre>
<p style="clear: both">
<p style="clear: both">Of course, same principle applies to <em>development.rb</em>, where:</p>
<p style="clear: both">
<pre lang="ruby" style="clear: both">config.action_controller.session = {
  :domain => ".w2task.com"
}
</pre>
<p style="clear: both">
<p style="clear: both">I&#8217;ve lost some hours in researching this solution, so I hope this will help others in need. too. As usual, I will be more than happy to hear comments from you.</p>
<p style="clear: both">
<p style="clear: both">Happy coding!</p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2009/04/29/keeping-session-data-across-subdomains-in-rails-232/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails application could not be started</title>
		<link>http://blog.bojica.com/2009/04/08/ruby-on-rails-application-could-not-be-starte</link>
		<comments>http://blog.bojica.com/2009/04/08/ruby-on-rails-application-could-not-be-starte#comments</comments>
		<pubDate>Wed, 08 Apr 2009 13:27:48 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Science & Technology]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=191</guid>
		<description><![CDATA[This is the error message, on my local machine after I upgraded to rails 2.3.2. Well, it was not an instant error, but it appeared after a while, to be more exact after I rebooted my computer. The error: no such file to load -- application.rb &#40;MissingSourceFile&#41; As the new rails renamed application.rb to application_controller.rb, [...]]]></description>
			<content:encoded><![CDATA[<p>This is the error message, on my local machine after I upgraded to rails 2.3.2. Well, it was not an instant error, but it appeared after a while, to be more exact after I rebooted my computer.</p>
<p><a href='http://www.quicksnapper.com/bojicas/image/phusion-passenger' alt='View the image at QuickSnapper.com'><img src='http://www.quicksnapper.com/files/2282/110796825249DCA2146219A_m.png' title='Hosted by QuickSnapper.com' /></a></p>
<p>The error:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">no such <span style="color: #c20cb9; font-weight: bold;">file</span> to load <span style="color: #660033;">--</span> application.rb <span style="color: #7a0874; font-weight: bold;">&#40;</span>MissingSourceFile<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>As the new rails renamed application.rb to application_controller.rb, I have immediately sensed the root of the problem, so I&#8217;ve tried to</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>script<span style="color: #000000; font-weight: bold;">/</span>server</pre></div></div>

<p>and it worked. That means it has something to do with the Phusion Passenger.</p>
<p>But what? I&#8217;ve updated all the gems, and passenger was updated too.</p>
<p>Well, yes, but not the apache module, and not the configuration&#8230;</p>
<p>This is to remember: Every time, after getting a new version of Phusion Passenger via sudo gem update, I have to:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> passenger-install-apache2-module</pre></div></div>

<p>and go through the setup, than edit the httpd.conf file (in my case: /private/etc/apache2/httpd.conf) and replace the old passenger configuration lines with these new ones:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">LoadModule</span> passenger_module /Library/Ruby/Gems/<span style="color: #ff0000;">1.8</span>/gems/passenger-2.1.3/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/<span style="color: #ff0000;">1.8</span>/gems/passenger-2.1.3
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/<span style="color: #ff0000;">1.8</span>/usr/bin/ruby</pre></div></div>

<p>Last step is, of course, to restart the apache server:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></div></div>

<p>Now we are set to go.</p>
<p>I have post this article as a reminder to myself in case something similar would happen in future, and as well I hope to be useful to the readers of my blog whom might struggle with the same type of issues.</p>
<p>For any other tips and comments, it would be a pleasure to see you replying to this post.</p>
<p>Coding is fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2009/04/08/ruby-on-rails-application-could-not-be-starte/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Gimp-Reflection Plugin Screencast</title>
		<link>http://blog.bojica.com/2009/03/10/the-gimp-reflection-plugin-screencast</link>
		<comments>http://blog.bojica.com/2009/03/10/the-gimp-reflection-plugin-screencast#comments</comments>
		<pubDate>Tue, 10 Mar 2009 05:49:47 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Digital Art]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Science & Technology]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=184</guid>
		<description><![CDATA[The gimp-reflection plugin extends the lower section of an image as a reflection of the original image with a single click, similar effects to what you see on Apple&#8217;s website, iWeb, etc. This screencast shows you how to download, install and use the gimp-reflection plugin. Enjoy! Example: The original image: The result, after the one-click [...]]]></description>
			<content:encoded><![CDATA[<p>The <em>gimp-reflection plugin</em> extends the lower section of an image as a reflection of the original image with a single click, similar effects to what you see on Apple&#8217;s website, iWeb, etc.</p>
<p>This screencast shows you how to download, install and use the gimp-reflection plugin. Enjoy!</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/TM78nTap-dg&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/TM78nTap-dg&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Example:</p>
<p>The original image:<br />
<img src="http://blog.bojica.com/wp-content/uploads/2009/03/photo-19-300x225.jpg" alt="photo-19" title="photo-19" width="300" height="225" class="alignnone size-medium wp-image-186" /></p>
<p>The result, after the one-click reflection filter is applied:<br />
<img src="http://blog.bojica.com/wp-content/uploads/2009/03/photo-19-gr-300x292.jpg" alt="photo-19-gr" title="photo-19-gr" width="300" height="292" class="alignnone size-medium wp-image-185" /></p>
<p>Easy, isn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2009/03/10/the-gimp-reflection-plugin-screencast/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails &#8211; Tools I Use</title>
		<link>http://blog.bojica.com/2009/01/06/ruby-on-rails-tools-i-use</link>
		<comments>http://blog.bojica.com/2009/01/06/ruby-on-rails-tools-i-use#comments</comments>
		<pubDate>Tue, 06 Jan 2009 10:41:36 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Science & Technology]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=152</guid>
		<description><![CDATA[Going with the hype, I am coding in Ruby on Rails and exclusively on a Mac. As a text editor I am using TextMate. It was love at first sight (although shared) &#8211; I know, we are talking about community here. But as many of us, I would like to see more often updates and at [...]]]></description>
			<content:encoded><![CDATA[<p>Going with the hype, I am coding in Ruby on Rails and exclusively on a <strong>Mac</strong>.</p>
<p>As a text editor I am using <strong>TextMate</strong>. It was love at first sight (although shared) &#8211; I know, we are talking about community here. But as many of us, I would like to see more often updates and at once that pending version 2. It is something there which says that a version increment will make us much more happy. I have a feeling it is loosing slowly its vibe. For instance: Peepcode is releasing a screencast episode about Emacs, and I am also seeing more and more blogs talking about switching to either Emacs (Carbon or Aqua) or to MacVim.</p>
<p><strong>CSSEdit 2</strong> is filling my coding gear and it helps a lot in cleaning my templates. I am a dirty hand coder in the way I am using quite often something like &lt;div style=&#8221; &#8230;. &#8220;&gt; directly into my code, pushing only at the end for what I need to a style sheet.</p>
<p>I discovered <strong>git</strong> once with Rails and since it became my right hand in versioning. I never believed it can be so easy, doesn&#8217;t matter if you are online or offline, you are alone or working along with a team. More, I agree it is more productive to have that infinite hexa number instead of 1, 2, etc as your file/project version number, because you just code, don&#8217;t tend to compare. And because I love luxury, I am using a micro account with <strong>github</strong>. Yes, I have my own secrets there, too <img src='http://blog.bojica.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Ticketing and organizing my staff &#8211; I am into a personal level with the <strong>lighthouse</strong>. And the <strong>Lighthouse Keeper </strong>is giving me enough support whilst offline.</p>
<p>What about you?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2009/01/06/ruby-on-rails-tools-i-use/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coding Aloud &#8211; Restricting your users to edit other&#8217;s profile</title>
		<link>http://blog.bojica.com/2009/01/06/coding-aloud-restricting-your-users-to-edit-others-profile</link>
		<comments>http://blog.bojica.com/2009/01/06/coding-aloud-restricting-your-users-to-edit-others-profile#comments</comments>
		<pubDate>Tue, 06 Jan 2009 08:00:16 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Science & Technology]]></category>
		<category><![CDATA[w2task]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=146</guid>
		<description><![CDATA[restful_authentication plugin made its way to my projects as the &#8220;de-facto&#8221; authentication system in my Ruby on Rails projects like w2task or gistate.com. I would not insist on how to install it, as it is well explained on its home page at github. What I want to show is that in particular instances we may [...]]]></description>
			<content:encoded><![CDATA[<p><strong>restful_authentication</strong> plugin made its way to my projects as the &#8220;de-facto&#8221; authentication system in my Ruby on Rails projects like <a title="w2task" href="http://w2task">w2task</a> or <a title="Golden Index Real Estate" href="http://www.gistate.com">gistate.com</a>. I would not insist on how to install it, as it is well explained on its <a href="http://github.com/technoweenie/restful-authentication/tree/master">home page at github</a>.</p>
<p>What I want to show is that in particular instances we may not like that one user can access and modify other user&#8217;s profile. For example if I try to edit my profile, the URL will end in something like <em>users/2/edit</em> and if I would change it to <em>users/1/edit</em> then I am able to modify this user &#8211; most often an undesirable fact.</p>
<p>Here is my workaround:</p>
<pre>app/controllers/users_controller.rb</pre>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  <span style="color:#008000; font-style:italic;"># ...</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> edit
    <span style="color:#9966CC; font-weight:bold;">if</span> params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:id</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> == <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">current_user</span>.<span style="color:#9900CC;">id</span>
      <span style="color:#0066ff; font-weight:bold;">@user</span> = User.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span>params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:id</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">else</span>
      flash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:error</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;Not allowed!&quot;</span>
      redirect_back_or_default<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#008000; font-style:italic;"># ...</span></pre></div></div>

<p>That&#8217;s pretty much everything I need to change.</p>
<p>What is your preferred solution? Are you doing these tests into a &#8211; perhaps &#8211;  <em>before_filter</em>?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2009/01/06/coding-aloud-restricting-your-users-to-edit-others-profile/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>w2task Challenge</title>
		<link>http://blog.bojica.com/2009/01/05/w2task-challenge</link>
		<comments>http://blog.bojica.com/2009/01/05/w2task-challenge#comments</comments>
		<pubDate>Mon, 05 Jan 2009 09:57:40 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Science & Technology]]></category>
		<category><![CDATA[w2task]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=139</guid>
		<description><![CDATA[I would like to introduce my latest project w2task - a web application written in Rails. It is a task and time management web based software. At this point, a registered user can create its own business (company) and define a series of projects. Then, the user can record its own efforts and attach them to a [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to introduce my latest project <em>w2task</em> - a web application written in Rails.</p>
<div>
<div class="mceTemp">
<dl id="attachment_140" class="wp-caption alignnone" style="width: 387px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-140" title="w2task_01" src="http://blog.bojica.com/wp-content/uploads/2009/01/w2task_01.png" alt="w2task challenge" width="377" height="169" /></dt>
</dl>
</div>
<p>It is a <em>task and time management web based software</em>. At this point, a registered user can create its own <em>business</em> (company) and define a series of <em>projects</em>. Then, the user can record its own <em>efforts</em> and attach them to a particular project. The sidebar (<em>Efforts Bar</em>) gives a quick statistic regarding the number of efforts and total timing. Also, by clicking on a particular project you may get the <em>timesheet</em> of the particular month.</p>
<p>You may well give it a try, here is the link: <a title="w2task" href="http://w2task.com" target="_self">http://w2task.com</a>. Don&#8217;t hesitate to tell me your opinion about it, right here as a reply to this post. You may me as harsh as you want, it is constructive and ultimately this blog is moderated <img src='http://blog.bojica.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>Be warned, this web app is still in its early, early development stages.</p>
<p>To better understand the philosophy behind this application, the strength and the weaknesses of the application, allow me to tell you in few points<strong> a bit of my history with Rails:</strong></p>
<ul>
<li><em>January 2008</em> &#8211; I&#8217;ve bought my first Rails book <em>Agile Web Development with Rails</em>, but I didn&#8217;t have enough time to practice it that Rails, turned 2.0 and broke the compatibility with 1.x versions. I remember the headaches regarding the scaffolding, so I abandoned my Rails path.</li>
<li><em>May 2008</em> &#8211; I&#8217;ve make up my mind and bought the third edition of the above book and start again with Rails at a low pace.</li>
<li><em>October 2008</em> &#8211; my friend Hossein asked me to join in a web project with a real estate portal. I thought it is the moment to put my knowledge into practice and this his how <a title="Golden Index Real Estate" href="http://gistate.com">gistate.com</a> got wind. Ok, the real estate market is down now (dec 2008 &#8211; jan 2009), but gistate.com shines <img src='http://blog.bojica.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  .</li>
<li><em>November 2008</em> - <em>Dubai Hacking Night</em> &#8211; where I meet again my heroes: the <a title="Spin Bits" href="http://www.spinbits.com">SpinBits</a> guys which encouraged me to learn Rails. I have shown to Rida a sketch of <em>w2task</em> (a scaffold and some CSS files) &#8211; a Ruby on Rails practicing project and he asked me to promise that I will present it on DemoCamp 4, which should be in mid January 2009.</li>
<li><em>December 2008</em> - I have closely followed 37signals blog and read their book - <em>Getting Real</em>. Truly inspiring, and I am thinking to copy their business model.</li>
<li>2009 &#8211; here we are.</li>
</ul>
</div>
<p>Wow, getting long with this post. However, for the future, I have a lot to say and I hope it will be of interest for my blog readers, as I will fly along the Rails.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2009/01/05/w2task-challenge/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DemoCamp Dubai (third edition)</title>
		<link>http://blog.bojica.com/2008/10/29/democamp-dubai-third-edition</link>
		<comments>http://blog.bojica.com/2008/10/29/democamp-dubai-third-edition#comments</comments>
		<pubDate>Wed, 29 Oct 2008 06:33:41 +0000</pubDate>
		<dc:creator>Silviu D. Bojica</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Science & Technology]]></category>
		<category><![CDATA[democamp]]></category>
		<category><![CDATA[dubai]]></category>

		<guid isPermaLink="false">http://blog.bojica.com/?p=124</guid>
		<description><![CDATA[The third edition of DemoCamp Dubai is now over. It was a beautiful evening, with four different presentations: Jawaker - online card games Twffaha - women recruitment portal Untiny - expand tiny urls industrials Directory - self explanatory title For more details, I will refer to DemoCamp Dubai website. And because we all like criticizing, please allow me adding the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="DemoCamp Dubai" src="http://blog.bojica.com/wp-content/uploads/2008/10/democampdubai.jpg" alt="" width="200" height="53" />The third edition of DemoCamp Dubai is now over. It was a beautiful evening, with four different presentations:</p>
<ol>
<li><a href="http://www.jawaker.com/">Jawaker</a> - online card games</li>
<li><a href="http://twffaha.com/">Twffaha</a> - women recruitment portal</li>
<li><a href="http://untiny.me/">Untiny</a> - expand tiny urls</li>
<li><a href="http://industrialsdirectory.com/">industrials Directory</a> - self explanatory title</li>
</ol>
<div>For more details, I will refer to DemoCamp Dubai <a title="DemoCamp Dubai" href="http://democampdubai.org/">website</a>.</div>
<div></div>
<div></div>
<div>And because we all like criticizing, please allow me adding the following comment. Rules, rules, rules &#8230; <em>Rule #2 of DemoCamp: No powerpoints allowed. Why no .ppt ? Well, do you have working software or don&#8217;t you?</em> But first three presentations used quite heavily the power of slides.</div>
<div></div>
<div></div>
<div>However, all in one&#8230; <em>great people, great projects</em>.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bojica.com/2008/10/29/democamp-dubai-third-edition/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
