<?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>//DEVGURU</title>
	<atom:link href="http://devguru.pl/feed/" rel="self" type="application/rss+xml" />
	<link>http://devguru.pl</link>
	<description>web development</description>
	<lastBuildDate>Fri, 22 Jan 2010 21:34:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rails class diagrams</title>
		<link>http://devguru.pl/2010/01/22/rails-class-diagrams/</link>
		<comments>http://devguru.pl/2010/01/22/rails-class-diagrams/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 21:34:22 +0000</pubDate>
		<dc:creator>Paweł Smoczyk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=427</guid>
		<description><![CDATA[Sometimes it&#8217;s hard to remember model attributes and relationships between them. Especially when you are new to the project, diagrams can be very helpful. I came across Railroad gem when I was searching for the right tool. It can generate controller diagrams with inheritance hierarchy and model diagrams with attributes and associations. Output is in the DOT [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s hard to remember model attributes and relationships between them. Especially when you are new to the project, diagrams can be very helpful. I came across <a href="http://railroad.rubyforge.org/">Railroad</a> gem when I was searching for the right tool. It can generate controller diagrams with inheritance hierarchy and model diagrams with attributes and associations. Output is in the DOT language. Generated .dot files can by processed by <a href="http://www.graphviz.org/">Graphviz</a> into .svg or .png format. If you have <a href="http://www.omnigroup.com/applications/OmniGraffle/">Omnigraffle</a> you can import .dot files and edit them.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/596/programista-ruby-at-redefine-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista Ruby</span>, Mazowieckie, Redefine Sp. z o.o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/597/programista-php-at-implix-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Pomorskie, Implix Sp. z o.o. (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2010/01/22/rails-class-diagrams/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Truncate string preserving only full words (Ruby, RoR)</title>
		<link>http://devguru.pl/2009/12/15/truncate-string-preserving-only-full-words/</link>
		<comments>http://devguru.pl/2009/12/15/truncate-string-preserving-only-full-words/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 16:47:19 +0000</pubDate>
		<dc:creator>Michał Bielawski</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=406</guid>
		<description><![CDATA[Easy method to cut string to a defined length without leaving words cut in half.

class String
  def truncate_full_words limit = 64, completion = &#34;...&#34;
    self.length &#62; limit ? &#34;#{self[0..(self.rindex(&#039; &#039;, limit) &#124;&#124; limit)-1]}#{competion}&#34; : self
  end
  def truncate_full_words! limit = 64, completion = &#34;...&#34;
    self.replace(self.truncate_full_words limit, [...]]]></description>
			<content:encoded><![CDATA[<p>Easy method to cut string to a defined length without leaving words cut in half.</p>
<pre class="brush: ruby; ">
class String
  def truncate_full_words limit = 64, completion = &quot;...&quot;
    self.length &gt; limit ? &quot;#{self[0..(self.rindex(&#039; &#039;, limit) || limit)-1]}#{competion}&quot; : self
  end
  def truncate_full_words! limit = 64, completion = &quot;...&quot;
    self.replace(self.truncate_full_words limit, completion)
  end
end
</pre>
<p>Usage:</p>
<pre class="brush: ruby; ">
&gt;&gt; some_string = &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nec enim nibh.&quot;
=&gt; &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nec enim nibh.&quot;
&gt;&gt; some_string.truncate_full_words
=&gt; &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. ...&quot;
</pre>
<p>Have fun using it :)</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/591/java-software-engineer-at-infolet-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Java Software Engineer</span>, Mazowieckie, Infolet Sp. z o.o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/592/java-senior-software-developer-at-infolet-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Java Senior Software Developer</span>, Malopolskie, Infolet Sp. z o.o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/590/starszy-programista-cc-at-infolet-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Starszy Programista C/C++</span>, Wszedzie, Infolet Sp. z o.o. (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/12/15/truncate-string-preserving-only-full-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proudly presenting has_uniq_token.</title>
		<link>http://devguru.pl/2009/12/10/proudly-presenting-has_uniq_token/</link>
		<comments>http://devguru.pl/2009/12/10/proudly-presenting-has_uniq_token/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 22:33:58 +0000</pubDate>
		<dc:creator>Marcin Stecki</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=403</guid>
		<description><![CDATA[In one of our rails projects, we found that a lot of models needed some sort of unique token or guid generated before saving. Most of them were then used in routes or something similiar, but all of them were generated by callbacks in each model. Since that methods were mostly effect of copypasta, i [...]]]></description>
			<content:encoded><![CDATA[<p>In one of our rails projects, we found that a lot of models needed some sort of unique token or guid generated before saving. Most of them were then used in routes or something similiar, but all of them were generated by callbacks in each model. Since that methods were mostly effect of copypasta, i decided to abstract the code, and make a plugin of it.</p>
<p>A bit of meta programming later, i&#8217;m proud to present the results: <a href="http://github.com/netguru/has_uniq_token/">http://github.com/netguru/has_uniq_token/</a></p>
<p>Hope you find it useful.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/585/front-end-developer-at-arbointeractive/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Front-end Developer</span>, Lubelskie, ARBOinteractive (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/586/game-developer-at-gamelion-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Game Developer</span>, Wszedzie, Gamelion Sp. z o.o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/587/programista-www-webmaster-at-aster/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista WWW - Webmaster</span>, Mazowieckie, Aster (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/12/10/proudly-presenting-has_uniq_token/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to convert doc/xls/ppt/&#8230; to pdf in Unix console</title>
		<link>http://devguru.pl/2009/11/18/how-to-convert-docxlsppt-to-pdf-in-unix-console/</link>
		<comments>http://devguru.pl/2009/11/18/how-to-convert-docxlsppt-to-pdf-in-unix-console/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 12:08:28 +0000</pubDate>
		<dc:creator>Michał Bielawski</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=396</guid>
		<description><![CDATA[Today we needed to make a tool to convert Microsoft Office (and preferably other formats) documents to PDF from a Rails application. We have come up with such solution &#8211; install OpenOffice.org, CUPS and CUPS-PDF (virtual PDF printer for CUPS) and run it like this:
soffice -headless -pt Cups-PDF file.doc
This command executes OpenOffice.org in so-called &#8216;headless&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Today we needed to make a tool to convert Microsoft Office (and preferably other formats) documents to PDF from a Rails application. We have come up with such solution &#8211; install OpenOffice.org, CUPS and CUPS-PDF (virtual PDF printer for CUPS) and run it like this:</p>
<blockquote><p>soffice -headless -pt Cups-PDF file.doc</p></blockquote>
<p>This command executes OpenOffice.org in so-called &#8216;headless&#8217; mode &#8211; meaning that it will not run anything graphical. It reads the file.doc, and prints it using CUPS-PDF virtual printer. The resulting PDF can be found (by default) in ~/PDF directory.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/577/programista-cvb-at-astek/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista C#/VB</span>, Mazowieckie, Astek (inne)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/578/net-software-developer-at-nearshoring-solutions/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>.NET Software Developer</span>, Pomorskie, Nearshoring Solutions (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/580/programista-php-at-winfor-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Zachodniopomorskie, Winfor sp. z o.o. (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/11/18/how-to-convert-docxlsppt-to-pdf-in-unix-console/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Validating email in rails</title>
		<link>http://devguru.pl/2009/11/17/validating-email-in-rails/</link>
		<comments>http://devguru.pl/2009/11/17/validating-email-in-rails/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 11:55:18 +0000</pubDate>
		<dc:creator>Marcin Stecki</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=392</guid>
		<description><![CDATA[That&#8217;s pretty basic stuff but if you wonder how to validate email in rails check out this plugin:
http://github.com/dancroak/validates_email_format_of/
Good luck.
 
 Praca: oferty pracy WorkIT.plProgramista PHP, Zachodniopomorskie, Winfor sp. z o.o. (etat).NET Software Developer, Pomorskie, Nearshoring Solutions (etat)Programista PHP/SQL, Wszedzie, KASAT Sp. z o.o. (inne od 5000 do 8000 zl)Inne: css, php, programista, sql_uacct = 'UA-391107-15';urchinTracker();]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s pretty basic stuff but if you wonder how to validate email in rails check out this plugin:</p>
<p><a href="http://github.com/dancroak/validates_email_format_of">http://github.com/dancroak/validates_email_format_of</a>/</p>
<p>Good luck.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/580/programista-php-at-winfor-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Zachodniopomorskie, Winfor sp. z o.o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/578/net-software-developer-at-nearshoring-solutions/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>.NET Software Developer</span>, Pomorskie, Nearshoring Solutions (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/581/programista-phpsql-at-kasat-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP/SQL</span>, Wszedzie, KASAT Sp. z o.o. (inne od 5000 do 8000 zl)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/11/17/validating-email-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple trick to use sql dump in rails</title>
		<link>http://devguru.pl/2009/10/30/simple-trick-to-use-sql-dump-in-rails/</link>
		<comments>http://devguru.pl/2009/10/30/simple-trick-to-use-sql-dump-in-rails/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 15:09:09 +0000</pubDate>
		<dc:creator>Marcin Stecki</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=389</guid>
		<description><![CDATA[Fastest way to use sql dump when riding Ruby On Rails.

script/dbconsole < dumpname.sql


 
 Praca: oferty pracy WorkIT.plWeb developer, Slaskie, Click5 s.c. (etat)Inzynier oprogramowania, Mazowieckie, Astek (etat)Inzynier oprogramowania, Wielkopolskie, Astek (etat)Inne: css, php, programista, sql_uacct = 'UA-391107-15';urchinTracker();]]></description>
			<content:encoded><![CDATA[<p>Fastest way to use sql dump when riding Ruby On Rails.</p>
<pre>
script/dbconsole < dumpname.sql
</pre>
</pre>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/572/web-developer-at-click5-sc/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Web developer</span>, Slaskie, Click5 s.c. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/571/inzynier-oprogramowania-at-astek/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Inzynier oprogramowania</span>, Mazowieckie, Astek (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/570/inzynier-oprogramowania-at-astek/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Inzynier oprogramowania</span>, Wielkopolskie, Astek (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/10/30/simple-trick-to-use-sql-dump-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby and RoR &#8211; picking every n-th element of an array</title>
		<link>http://devguru.pl/2009/10/26/ruby-and-ror-picking-every-n-th-element-of-an-array/</link>
		<comments>http://devguru.pl/2009/10/26/ruby-and-ror-picking-every-n-th-element-of-an-array/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 11:43:27 +0000</pubDate>
		<dc:creator>Marcin Stecki</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=378</guid>
		<description><![CDATA[def every_nth(nr)
self.in_groups_of(nr).map(&#38;:first)
end
def every_nth!(nr)
self.replace(self.every_nth(nr))
end
Picking every n-th element of an array might look like this: (via @d3x)
Define:


class Array
  def every_nth(nr)
    self.in_groups_of(nr).map(&#38;:first)
  end
  def every_nth!(nr
    self.replace(self.every_nth(nr))
  end
end

and use: 


&#62;&#62; (1..9).to_a.every_nth(3)
=&#62; [1, 4, 7]

 
 Praca: oferty pracy WorkIT.plInzynier oprogramowania, Wielkopolskie, Astek (etat)Software Developer, Pomorskie, Compuware (etat)Tester oprogramowania, Slaskie, [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">def every_nth(nr)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">self.in_groups_of(nr).map(&amp;:first)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">end</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">def every_nth!(nr)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">self.replace(self.every_nth(nr))</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">end</div>
<div>Picking every n-th element of an array might look like this: (via <a href="http://flaker.pl/d3x">@d3x</a>)</div>
<p>Define:</p>
<pre class="brush: ruby; ">

class Array
  def every_nth(nr)
    self.in_groups_of(nr).map(&amp;:first)
  end
  def every_nth!(nr
    self.replace(self.every_nth(nr))
  end
end
</pre>
<p>and use: </p>
<pre class="brush: ruby; ">

&gt;&gt; (1..9).to_a.every_nth(3)
=&gt; [1, 4, 7]
</pre>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/570/inzynier-oprogramowania-at-astek/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Inzynier oprogramowania</span>, Wielkopolskie, Astek (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/567/software-developer-at-compuware/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Software Developer</span>, Pomorskie, Compuware (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/569/tester-oprogramowania-at-instalsoft/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Tester oprogramowania</span>, Slaskie, InstalSoft (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/developer'>developer</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/java'>java</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/tester'>tester</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/10/26/ruby-and-ror-picking-every-n-th-element-of-an-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turning off auto timestamping for testing in Rails</title>
		<link>http://devguru.pl/2009/05/09/turning-off-auto-timestamping-for-testing-in-rails/</link>
		<comments>http://devguru.pl/2009/05/09/turning-off-auto-timestamping-for-testing-in-rails/#comments</comments>
		<pubDate>Fri, 08 May 2009 22:41:07 +0000</pubDate>
		<dc:creator>Michał Szajbe</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=371</guid>
		<description><![CDATA[Suppose that you implemented a functionality that depends on values of created_at or updated_at fields of your models. How do you test it?
If you use fixtures that reside in test/fixture/*.yml files then there is no problem, because the values you set there for created_at and updated_at fields are saved to the database &#8216;as is&#8217;. So [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose that you implemented a functionality that depends on values of created_at or updated_at fields of your models. How do you test it?</p>
<p>If you use fixtures that reside in test/fixture/*.yml files then there is no problem, because the values you set there for created_at and updated_at fields are saved to the database &#8216;as is&#8217;. So you can easily have an article created one week ago:<br />
[sourcecode lang="yml"]article:<br />
  title: What a great day<br />
  created_at: < %= 1.week.ago.to_s(:db) %><br />
  updated_at: < %= 1.week.ago.to_s(:db) %><br />
[/sourcecode]</p>
<p>However, I don&#8217;t use fixtures files myself. I feel a bit dirty using them ;) I find fixture replacement tools far more maintainable. Namely, I love <a href="http://github.com/thoughtbot/factory_girl" title="Factory Girl">thoughtbot&#8217;s Factory Girl</a>. But here comes the problem. This won&#8217;t work as expected with Factory Girl:</p>
<pre class="brush: ruby; ">

Factory(:article, :created_at =&gt; 1.week.ago, :updated_at =&gt; 1.week.ago)
</pre>
<p>That&#8217;s because ActiveRecord&#8217;s automatic timestamping feature sets Time.now for created_at and updated_at fields overriding our values. At least that&#8217;s ActiveRecord&#8217;s default behavior. Fortunately it can be disabled with:</p>
<pre class="brush: ruby; ">

Article.record_timestamps = false
</pre>
<p>Chances are that after creating a model with a custom timestamp we&#8217;ll want to turn automatic timestamping back on. But turning it off and on in many places in your unit tests would be pretty cumbersome. Wouldn&#8217;t it be cool if you could achieve all of this with a snippet below?</p>
<pre lang="ruby">
without_timestamping_of Article do
  Factory(:article, :created_at => 1.week.ago, :updated_at => 1.week.ago)
end
</pre>
<p>It turns timestamping off, executes the block and turns timestamping back on. I find it clean and dry. Here&#8217;s the code to place in your test_helper.rb:</p>
<pre class="brush: ruby; ">

# test_helper.rb
class Test::Unit::TestCase # or class ActiveSupport::TestCase in Rails 2.3.x
  def without_timestamping_of(*klasses)
    if block_given?
      klasses.delete_if { |klass| !klass.record_timestamps }
      klasses.each { |klass| klass.record_timestamps = false }
      begin
        yield
      ensure
        klasses.each { |klass| klass.record_timestamps = true }
      end
    end
  end
end
</pre>
<p>Hope you like it. If so, share :)</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/403/inzynier-ds-produkcji-oprogramowania-c-linux-team-symbian-team-at-ontime-recruitment/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Inzynier ds. produkcji oprogramowania C++ Linux Team / Symbian Team</span>, Wszedzie, Ontime Recruitment (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/420/flash-designer-at-engine-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Flash designer</span>, Pomorskie, Engine Sp. z o.o.   (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/421/programista-aplikacji-internetowych-at-engine-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>programista aplikacji internetowych</span>, Pomorskie, Engine Sp. z o.o.   (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/05/09/turning-off-auto-timestamping-for-testing-in-rails/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dynamic cookie domains with Rack’s middleware</title>
		<link>http://devguru.pl/2009/04/17/dynamic-cookie-domains-with-rack%e2%80%99s-middleware/</link>
		<comments>http://devguru.pl/2009/04/17/dynamic-cookie-domains-with-rack%e2%80%99s-middleware/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 13:31:54 +0000</pubDate>
		<dc:creator>Michał Szajbe</dc:creator>
				<category><![CDATA[merb]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=365</guid>
		<description><![CDATA[Handling sessions in multi-domain environment is not the simplest things to do, because of the fact that cookies are scoped to a domain they were set by.
Recently we were developing an application with such an idea in mind:

Application will work as a base for other mini-applications (which we call sites)
Each site can be accessed via [...]]]></description>
			<content:encoded><![CDATA[<p>Handling sessions in multi-domain environment is not the simplest things to do, because of the fact that cookies are scoped to a domain they were set by.</p>
<p>Recently we were developing an application with such an idea in mind:</p>
<ul>
<li>Application will work as a base for other mini-applications (which we call sites)</li>
<li>Each site can be accessed via different url types: site.example.org and example.org/site</li>
<li>We want the users to remain logged in when switching from one url type to another</li>
</ul>
<p>I won&#8217;t be covering application structure, routing, etc. here, I will only write about maintaing the sessions is such an environment.</p>
<p>So this is pretty simple here &#8211; all that we needed to do was to set cookie domain to <strong>.example.org</strong> (note the &#8220;dot&#8221; at the beginning). This could be done via:</p>
<pre class="brush: ruby; ">
ActionController::Base.session = {
  :domain =&gt; &quot;.example.org&quot;
}
</pre>
<p>However there was an additional requirement that we need to deal with:</p>
<ul>
<li>Each site can be accessed via custom domain &#8211; site.com</li>
<li>Of course there&#8217;s no way here to keep the user logged in when he&#8217;s switching from site.com to example.org/site or site.example.org, at least it cannot be done with setting cookie domain to whatever value</li>
</ul>
<p>Technically, to access the site via site.com, that domain must point to our IP address. Then we need to detect that the site is being accessed via custom domain and set cookie domain respectively.</p>
<p>This could be done via some funky before_filters in an Application Controller, however we found much better and cleaner way.</p>
<p><strong>Rack&#8217;s middleware to the rescue</strong></p>
<p>Rack itself is a minimal interface between web server and your ruby framework. It&#8217;s used by Ruby on Rails (since 2.3) and Merb. The request comes from web server, goes through middleware layers and enters the application.</p>
<p>So we wrote a middleware layer that detects the host with which our application is accessed and sets cookie domain for the request. Here it is:</p>
<p><strong>app/middlewares/set_cookie_domain.rb</strong></p>
<pre class="brush: ruby; ">
class SetCookieDomain
  def initialize(app, default_domain)
    @app = app
    @default_domain = default_domain
  end

  def call(env)
    host = env[&quot;HTTP_HOST&quot;].split(&#039;:&#039;).first
    env[&quot;rack.session.options&quot;][:domain] = custom_domain?(host) ? &quot;.#{host}&quot; : &quot;#{@default_domain}&quot;
    @app.call(env)
  end

  def custom_domain?(host)
    domain = @default_domain.sub(/^\./, &#039;&#039;)
    host !~ Regexp.new(&quot;#{domain}$&quot;, Regexp::IGNORECASE)
  end
end
</pre>
<p>Now we need to turn it on:</p>
<p> <strong>environment.rb</strong></p>
<pre class="brush: ruby; ">
config.load_paths += %W( #{RAILS_ROOT}/app/middlewares )
</pre>
<p><strong>production.rb</strong></p>
<pre class="brush: ruby; ">
config.middleware.use &quot;SetCookieDomain&quot;, &quot;.example.org&quot;
</pre>
<p>.example.org is the default domain that will be used unless the application is accessed via custom domain (like site.com), we give it different values depending on environment (production/staging/development etc).</p>
<p>And since we&#8217;re fans of test driven development, here&#8217;s the test that ensures us that everything works as expected:</p>
<p><strong>tests/integration/set_cookie_domain_test.rb</strong></p>
<pre class="brush: ruby; ">
require &#039;test_helper&#039;

class SetCookieDomainTest &lt; ActionController::IntegrationTest

  context &quot;when accessing site at example.org&quot; do
    setup do
      host! &#039;example.org&#039;
      visit &#039;/&#039;
    end

    should &quot;set cookie_domain to .example.org&quot; do
      assert_equal &#039;.example.org&#039;, @integration_session.controller.request.session_options[:domain]
    end
  end

  context &quot;when accessing site at site.com&quot; do
    setup do
      host! &#039;site.com&#039;
      visit &#039;/&#039;
    end

    should &quot;set cookie_domain to .site.com&quot; do
      assert_equal &#039;.site.com&#039;, @integration_session.controller.request.session_options[:domain]
    end
  end

  context &quot;when accessing site at site.example.org&quot; do
    setup do
      host! &#039;site.example.org&#039;
      visit &#039;/&#039;
    end

    should &quot;set cookie_domain to .example.org&quot; do
      assert_equal &#039;.example.org&#039;, @integration_session.controller.request.session_options[:domain]
    end
  end

end
</pre>
<p>Test is sponsored by great <a title="Shoulda" href="http://thoughtbot.com/projects/shoulda/">Shoulda and <a title="Webrat" href="http://github.com/brynary/webrat/tree/master">Webrat</a> gems.</p>
<p>Feel free to comment and share.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/391/programista-php-at-ontime-recruitment/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Wielkopolskie, Ontime Recruitment (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/394/webdeveloper-at-ars-thanea/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>webdeveloper</span>, Mazowieckie, Ars Thanea   (inne)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/392/programista-action-script-at-blue-focus/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista Action Script</span>, Slaskie, Blue Focus (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/04/17/dynamic-cookie-domains-with-rack%e2%80%99s-middleware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Work environments of Rails developers #1: Ryan Daigle</title>
		<link>http://devguru.pl/2009/04/08/work-environments-of-rails-developers-1-ryan-daigle/</link>
		<comments>http://devguru.pl/2009/04/08/work-environments-of-rails-developers-1-ryan-daigle/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 14:44:04 +0000</pubDate>
		<dc:creator>Bartosz Pietrzak</dc:creator>
				<category><![CDATA[Interview]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Work environments of Rails developers]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=356</guid>
		<description><![CDATA[Taken from Ryan&#8217;s blog:
Ryan Daigle is an independant developer working as Y&#124;Factorial, LLC, a ruby and iPhone software consultancy.
He also writes Ryan&#8217;s Scraps, the &#8220;What&#8217;s new in edge rails&#8221; blog.
Bartosz Pietrzak: Which OS and which editor are you using?
Ryan Daigle: I&#8217;m on Mac OS X which means that I use Textmate  for most of my work.
Do you prefer [...]]]></description>
			<content:encoded><![CDATA[<p>Taken from Ryan&#8217;s blog:</p>
<blockquote><p>Ryan Daigle is an independant developer working as <a href="http://yfactorial.com/">Y|Factorial, <span class="caps">LLC</span></a>, a ruby and iPhone software consultancy.</p></blockquote>
<p>He also writes <a href="http://ryandaigle.com/">Ryan&#8217;s Scraps</a>, the &#8220;What&#8217;s new in edge rails&#8221; blog.</p>
<p><strong>Bartosz Pietrzak: Which OS and which editor are you using?<br />
</strong>Ryan Daigle: I&#8217;m on Mac OS X which means that I use Textmate  for most of my work.</p>
<p><strong>Do you prefer GIT or SVN?<br />
</strong>I prefer GIT, although I&#8217;m not a GIT master, but I do prefer it.</p>
<p><strong>Do you see any upsides or downsides of using GIT, comparing it to SVN?<br />
</strong>Well, certainly there are a lot of benefits, like easy branching, low cost branching and things of that nature. As far as downsides, I think it&#8217;s more complex tool, so it takes a little more effort to become very efficient at it, but that&#8217;s hardly a downside. It just means that it might require a little more effort to become good at using that tool.</p>
<p><strong>What plugins or gems do you usually generate your new apps with?<br />
</strong> Let&#8217;s see&#8230; I use HAML, make resourceful, rspec, cucumber, all those gems. Let me open up one of my projects right now. Will_paginate, HAML and  make resourceful &#8211; these are the core ones that I tend to at least start with.</p>
<p><strong>What&#8217;s your strategy for populating your database with some predefined data? Do you use migrations, fixtures, rake tasks with gems like populator?<br />
</strong> For staging data, for data that I just want to populate the database to play with the app I usually have a rake task that use something like factory girl or, there&#8217;s a plugin I highly recommend, called dataset, which is a fixture replacement, but it lets you load predefined set of data with one rake task. So I use that for staging data and if it&#8217;s setup data, configuration data for the application that needs to be present in production and staging, then I usually write a custom rake task, but the point being I keep it out of my migrations, because I don&#8217;t think that migrations are the place to do data population. Migrations are place to alter the structure of your database and occasionally, in the course of altering the structure of the database you do need to tweak or change something, but as for data population I keep it out of my migrations.</p>
<p><strong>What is your opinion on TDD?</strong><br />
My opinion is that it&#8217;s great and it&#8217;s certainly what I choose to use to start things off. There are many different tools that you can use in TDD but as far as general methodology is concerned I certainly am keen on it.</p>
<p><strong>You&#8217;ve mentioned Rspec. What do you think about Shoulda?<br />
</strong>I&#8217;ve obviously heard about Shoulda, Mocha and they seem to have good reputation, I&#8217;d just not had the least recognition needed to anything other than rspec, so I&#8217;m still using rspec and haven&#8217;t really looked into the others. Although recently I started doing Cucumber, Webrat and rSpec, it&#8217;s kinda my testing stack and I&#8217;ve enjoyed that process.</p>
<p><strong>How do you think Rails development process will change after 3.0 release?<br />
</strong>Oh, that&#8217;s a tough one! I mean, I&#8217;ve not seen much actual work come through on the Rails source on github so it&#8217;s hard to say if most of the changes will have limited  external effects and mostly just internal tweaks and refactorings, although I think one of the stated goals will be to make rails a little more componentized, a little more accessible without of monkey patching rails classes to overwrite functionality and add new functionality, I think they gonna try to give you more predefined points at which you can hook into their functionality, so I think for plugin writers and gem writes and engine writers I think the development process will be a lot cleaner and a lot more stable, as far as everyday developers I&#8217;m not quite sure yet how they&#8217;ll be impacted.</p>
<p><strong>What usually do you do with your team first, design of the applications or the you know, code and the functionality of the applications?<br />
</strong>When you say design, do you mean visual design?</p>
<p><strong>Yes.<br />
</strong>Ok, so usually when I start on a project I like to have at least wireframes in place so I like for my client to have at least thought about the functionality that their users will see, but I don&#8217;t necessarily want the visual design in place, I don&#8217;t need to see fonts, sizes and colors and pretty graphics, I just need to know how the client&#8217;s envisioning their functionality will be exposed to the user. And then when I start on, my preference is to have visual design kinda be done in parallel, or at least maybe week or two in front of development, I feel like if you treat visual design and development as two separate deliverables, then often in the end, when you try to bring those two sides together there&#8217;s a lot of work that goes into melding the two, so if you can treat it as one highly integrated process throughout your outcome will be much better. So, in the beginning I do like to see a visual representation of the functionality that needs to be developed, but I don&#8217;t need to see a visual design.</p>
<p><strong>Do you prefer the getting real way of creating the applications or huge specifications?<br />
</strong>Well, certainly I&#8217;m against huge specs of any kind, so I would have to come down on the side of getting real, I feel like not everybody has a luxury of such a freeform process as getting real, but certainly the main tense of that thought process I do support.</p>
<p><strong>These will be private ones, do you prefer working from home or from office?<br />
</strong>I think there are definitely benefits to an office, but I think if you are working with a group of people that you&#8217;re familiar with, and you know their work style, and you trust the work they do I think working from home can be more productive since you&#8217;re outside of the realm of those frequent interruptions that happen in office and really let you be quite productive, so I think for my productivity sake I enjoy working from home and occasionally it makes sense to get together to discuss something in person, but for the majority of the time I think working from home is beneficial.</p>
<p><strong>Do you prefer night time or day time and what about separating work from private life?<br />
</strong>I&#8217;m not a morning person but I start my day pretty early, because I like to have my work done somewhat early, so that I can have the late afternoon and evenings for myself, for personal time, so come 4:30 or 5 o&#8217;clock I usually, you know, I don&#8217;t turn off my computer but I put it away wherever I go, go running, go to the gym or do something like that and force myself to get out of the house and that&#8217;s serves as my formal break between work time and personal time. And then the weekend it&#8217;s the same thing, I don&#8217;t really feel compelled to go to my home office and start working on the weekends, it&#8217;s just structured that way, so I don&#8217;t really think about that. It doesn&#8217;t mean everything&#8217;s done during the week. Maybe I&#8217;ll just fire off some emails, but I don&#8217;t really get into core work mode during personal time.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/385/senior-developers-at-vivio/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Senior Developers</span>, Zachodniopomorskie, Vivio (etat od 5000 do 9000 zl)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/386/senior-designers-at-vivio/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Senior Designers</span>, Zachodniopomorskie, Vivio (etat od 5000 do 9000 zl)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/388/specjalista-w-dziale-it-at-labor-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Specjalista w dziale IT</span>, Mazowieckie, Labor Sp. z o.o. (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/04/08/work-environments-of-rails-developers-1-ryan-daigle/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Websecurity through conventions and best practices</title>
		<link>http://devguru.pl/2009/03/27/websecurity-through-conventions-and-best-practices/</link>
		<comments>http://devguru.pl/2009/03/27/websecurity-through-conventions-and-best-practices/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 15:08:22 +0000</pubDate>
		<dc:creator>Michał Szajbe</dc:creator>
				<category><![CDATA[presentations]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=353</guid>
		<description><![CDATA[Let me present you materials from a talk I gave at IT Underground Conference in Prague on 24.03.2009. The title of a presentation is &#8220;Websecurity through conventions and best practices&#8221; and it&#8217;s focused on securing web applications from the most common attacks with examples from Ruby on Rails web development framework.
The slides include all speaker&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Let me present you materials from a talk I gave at IT Underground Conference in Prague on 24.03.2009. The title of a presentation is &#8220;Websecurity through conventions and best practices&#8221; and it&#8217;s focused on securing web applications from the most common attacks with examples from Ruby on Rails web development framework.</p>
<p>The slides include all speaker&#8217;s notes.</p>
<div style="width:477px;text-align:left" id="__ss_1205949"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/szajbus/websecurity-through-conventions-and-best-practices?type=document" title="Websecurity through conventions and best practices">Websecurity through conventions and best practices</a><object style="margin:0px" width="477" height="510"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayerd.swf?doc=websec2-090326184603-phpapp01&#038;stripped_title=websecurity-through-conventions-and-best-practices" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayerd.swf?doc=websec2-090326184603-phpapp01&#038;stripped_title=websecurity-through-conventions-and-best-practices" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="477" height="510"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/szajbus">Michał Szajbe</a>.</div>
</div>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/384/webdeveloper-at-mediovski/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Webdeveloper</span>, Mazowieckie, Mediovski (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/379/programista-php-at-kolor/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Malopolskie, Kolor (pol etatu od 1000 do 6000 zl)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/380/programista-php-at-ideo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Podkarpackie, Ideo (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/03/27/websecurity-through-conventions-and-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful gems: Quick Scopes</title>
		<link>http://devguru.pl/2009/03/26/useful-gems-quick-scopes/</link>
		<comments>http://devguru.pl/2009/03/26/useful-gems-quick-scopes/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 10:22:51 +0000</pubDate>
		<dc:creator>Bartosz Pietrzak</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[useful gems]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=345</guid>
		<description><![CDATA[Some time ago I&#8217;ve found an useful gem &#8211; internuity&#8217;s quick scopes.
As readme for the plugin says,
A Rails plugin to automatically add some quick named_scopes to your models.
These are especially useful for quick modifications to a query on an association.
It creates default named_scopes for any of your models:


order
limit
offset
with &#8211; alias for :include
where &#8211; alias for :conditions


Personally [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I&#8217;ve found an useful gem &#8211; <a href="http://github.com/internuity">internuity</a>&#8217;s <a href="http://github.com/internuity/quick_scopes/tree/master">quick scopes</a>.</p>
<p>As readme for the plugin says,</p>
<blockquote><p>A Rails plugin to automatically add some quick named_scopes to your models.</p>
<p>These are especially useful for quick modifications to a query on an association.</p></blockquote>
<p>It creates default named_scopes for any of your models:</p>
<blockquote>
<ul>
<li><tt>order</tt></li>
<li><tt>limit</tt></li>
<li><tt>offset</tt></li>
<li><tt>with</tt> &#8211; alias for :include</li>
<li><tt>where</tt> &#8211; alias for :conditions</li>
</ul>
</blockquote>
<p>Personally I don&#8217;t like mixing named_scopes with :conditions and :order options &#8211; with this gem we can chain our scopes with limit, order etc:</p>
<pre>  user.posts.order('created_at')</pre>
<div><span style="font-family: 'Courier New'; font-size: small;"><span></p>
<pre>  user.posts.where(:published =&gt; true)</pre>
<p></span></span></div>
<p>Another small thing that makes our code cleaner.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/380/programista-php-at-ideo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Podkarpackie, Ideo (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/372/programista-php-at-blomedia-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Mazowieckie, Blomedia Sp. z o.o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/374/programista-javascript-ajax-at-etendard/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista JavaScript / Ajax</span>, Pomorskie, Etendard (inne)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/03/26/useful-gems-quick-scopes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Colors in GIT</title>
		<link>http://devguru.pl/2009/02/21/colors-in-git/</link>
		<comments>http://devguru.pl/2009/02/21/colors-in-git/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 17:54:58 +0000</pubDate>
		<dc:creator>Bartosz Pietrzak</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[handy tricks]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=340</guid>
		<description><![CDATA[This one will be short:
git config --global color.ui true
The command above will color your git output (branches, file status etc) green and red. Very, very handy.
 
 Praca: oferty pracy WorkIT.plProgramista WordPress, Mazowieckie, Blomedia Sp. z o.o. (etat)Grafik, Malopolskie, Blue Paprica (etat)magik C++ / .NET, Wszedzie, Othersource (freelance)Dodaj oferte pracyInne: mysql, php, programista, sql_uacct = [...]]]></description>
			<content:encoded><![CDATA[<p>This one will be short:</p>
<pre><code>git config --global color.ui true</code></pre>
<p>The command above will color your git output (branches, file status etc) green and red. Very, very handy.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/342/programista-wordpress-at-blomedia-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista WordPress</span>, Mazowieckie, Blomedia Sp. z o.o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/338/grafik-at-blue-paprica/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Grafik</span>, Malopolskie, Blue Paprica (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/334/magik-c-net-at-othersource/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>magik C++ / .NET</span>, Wszedzie, Othersource (freelance)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/02/21/colors-in-git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Ultimate Website Launch Checklist</title>
		<link>http://devguru.pl/2009/02/19/the-ultimate-website-launch-checklist/</link>
		<comments>http://devguru.pl/2009/02/19/the-ultimate-website-launch-checklist/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 14:09:17 +0000</pubDate>
		<dc:creator>Bartosz Pietrzak</dc:creator>
				<category><![CDATA[deployment]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[software engineering]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=334</guid>
		<description><![CDATA[Guys form Box UK released &#8220;a checklist that all websites should be checked against before launch&#8220;. It&#8217;s full of &#8220;oh, I know that!&#8221;, but I can imagine finding it very helpful when estimating project due dates and, of course, when launching the website/app &#8211; because you probably won&#8217;t remember some of them. Pretty cool.
 
 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-335" style="padding-right: 10px; padding-bottom: 10px;" title="websitelaunch" src="http://devguru.pl/wp-content/uploads/websitelaunch.png" alt="websitelaunch" width="300" height="152" />Guys form Box UK released &#8220;<a href="http://www.boxuk.com/blog/the-ultimate-website-launch-checklist">a checklist that all websites should be checked against before launch</a>&#8220;. It&#8217;s full of &#8220;oh, I know that!&#8221;, but I can imagine finding it very helpful when estimating project due dates and, of course, when launching the website/app &#8211; because you probably won&#8217;t remember some of them. Pretty cool.</p>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/328/programista-php-at-voxcommerce-group/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Mazowieckie, Voxcommerce Group (inne od 3000 do 5000 zl)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/332/junior-web-developer-at-etendard/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Junior Web Developer</span>, Pomorskie, Etendard (etat od 2000 do 2500 zl)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/339/programista-php-at-blue-paprica/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Malopolskie, Blue Paprica (inne)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/02/19/the-ultimate-website-launch-checklist/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails 2.2.2, Ajax and respond_to</title>
		<link>http://devguru.pl/2009/01/31/rails-222-ajax-and-respond_to/</link>
		<comments>http://devguru.pl/2009/01/31/rails-222-ajax-and-respond_to/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 22:10:51 +0000</pubDate>
		<dc:creator>Michał Szajbe</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=332</guid>
		<description><![CDATA[As I wrote some time ago in the article about Rails, Ajax and jQuery, sometimes there are problems with Rails not interpreting correctly content type headers of ajax requests. It&#8217;s because not all web browsers send that header in the same way. 
What I proposed was to sort the request.accepts array (array containing content type [...]]]></description>
			<content:encoded><![CDATA[<p>As I wrote some time ago in the article about <a title="Rails, Ajax and jQuery" href="http://codetunes.com/2008/12/08/rails-ajax-and-jquery/">Rails, Ajax and jQuery</a>, sometimes there are problems with Rails not interpreting correctly content type headers of ajax requests. It&#8217;s because not all web browsers send that header in the same way. </p>
<p>What I proposed was to sort the request.accepts array (array containing content type headers sent by browser) so that xml content type would be the first element. That would then trigger format.xml in our respond_to block.</p>
<p>However that approach does not work in Rails 2.2.2, because now the request.accepts array is frozen and it cannot be modified. I spent some time googling for the solution, but with no effect. So I dived into the API and Rails&#8217; source code and came up with pretty nice and simple solution to the problem.</p>
<pre class="brush: ruby; ">
class ApplicationController &lt; ActionController::Base
  before_filter :xhr_to_xml

  def xhr_to_xml
    request.format = :xml if request.xhr?
  end
end
</pre>
<p>This piece of code is an equivalent of the snippet I proposed in the article I referred to at the beginning. Now all ajax request will trigger format.xml in respond_to blocks.</pre>
 
<br/> Praca: <div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/319/webdesigner-at-eskypl-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Webdesigner</span>, Slaskie, eSKY.pl Sp. z o.o. (etat od 3000 do 4000 zl)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/322/programista-java-at-indreams-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista Java</span>, Mazowieckie, Indreams Sp. z o.o. (freelance)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/309/koordynator-it-at-eniro-polska/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Koordynator IT</span>, Mazowieckie, Eniro Polska (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/xhtml'>xhtml</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/01/31/rails-222-ajax-and-respond_to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authentication made easy: Authlogic</title>
		<link>http://devguru.pl/2009/01/28/authentication-made-easy-authlogic/</link>
		<comments>http://devguru.pl/2009/01/28/authentication-made-easy-authlogic/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 08:00:03 +0000</pubDate>
		<dc:creator>Bartosz Pietrzak</dc:creator>
				<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=319</guid>
		<description><![CDATA[Before Authlogic, here at Netguru we we&#8217;re using Restful Authentication to handle user authentication.
Because we think that Rails applications should be restful. And so should be the authentication systems. But restful auth had some downsides &#8211; it was generating so much code that our user model was too messy (Digitalism should change their lyrics to [...]]]></description>
			<content:encoded><![CDATA[<p>Before <a href="http://github.com/binarylogic/authlogic/tree/master">Authlogic</a>, here at <a href="http://github.com/binarylogic/authlogic/tree/master">Netguru</a> we we&#8217;re using <a href="http://github.com/technoweenie/restful-authentication/tree/master">Restful Authentication</a> to handle user authentication.</p>
<p>Because we think that Rails applications should be restful. And so should be the authentication systems. But restful auth had some downsides &#8211; it was generating so much code that our user model was too messy (<a href="http://pl.youtube.com/watch?v=IvFWdV8smYE">Digitalism</a> should change their lyrics to &#8220;so take a look at my User model, it&#8217;s such a mess!&#8221;). Then I started looking for some better way. Wiktor suggested that I should try authgasm, but! Authgasm has changed it&#8217;s name to <a href="http://github.com/binarylogic/authlogic/tree/master">Authlogic</a>.</p>
<p><strong>Idea</strong><br />
What&#8217;s so good about it? It&#8217;s just as DRY and clean as authentication plugin can be. All that we need to do is define &#8220;acts_as_authentic&#8221; in our user model, generate the UserSession model and create a restful UserSessions controller, where we need to create and save an UserSession. Just like any other ActiveRecord model.</p>
<p><strong>Features</strong><br />
Doesn&#8217;t sound nice enough? We can customize almost every aspect of it. We want to use email as user&#8217;s login? No problem, it&#8217;ll check uniqueness and even <em>validate_format_of</em>. We want to scope the uniqueness validation of login to certain account? No problem, just pass the <em>:scope =&gt; :account_id</em> to acts_as_authentic and then change UserSessions controller to use<em> @account.user_sessions</em>. We want to log such things as login count, last login ip or current login date? Just create &#8220;magic columns&#8221; named <em>login_count, last_login_ip, current_login_at</em>. Persistence tokens, single access tokens? It&#8217;s all there. It&#8217;s also framework agnostic and can easily support OpenID&#8230;</p>
<p>What next? I recommend you to check the <a href="http://github.com/binarylogic/authlogic/tree/master">readme</a> and <a href="http://github.com/binarylogic/authlogic_example/tree/master">example rails application with authlogic</a>. It&#8217;s worth giving a try.</p>
 
<br/> Praca: <br />
<b>Notice</b>:  Undefined index:  distinct_partner in <b>/u/apps/workit/production/releases/20090121184739/_includes/class.Api.php</b> on line <b>199</b><br />
<br />
<b>Notice</b>:  Undefined index:  distinct_partner in <b>/u/apps/workit/production/releases/20090121184739/_includes/class.Api.php</b> on line <b>199</b><br />
<br />
<b>Notice</b>:  Undefined index:  distinct_partner in <b>/u/apps/workit/production/releases/20090121184739/_includes/class.Api.php</b> on line <b>199</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /u/apps/workit/production/releases/20090121184739/_includes/class.Api.php:199) in <b>/u/apps/workit/production/releases/20090121184739/api/api.php</b> on line <b>76</b><br />
<div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/318/webmaster-at-eskypl-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Webmaster</span>, Slaskie, eSKY.pl Sp. z o.o. (etat od 3000 do 4000 zl)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/313/koder-xhtmlcss-at-nokaut-sp-z-oo-wwwnokautpl/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Koder XHTML/CSS</span>, Pomorskie, Nokaut Sp. z o.o. (www.nokaut.pl) (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/309/koordynator-it-at-eniro-polska/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Koordynator IT</span>, Mazowieckie, Eniro Polska (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/css'>css</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/xhtml'>xhtml</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/01/28/authentication-made-easy-authlogic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What stuff I found in Rails 2.2</title>
		<link>http://devguru.pl/2009/01/26/what-stuff-found-in-rails-22/</link>
		<comments>http://devguru.pl/2009/01/26/what-stuff-found-in-rails-22/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 18:03:38 +0000</pubDate>
		<dc:creator>Michał Szajbe</dc:creator>
				<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=315</guid>
		<description><![CDATA[When I started our first serious project in Rails the latest stable version was 2.1. Altrough I were still learning the framework, it quickly became obvious that some of it&#8217;s internals could have been implemented better. And in fact the next stable version, 2.2, which was released few months ago, was improved in many of [...]]]></description>
			<content:encoded><![CDATA[<div>When I started our first serious project in Rails the latest stable version was 2.1. Altrough I were still learning the framework, it quickly became obvious that some of it&#8217;s internals could have been implemented better. And in fact the next stable version, 2.2, which was released few months ago, was improved in many of the aspects I were thinking of.  Here are the new features I welcomed the most:</p>
<div>
<ul>
<li> Added :only and :except to map.resources to let people cut down on the number of redundant routes in an application. Typically only useful for huge routesets.</li>
</ul>
</div>
<p>You can find :only and :except in many places in the rails application and now, finally, in routes too. Usage:<br />
<script src="http://gist.github.com/52877.js"></script></p>
<ul>
<li>Fixed that polymorphic_url should compact given array.</li>
</ul>
</div>
<p>That will definitely dry up some code if you&#8217;re using polymorphic routes extensively.</p>
<div>
<ul>
<li> Routes may be restricted to lists of HTTP methods instead of a single method or :any.</li>
</ul>
</div>
<p>I could never really understand why I need to specify :any if I only want to allow POST and GET in my actions and not PUT or DELETE. Not more such problems after that fix. Usage:<br />
<script src="http://gist.github.com/52891.js"></script></p>
<div>
<ul>
<li> Add :as option to render a collection of partials with a custom local variable name.</li>
</ul>
</div>
<p>That is cool. No more setting :locals or variable renaming inside the parial. Usage:<br />
<script src="http://gist.github.com/52892.js"></script></p>
<div>
<ul>
<li> Added block-call style to link_to</li>
</ul>
</div>
<p>Nice alternative to one-line link_to&#8217;s. Helps to format HTML in links nicely. Usage:<br />
<script src="http://gist.github.com/52894.js"></script></p>
<div>
<ul>
<li> Merge scoped :joins together instead of overwriting them.</li>
</ul>
</div>
<p>This should be there much earlier. Now be careful, this may expose scoping bugs in your code when you&#8217;re migrating from earlier versions of Rails.</p>
<div>
<ul>
<li> before_save, before_validation and before_destroy callbacks that return false will now ROLLBACK the transaction. Previously this would have been committed before the processing was aborted.</li>
</ul>
</div>
<p>I never realized that integrity of my Rails 2.1 app database could be abused because of before_* callbacks breaking the action chain. Now I do and I am happy that I&#8217;m protected.</p>
<div>
<ul>
<li> Allow conditions on multiple tables to be specified using hash.</li>
</ul>
</div>
<p>That is something I was intuitively using when learning Rails which was resulting with errors as this feature had not been implemented at that time. Now it is, great.</p>
<div>
<ul>
<li>Wrapped Rails.env in StringInquirer so you can do Rails.env.development?</li>
</ul>
</div>
<p>Nice and pretty looking. No more messing with ENV array.</p>
<p>When I was preparing to making the switch to 2.2 I found out that Rails API documentation is missing lot of stuff. Fortunately that stuff can still be found in Rails changelogs and I recommend that you read them!</p>
 
<br/> Praca: <br />
<b>Notice</b>:  Undefined index:  distinct_partner in <b>/u/apps/workit/production/releases/20090121184739/_includes/class.Api.php</b> on line <b>199</b><br />
<br />
<b>Notice</b>:  Undefined index:  distinct_partner in <b>/u/apps/workit/production/releases/20090121184739/_includes/class.Api.php</b> on line <b>199</b><br />
<br />
<b>Notice</b>:  Undefined index:  distinct_partner in <b>/u/apps/workit/production/releases/20090121184739/_includes/class.Api.php</b> on line <b>199</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /u/apps/workit/production/releases/20090121184739/_includes/class.Api.php:199) in <b>/u/apps/workit/production/releases/20090121184739/api/api.php</b> on line <b>76</b><br />
<div id='workit2002widget' class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' rel='external' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/318/webmaster-at-eskypl-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Webmaster</span>, Slaskie, eSKY.pl Sp. z o.o. (etat od 3000 do 4000 zl)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/322/programista-java-at-indreams-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista Java</span>, Mazowieckie, Indreams Sp. z o.o. (freelance)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' rel='external' href='http://workit.pl/job/313/koder-xhtmlcss-at-nokaut-sp-z-oo-wwwnokautpl/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Koder XHTML/CSS</span>, Pomorskie, Nokaut Sp. z o.o. (www.nokaut.pl) (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' rel='external' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' rel='external' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div><script src='http://www.google-analytics.com/urchin.js' type='text/javascript'></script><script type='text/javascript'>_uacct = 'UA-391107-15';urchinTracker();</script><script type='text/javascript' src='http://workit.pl/js/api.js'></script>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/01/26/what-stuff-found-in-rails-22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Air, Mac OS X and bus error</title>
		<link>http://devguru.pl/2009/01/18/adobe-air-mac-os-x-and-bus-error/</link>
		<comments>http://devguru.pl/2009/01/18/adobe-air-mac-os-x-and-bus-error/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 15:29:51 +0000</pubDate>
		<dc:creator>Bartosz Pietrzak</dc:creator>
				<category><![CDATA[Air]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=310</guid>
		<description><![CDATA[The problem
I couldn&#8217;t start any Adobe AIR application on my MacBook. Any. They were working before, but after some time of not having touched any of them &#8211; they stopped working. I sent some reports to Apple, but I bet that they don&#8217;t give a damn about it.
The solution
&#8230;was quite simple, but hard to find. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The problem</strong></p>
<p>I couldn&#8217;t start any Adobe AIR application on my MacBook. Any. They were working before, but after some time of not having touched any of them &#8211; they stopped working. I sent some reports to Apple, but I bet that they don&#8217;t give a damn about it.</p>
<p><strong>The solution</strong></p>
<p>&#8230;was quite simple, but hard to find. I thought that it would be nice to have some output using adl command (from AIR sdk). Every app outputted following error:</p>
<pre>2009-01-18 16:15:01.250 adl[6206:10b] *** +[WebFontCache fontWithFamily:traits:weight:size:]: unrecognized selector sent to class 0xa01b2480
2009-01-18 16:15:01.252 adl[6206:10b] *** NSTimer ignoring exception '*** +[WebFontCache fontWithFamily:traits:weight:size:]: unrecognized selector sent to class 0xa01b2480' that raised during firing of timer with target 0x149d90 and selector '_playerTimerAction:'
Bus error</pre>
<p>And crash!</p>
<p>After hours of searching the web I came to <a href="http://store1.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=75&amp;catid=697&amp;threadid=1406385">this solution</a>, but it wasn&#8217;t working for me. They say that you should remove the Safari Block plugin&#8230; In my case, I don&#8217;t know if it was caused by Safari Block, because Cooliris plugin was the AIR-harmer (and I&#8217;m NOT saying about any bio-related gases, you naughties!).</p>
<p>So I started with removing the Safari Block plugin</p>
<pre>Library$ cd InputManagers/
InputManagers$ ls
Cooliris		Glims			SafariBlock		Smart Crash Reports
InputManagers$ sudo rm -rf SafariBlock/</pre>
<p>But, as I said, it haven&#8217;t fixed anything&#8230; So I&#8217;ve removed the Cooliris plugin:</p>
<pre>~$ cd /Library/InputManagers/
InputManagers$ ls
Cooliris		Glims			Smart Crash Reports
InputManagers$ sudo rm -rf Cooliris/</pre>
<p>And voilla! They work fine.</p>
<p>Yeah, the cost of having working AIR runtime is watching internet ads.</p>
 
<br/> Praca: <div class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' target='_blank'' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/311/programista-java-at-rrcompany/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista Java</span>, Mazowieckie, R.R.Company (freelance)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/307/web-developer-at-ipo-sp-z-o-o/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Web Developer</span>, Dolnoslaskie, IPO Sp. z o. o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/309/koordynator-it-at-eniro-polska/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Koordynator IT</span>, Mazowieckie, Eniro Polska (etat)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' target='_blank'' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/01/18/adobe-air-mac-os-x-and-bus-error/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Rails and IE false image upload headers.</title>
		<link>http://devguru.pl/2009/01/14/ie-false-image-upload-headers/</link>
		<comments>http://devguru.pl/2009/01/14/ie-false-image-upload-headers/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 12:46:12 +0000</pubDate>
		<dc:creator>Marcin Stecki</dc:creator>
				<category><![CDATA[debugging]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=304</guid>
		<description><![CDATA[Some time ago, when I was young and unexperienced (ok, it was an hour ago&#8230;), I&#8217;ve found out that my image upload form is not working on IE. No errors, but no image either.
Here is what i came to  after an hour of debug:
the model has following validation rule:
validates_attachment_content_type :content, :content_type =&#62; ['image/jpeg', 'image/png', 'image/gif']
but [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago, when I was young and unexperienced (ok, it was an hour ago&#8230;), I&#8217;ve found out that my image upload form is not working on IE. No errors, but no image either.</p>
<p>Here is what i came to  after an hour of debug:</p>
<p>the model has following validation rule:</p>
<p>validates_attachment_content_type :content, :content_type =&gt; ['image/jpeg', 'image/png', 'image/gif']</p>
<p>but IE sends false image header (god knows why?) so you need to add:</p>
<p>&#8216;image/pjpeg&#8217;, &#8216;image/x-png&#8217;</p>
<p>to get it going again.</p>
<p>Works like a charm.</p>
 
<br/> Praca: <div class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' target='_blank'' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/300/webmaster-webdesigner-at-comarch/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Webmaster - webdesigner</span>, Malopolskie, Comarch (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/302/programista-python-at-weblink-software-sp-z-oo/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista Python</span>, Slaskie, Weblink Software sp. z o.o. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/299/kierownik-zespolu-wsparcia-aplikacji-at-klient-hays-poland/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Kierownik Zespolu Wsparcia Aplikacji</span>, Lodzkie, Klient HAYS Poland (etat od 6000 do 8000 zl)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' target='_blank'' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/01/14/ie-false-image-upload-headers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Managing hosts on OS X with Ghost Gem</title>
		<link>http://devguru.pl/2009/01/13/managing-hosts-on-os-x-with-ghost-gem/</link>
		<comments>http://devguru.pl/2009/01/13/managing-hosts-on-os-x-with-ghost-gem/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 09:33:59 +0000</pubDate>
		<dc:creator>Bartosz Pietrzak</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://devguru.pl/?p=296</guid>
		<description><![CDATA[Managing local hosts on OS X was pretty easy back before 10.5 with Network Utility, but since Leopard it&#8217;s not so nice &#8211; we can edit manually /etc/hosts file or play with few not-so-user-friendly terminal commands.
If we want to manage local hosts painlessly, we can use a ghost gem (found via Robby on Rails).
After launching

we [...]]]></description>
			<content:encoded><![CDATA[<p>Managing local hosts on OS X was pretty easy back before 10.5 with Network Utility, but since Leopard it&#8217;s not so nice &#8211; we can edit manually /etc/hosts file or play with few not-so-user-friendly terminal commands.</p>
<p>If we want to manage local hosts painlessly, we can use a <a href="http://github.com/bjeanes/ghost/tree/master">ghost gem</a> (found via <a href="http://www.robbyonrails.com/articles/2009/01/12/get-to-know-a-gem-ghost">Robby on Rails</a>).<br />
After launching<br />
<script src="http://gist.github.com/46382.js"></script><br />
we can use ghost commands:<br />
<script src="http://gist.github.com/46383.js"></script><br />
Works for me. </p>
 
<br/> Praca: <div class='workit2002widget' style='padding:0px!important;border: 1px solid!important;border-color:#bbbbbb!important;background-color:#ffffff!important;width:450px!important;text-decoration:none!important;' ><ul style="text-indent:0px!important;padding:0px 7px!important; margin-top:0px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:2px;line-height:9px!important;margin-top:0px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important'><a style='border:0px; font-family: Arial!important;text-decoration:none;color:inherit;' target='_blank'' href='http://workit.pl/api_post/10O574746269'>oferty pracy WorkIT.pl</a></span></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/304/web-developer-programista-webowy-at-smartmedia/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Web Developer - Programista webowy</span>, Pomorskie, Smartmedia (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/305/programista-php-at-inwestycje-alternatywne-profit-sa/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Programista PHP</span>, Mazowieckie, Inwestycje Alternatywne Profit S.A. (etat)</a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:15px!important;margin-top:0px!important;'><a style='border:0px; text-decoration:none;font-weight:normal!important;color:#777777!important;font-family:Arial!important;;font-size:12px!important;' target='_blank' href='http://workit.pl/job/299/kierownik-zespolu-wsparcia-aplikacji-at-klient-hays-poland/10O574746269'><span style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;font-size:12px!important;'>Kierownik Zespolu Wsparcia Aplikacji</span>, Lodzkie, Klient HAYS Poland (etat od 6000 do 8000 zl)</a></li></ul><ul style="text-indent:0px!important;padding:0px 7px!important; list-style:none!important;margin-bottom:0px!important;margin-top:5px!important;margin:0px!important;"><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:0px;line-height:9px!important;margin-top:7px!important;'><a style='text-decoration:none;font-weight:bold!important;color:#2676c9!important;font-family: Arial!important;text-decoration:none!important;;border:0px;font-size:13px!important;' target='_blank'' href='http://workit.pl/api_post/10O574746269'><strong>Dodaj oferte pracy</strong></a></li><li style='padding-left:0px!important; padding-right:0px!important; padding-top:3px!important; margin-left:0px!important; margin-right:0px!important; margin-bottom:0px!important; list-style-type:none!important; text-indent:0px!important; font-family:Arial!important;padding-bottom:4px;line-height:9px!important;margin:0px!important;margin-top:2px!important;'><span style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;'>Inne: </span><a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/mysql'>mysql</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/php'>php</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/programista'>programista</a>, <a style='font-weight:normal!important;text-decoration:none;color:#777777!important;font-family: Arial!important;text-decoration:none!important;font-size:9px;!important;border:0px; ' target='_blank' href='http://workit.pl/api_post/10O574746269/sql'>sql</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://devguru.pl/2009/01/13/managing-hosts-on-os-x-with-ghost-gem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
