<?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>fugaz</title>
	<atom:link href="http://www.fugaz.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fugaz.net</link>
	<description>stateless version</description>
	<lastBuildDate>Sun, 09 Jun 2013 14:16:51 +0000</lastBuildDate>
	<language>it-IT</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Lift properties improved</title>
		<link>http://www.fugaz.net/2013/06/09/lift-properties-improved/</link>
		<comments>http://www.fugaz.net/2013/06/09/lift-properties-improved/#comments</comments>
		<pubDate>Sun, 09 Jun 2013 14:16:51 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.fugaz.net/2013/06/09/lift-properties-improved/">fugaz</span></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cloudbees]]></category>
		<category><![CDATA[lift]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.fugaz.net/?p=997</guid>
		<description><![CDATA[Lift web framework uses a sophisticated file-based strategy for application properties, based on modes/hosts and file naming conventions. While very handy, this could be unpractical on a CI environment where typically one doesn&#8217;t want to mess with the filesystem (think CloudBees), and doesn&#8217;t want to store sensitive properties (such as user credentials) into SCM. The [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://liftweb.net">Lift web framework</a> uses a sophisticated file-based strategy for <a href="https://www.assembla.com/wiki/show/liftweb/Properties">application properties</a>, based on modes/hosts and file naming conventions. While very handy, this could be unpractical on a CI environment where typically one doesn&#8217;t want to mess with the filesystem (think CloudBees), and doesn&#8217;t want to store sensitive properties (such as user credentials) into SCM.</p>
<p>The problem is <a href="http://ejohn.org/blog/keeping-passwords-in-source-control">well known</a>, and a few strategies exists.<span id="more-997"></span></p>
<p>Cloudbees, for instance has a <a href="https://cloudbees.zendesk.com/entries/20803972-Setting-system-properties-for-applications">file system workaround</a> and supports various types of <a href="http://wiki.cloudbees.com/bin/view/RUN/Configuration+Parameters">parameters</a>.</p>
<p>For me, using system environment properties (one could use <a href="http://stackoverflow.com/questions/7054972/java-system-properties-and-environment-variables">environment properties</a> as well) is simple and straightforward, and keeps a reasonably high level of security. Sure, if you have a lot of them (maybe API keys) configuring the application container can be tedious, but IMO is worth the effort.</p>
<p>The following is a simple Property object which chains a system variable into a Box and defaults to standard lift Props. The logic here is that, if you set a system property, that should take precedence. Another discussion of the problem <a href="http://daily-scala.blogspot.fr/2010/02/chaining-options-with-orelse.html">here</a>.</p><pre class="crayon-plain-tag">package code
package config

import net.liftweb._
import common._
import util._
import Helpers._

object Property {

  /**
   * Chain system property and Lift property
   * @param name key for the property to get
   * @return the value of the property if defined
   */
  def get(name: String): Box[String] = sys.props.get(name) orElse Props.get(name)

  def getInt(name: String): Box[Int] = get(name).map(toInt)
  def getInt(name: String, defVal: Int): Int = getInt(name) openOr defVal
  def getLong(name: String): Box[Long] = get(name).flatMap(asLong)
  def getLong(name: String, defVal: Long): Long = getLong(name) openOr defVal
  def getBool(name: String): Box[Boolean] = get(name).map(toBoolean)
  def getBool(name: String, defVal: Boolean): Boolean = getBool(name) openOr defVal
  def get(name: String, defVal: String): String = get(name) openOr defVal

}</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fugaz.net/2013/06/09/lift-properties-improved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Should I run that semi marathon?</title>
		<link>http://www.fugaz.net/2013/03/10/should-i-run-that-semi-marathon/</link>
		<comments>http://www.fugaz.net/2013/03/10/should-i-run-that-semi-marathon/#comments</comments>
		<pubDate>Sat, 09 Mar 2013 23:05:15 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.fugaz.net/2013/03/10/should-i-run-that-semi-marathon/">fugaz</span></dc:creator>
				<category><![CDATA[Running]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[running]]></category>

		<guid isPermaLink="false">http://www.fugaz.net/?p=926</guid>
		<description><![CDATA[Say that you want to run a semi marathon but you&#8217;re not sure about how you will perform WRT the average runner. The Sémi Maraton of Paris, with &#62; 30k runners is quite a different story than the Sémi Marathon de Nogent with ~ 2000 runners. If you&#8217;re not fast, you will not be alone in [...]]]></description>
				<content:encoded><![CDATA[<p>Say that you want to run a semi marathon but you&#8217;re not sure about how you will perform WRT the average runner. The <a href="http://www.semideparis.com/2013/index.html" target="_blank">Sémi Maraton of Paris</a>, with &gt; 30k runners is quite a different story than the <a href="http://www.ville-nogentsurmarne.fr/sport/evenements/semi-marathon.html" target="_blank">Sémi Marathon de Nogent</a> with ~ 2000 runners. If you&#8217;re not fast, you will not be alone in the former, but you will be noticed in the latter.<span id="more-926"></span></p>
<p>Solution: download <a href="http://christianplat.perso.sfr.fr/semi94/semi.htm" target="_blank">last year&#8217;s results</a> and draw a histogram with R.</p><pre class="crayon-plain-tag">&gt; res &lt;- read.csv("Desktop/120325_semi_94.csv", header=TRUE, sep=";")
# convert time column to time
&gt; temps &lt;- strptime(res$Temps, format="%H:%M:%S")
# finally plot the histogram
&gt; hist(temps, "mins", freq=TRUE)</pre><p>Which gives this:</p>
<p><a href="http://www.fugaz.net/wp-content/uploads/2013/03/Rplot.png"><img class="size-medium wp-image-933 alignnone" alt="Rplot" src="http://www.fugaz.net/wp-content/uploads/2013/03/Rplot-300x300.png" width="300" height="300" /></a></p>
<p>Indeed, this seems a quite fast race, but look at that nice spike around 2:00 <img src='http://www.fugaz.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Download the <a href="http://www.fugaz.net/wp-content/uploads/2013/03/120325_semi_94.csv">CSV results file</a> or find more <a href="http://www.ville-nogentsurmarne.fr/sport/evenements/semi-marathon.html">about the race</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fugaz.net/2013/03/10/should-i-run-that-semi-marathon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter weekly digest for 2013-01-31</title>
		<link>http://www.fugaz.net/2013/01/31/twitter-weekly-digest-for-2013-01-31/</link>
		<comments>http://www.fugaz.net/2013/01/31/twitter-weekly-digest-for-2013-01-31/#comments</comments>
		<pubDate>Thu, 31 Jan 2013 10:30:00 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.fugaz.net/2013/01/31/twitter-weekly-digest-for-2013-01-31/">fugaz</span></dc:creator>
				<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.fugaz.net/2013/01/31/twitter-weekly-digest-for-2013-01-31/</guid>
		<description><![CDATA[&#039;Reaching Out,&#039; Vietnam, 1966 &#124; LIFE Behind the Picture: Larry Burrows’ ‘Reaching Out,’ 1966 &#124; http://t.co/NAaDqtvv http://t.co/LLJl6BZh -&#62; “@daveeday: How Google got good at design http://t.co/Hscy4woK” -&#62; L’austérité à la française: city sells prized wines &#8211; http://t.co/TuTR0Rh7 &#8211; Europe http://t.co/osdKDwXV #wine -&#62; This is your brain on behavioural economics http://t.co/HbV9b35U -&#62; Al Four Seasons, una [...]]]></description>
				<content:encoded><![CDATA[<ul class="ws_tweet_list">
<li class="ws_tweet">&#039;Reaching Out,&#039; Vietnam, 1966 | LIFE Behind the Picture: Larry Burrows’ ‘Reaching Out,’ 1966 | <a href="http://t.co/NAaDqtvv" rel="nofollow">http://t.co/NAaDqtvv</a> <a href="http://t.co/LLJl6BZh" rel="nofollow">http://t.co/LLJl6BZh</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/295533331712450560">-&gt;</a></li>
<li class="ws_tweet">“@daveeday: How Google got good at design <a href="http://t.co/Hscy4woK”" rel="nofollow">http://t.co/Hscy4woK”</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/295577221228269568">-&gt;</a></li>
<li class="ws_tweet">L’austérité à la française: city sells prized wines &#8211; <a href="http://t.co/TuTR0Rh7" rel="nofollow">http://t.co/TuTR0Rh7</a> &#8211; Europe <a href="http://t.co/osdKDwXV" rel="nofollow">http://t.co/osdKDwXV</a> <a href="http://search.twitter.com/search?q=%23wine">#wine</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/296197461175828480">-&gt;</a></li>
<li class="ws_tweet">This is your brain on behavioural economics <a href="http://t.co/HbV9b35U" rel="nofollow">http://t.co/HbV9b35U</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/296361232829657090">-&gt;</a></li>
<li class="ws_tweet">Al Four Seasons, una cena degustazione, lunedì 4 febbraio &#8211; News su ReedGourmet.it <a href="http://twitter.com/zioburp">@zioburp</a> <a href="http://t.co/Y99ESatN" rel="nofollow">http://t.co/Y99ESatN</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/296570401092419584">-&gt;</a></li>
<li class="ws_tweet">Internazionale » Opinioni » Né carne né pesce <a href="http://t.co/0dGjheXZ" rel="nofollow">http://t.co/0dGjheXZ</a> (via Instapaper) <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/297091148609097728">-&gt;</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.fugaz.net/2013/01/31/twitter-weekly-digest-for-2013-01-31/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter weekly digest for 2013-01-03</title>
		<link>http://www.fugaz.net/2013/01/04/twitter-weekly-digest-for-2013-01-03/</link>
		<comments>http://www.fugaz.net/2013/01/04/twitter-weekly-digest-for-2013-01-03/#comments</comments>
		<pubDate>Fri, 04 Jan 2013 10:30:00 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.fugaz.net/2013/01/04/twitter-weekly-digest-for-2013-01-03/">fugaz</span></dc:creator>
				<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.fugaz.net/2013/01/04/twitter-weekly-digest-for-2013-01-03/</guid>
		<description><![CDATA[Lighting up has its benefits, too &#8211; http://t.co/TuTR0Rh7 &#8211; Management http://t.co/6UuTY9Jr -&#62; Berlusconi: due cose che (forse) non sapete sul suo linguaggio &#8211; Treccani http://t.co/hKX1WxqW (via Instapaper) -&#62; Adam Green: The Spectacular Thefts of Apollo Robbins, Pickpocket : The New Yorker http://t.co/MgF4EQw9 via @NewYorker -&#62;]]></description>
				<content:encoded><![CDATA[<ul class="ws_tweet_list">
<li class="ws_tweet">Lighting up has its benefits, too &#8211; <a href="http://t.co/TuTR0Rh7" rel="nofollow">http://t.co/TuTR0Rh7</a> &#8211; Management <a href="http://t.co/6UuTY9Jr" rel="nofollow">http://t.co/6UuTY9Jr</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/286133286978338816">-&gt;</a></li>
<li class="ws_tweet">Berlusconi: due cose che (forse) non sapete sul suo linguaggio &#8211; Treccani <a href="http://t.co/hKX1WxqW" rel="nofollow">http://t.co/hKX1WxqW</a> (via Instapaper) <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/286226630286925824">-&gt;</a></li>
<li class="ws_tweet">Adam Green: The Spectacular Thefts of Apollo Robbins, Pickpocket : The New Yorker <a href="http://t.co/MgF4EQw9" rel="nofollow">http://t.co/MgF4EQw9</a> via <a href="http://twitter.com/NewYorker">@NewYorker</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/286715302941712384">-&gt;</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.fugaz.net/2013/01/04/twitter-weekly-digest-for-2013-01-03/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter weekly digest for 2012-11-15</title>
		<link>http://www.fugaz.net/2012/11/16/twitter-weekly-digest-for-2012-11-15/</link>
		<comments>http://www.fugaz.net/2012/11/16/twitter-weekly-digest-for-2012-11-15/#comments</comments>
		<pubDate>Fri, 16 Nov 2012 10:30:00 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.fugaz.net/2012/11/16/twitter-weekly-digest-for-2012-11-15/">fugaz</span></dc:creator>
				<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.fugaz.net/2012/11/16/twitter-weekly-digest-for-2012-11-15/</guid>
		<description><![CDATA[Twitter’s Shift from Ruby to Java Helps it Survive US Election http://t.co/RoeSHIOO -&#62; Columbia Ideas at Work : Feature : Untangling+Skill+and+Luck http://t.co/TYDbIiNy (via Instapaper) -&#62; @damienmangin http://t.co/maRfiEGK non plus #wft in reply to damienmangin -&#62;]]></description>
				<content:encoded><![CDATA[<ul class="ws_tweet_list">
<li class="ws_tweet">Twitter’s Shift from Ruby to Java Helps it Survive US Election <a href="http://t.co/RoeSHIOO" rel="nofollow">http://t.co/RoeSHIOO</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/268020931052597248">-&gt;</a></li>
<li class="ws_tweet">Columbia Ideas at Work : Feature : Untangling+Skill+and+Luck <a href="http://t.co/TYDbIiNy" rel="nofollow">http://t.co/TYDbIiNy</a> (via Instapaper) <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/268842033085566976">-&gt;</a></li>
<li class="ws_tweet"><a href="http://twitter.com/damienmangin">@damienmangin</a> <a href="http://t.co/maRfiEGK" rel="nofollow">http://t.co/maRfiEGK</a> non plus <a href="http://search.twitter.com/search?q=%23wft">#wft</a> <a href="http://twitter.com/damienmangin/statuses/269039468122628096">in reply to damienmangin</a> <a class="ws_tweet_time" href="http://twitter.com/fugazza/statuses/269040075638206464">-&gt;</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.fugaz.net/2012/11/16/twitter-weekly-digest-for-2012-11-15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
