<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Ruby, Scala and others.</description><title>teamon</title><generator>Tumblr (3.0; @teamon)</generator><link>http://tumblr.teamon.eu/</link><item><title>Kill sbt forked jvm</title><description>&lt;p&gt;Recently I&amp;#8217;ve been playing with &lt;a href="http://akka.io"&gt;akka&lt;/a&gt; under &lt;a href="https://github.com/harrah/xsbt/wiki"&gt;sbt&lt;/a&gt;. I often run sbt console and then use &lt;code&gt;run&lt;/code&gt; command to execute my app. It works great for single threaded applications that exits by itself. When using akka, there are couple of threads that do not quit. Hitting &lt;code&gt;ctrl+c&lt;/code&gt; quits running application AND unfortunately also sbt. I figured out, that it can be fixed with a little bit of hacking.&lt;/p&gt;
&lt;p&gt;First, set &lt;code&gt;fork in run := true&lt;/code&gt; is build.sbt. Then you can stop forked jam with the following shell line:&lt;/p&gt;
&lt;script src="https://gist.github.com/1782863.js?file=killsbt.sh"&gt;&lt;/script&gt;&lt;p&gt;I&amp;#8217;d suggest making it an alias or even better save as Shell Extension available via hotkey using awesome &lt;a href="http://www.alfredapp.com"&gt;alfred app&lt;/a&gt;.&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/17330935412</link><guid>http://tumblr.teamon.eu/post/17330935412</guid><pubDate>Thu, 09 Feb 2012 21:39:56 +0100</pubDate><category>scala</category><category>sbt</category><category>akka</category></item><item><title>Performance comparision of NeoDatis and PostgreSQL</title><description>&lt;p&gt;&lt;a href="http://f.cl.ly/items/0t063a060T0A3G3T3p0M/Neodatis_vs_PostgreSQL.pdf"&gt;Neodatis_vs_PostgreSQL.pdf&lt;/a&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/15459693229</link><guid>http://tumblr.teamon.eu/post/15459693229</guid><pubDate>Sat, 07 Jan 2012 19:04:00 +0100</pubDate></item><item><title>Hash extension - no more hash.try(:[], key)</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/1315728.js?file=hash.rb"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/11943252439</link><guid>http://tumblr.teamon.eu/post/11943252439</guid><pubDate>Wed, 26 Oct 2011 09:57:12 +0200</pubDate><category>ruby</category></item><item><title>pow + nginx configuration</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/1112295.js?file=guide.sh"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/8180751671</link><guid>http://tumblr.teamon.eu/post/8180751671</guid><pubDate>Thu, 28 Jul 2011 21:13:43 +0200</pubDate></item><item><title>Total git cleanup</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/1109946.js?file=gistfile1.sh"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/8134689761</link><guid>http://tumblr.teamon.eu/post/8134689761</guid><pubDate>Wed, 27 Jul 2011 19:40:48 +0200</pubDate></item><item><title>coffee-script compiler plugin for sbt (works with liftweb)</title><description>&lt;a href="https://github.com/rubbish/coffee-script-sbt-plugin"&gt;coffee-script compiler plugin for sbt (works with liftweb)&lt;/a&gt;</description><link>http://tumblr.teamon.eu/post/6008782126</link><guid>http://tumblr.teamon.eu/post/6008782126</guid><pubDate>Mon, 30 May 2011 21:04:00 +0200</pubDate><category>scala</category><category>liftweb</category><category>cofee script</category></item><item><title>Neodatis OdbConfiguration printout</title><description>&lt;p&gt;In case I might need this again&amp;#8230;&lt;br/&gt;&lt;script src="https://gist.github.com/955961.js?file=neodatis_conf.scala"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/5196810810</link><guid>http://tumblr.teamon.eu/post/5196810810</guid><pubDate>Wed, 04 May 2011 22:25:21 +0200</pubDate><category>scala</category><category>neodatis</category></item><item><title>Setting up Intel Cluster Compiler with XCode 4</title><description>&lt;p&gt;
I just spent an hour fighting with dump Intel license server (for trial version). I&amp;#8217;m to angry to write, so here is the solution.
&lt;/p&gt;

&lt;h3&gt;The easy part&lt;/h3&gt;
&lt;p&gt;Download Composer XE for Mac from Intel website, run .dmg, click .pkg, click, click, blah, select XCode integration, click, done.&lt;/p&gt;
&lt;p&gt;It will install everything under /opt/intel and &amp;#8230; under /Developer/ (no, symlinks, separate install - well, wtf?)&lt;/p&gt;
&lt;p&gt;To use icc from command line it is required to run&lt;/p&gt;
&lt;script src="https://gist.github.com/926046.js?file=gistfile1.sh"&gt;&lt;/script&gt;&lt;p&gt;first.&lt;/p&gt;
&lt;p&gt;If you use zsh, then you&amp;#8217;ll have to modify /opt/intel/bin/iccvars.sh file and change all &amp;#8220;==&amp;#8221; to &amp;#8220;=&amp;#8221; .&lt;/p&gt;
&lt;p&gt;Now icc should work from command line. Btw, better add this &amp;#8220;source &amp;#8230;&amp;#8221; line to you .bashrc/.zshrc or you&amp;#8217;ll end up typing that command on every new shell.&lt;/p&gt;

&lt;h3&gt;The &amp;#8220;how to make people frustrated&amp;#8221; part&lt;/h3&gt;
&lt;p&gt;Run XCode, choose new c++ project. In project setting select correct compiler:
&lt;img src="http://media.tumblr.com/tumblr_ljv6dpQcLN1qat4ul.png"/&gt;&lt;/p&gt;
&lt;p&gt;You can try to hit cmd+b and pray it will work. I&amp;#8217;m not that lucky.&lt;/p&gt;
&lt;p&gt;It doesn&amp;#8217;t work without executing this dump &amp;#8220;source&amp;#8221; line. I tried to setup build phases, pre-actions and&amp;#8230; nothing worked. So, here is the hacky way to make it work.&lt;/p&gt;
&lt;script src="https://gist.github.com/926046.js?file=gistfile2.sh"&gt;&lt;/script&gt;
then open new icc file in editor and put there:
&lt;script src="https://gist.github.com/926046.js?file=gistfile3.sh"&gt;&lt;/script&gt;&lt;p&gt;Do the same with icpc.&lt;/p&gt;
&lt;p&gt;Now license server shit will be loaded when xcode executes /Developer/usr/bin/icc&lt;/p&gt;
&lt;p&gt;But, that&amp;#8217;s not everything yet. /Developer/usr/lib is missing some libraries. Just copy what needed from /opt/intel/lib (I needed libimf.a, but it may vary).&lt;/p&gt;
&lt;p&gt;After all that hacks it *should* work&amp;#8230; &lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/4725618392</link><guid>http://tumblr.teamon.eu/post/4725618392</guid><pubDate>Mon, 18 Apr 2011 22:10:35 +0200</pubDate><category>intel</category><category>c++</category><category>xcode</category><category>mac</category></item><item><title>Rails: timeline_fu and workflow integration</title><description>&lt;p&gt;
Quick tip on how to integrate &lt;a href="http://github.com/jamesgolick/timeline_fu"&gt;timeline_fu&lt;/a&gt; and &lt;a href="http://github.com/geekq/workflow"&gt;workflow&lt;/a&gt; callbacks.
&lt;/p&gt;
&lt;script src="https://gist.github.com/925472.js?file=Model.rb"&gt;&lt;/script&gt;</description><link>http://tumblr.teamon.eu/post/4719074656</link><guid>http://tumblr.teamon.eu/post/4719074656</guid><pubDate>Mon, 18 Apr 2011 16:41:42 +0200</pubDate><category>ruby</category><category>rails</category></item><item><title>Simple scala benchmark utility</title><description>&lt;p&gt;Very, very simple. Strongly influenced by &lt;a href="http://www.ruby-doc.org/stdlib/libdoc/benchmark/rdoc/index.html"&gt;Ruby&amp;#8217;s Benchmark&lt;/a&gt;&lt;/p&gt;

&lt;script src="https://gist.github.com/861292.js?file=Benchmark.scala"&gt;&lt;/script&gt;&lt;h3&gt;Usage &amp;#8230;&lt;/h3&gt;

&lt;script src="https://gist.github.com/861292.js?file=App.scala"&gt;&lt;/script&gt;&lt;h3&gt;.. and the result&lt;/h3&gt;

&lt;script src="https://gist.github.com/861292.js?file=result.txt"&gt;&lt;/script&gt;</description><link>http://tumblr.teamon.eu/post/3730450038</link><guid>http://tumblr.teamon.eu/post/3730450038</guid><pubDate>Wed, 09 Mar 2011 00:02:48 +0100</pubDate><category>Scala</category></item><item><title>Scala specs cheatsheet</title><description>&lt;p&gt;Based on &lt;a href="http://code.google.com/p/specs/wiki/MatchersGuide"&gt;MatchersGuide&lt;/a&gt; &lt;/p&gt;

&lt;script src="https://gist.github.com/804347.js?file=specs.scala"&gt;&lt;/script&gt;</description><link>http://tumblr.teamon.eu/post/3032255905</link><guid>http://tumblr.teamon.eu/post/3032255905</guid><pubDate>Mon, 31 Jan 2011 17:52:00 +0100</pubDate><category>scala</category></item><item><title>rawler: Crawl your website and find broken links with Ruby</title><description>&lt;a href="http://github.com/oscardelben/rawler"&gt;rawler: Crawl your website and find broken links with Ruby&lt;/a&gt;: &lt;p&gt;&lt;a href="http://thechangelog.com/post/2833125978/rawler-crawl-your-website-and-find-broken-links-with-rub" class="tumblr_blog"&gt;thechangelog&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Need a quick-and-dirty way to find broken links on your web site? &lt;a href="http://github.com/oscardelben/rawler"&gt;Rawler&lt;/a&gt; from &lt;a href="https://github.com/oscardelben"&gt;Oscar Del Ben&lt;/a&gt; is a Ruby gem that gives you a command line tool to crawl your site, looking for errors.&lt;/p&gt;

&lt;p&gt;Install via Rubygems:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install rawler
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For usage, just execute the command &lt;code&gt;rawler --help&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;~ » rawler --help                                                                ~ 255 ↵ 
Rawler is a command line utility for parsing links on a website

Usage:
      rawler &lt;a href="http://example.com"&gt;&lt;a href="http://example.com"&gt;http://example.com&lt;/a&gt;&lt;/a&gt; [options]

where [options] are:
  --username, -u &lt;s&gt;:   HTT Basic Username
  --password, -p &lt;s&gt;:   HTT Basic Password
       --version, -v:   Print version and exit
          --help, -h:   Show this message
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Point Rawler to your URL and you’ll get a list of followed links and their HTTP status codes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;~ » rawler &lt;a href="http://thechangelog.com"&gt;&lt;a href="http://thechangelog.com"&gt;http://thechangelog.com&lt;/a&gt;&lt;/a&gt;                                               ~ 130 ↵ 
301 - &lt;a href="http://thechangelog.com/episodes"&gt;&lt;a href="http://thechangelog.com/episodes"&gt;http://thechangelog.com/episodes&lt;/a&gt;&lt;/a&gt;
200 - &lt;a href="http://thechangelog.com/archive"&gt;&lt;a href="http://thechangelog.com/archive"&gt;http://thechangelog.com/archive&lt;/a&gt;&lt;/a&gt;
200 - &lt;a href="http://thechangelog.com/"&gt;&lt;a href="http://thechangelog.com/"&gt;http://thechangelog.com/&lt;/a&gt;&lt;/a&gt;
200 - &lt;a href="https://chrome.google.com/extensions/detail/oiaejidbmkiecgbjeifoejpgmdaleoha"&gt;&lt;a href="https://chrome.google.com/extensions/detail/oiaejidbmkiecgbjeifoejpgmdaleoha"&gt;https://chrome.google.com/extensions/detail/oiaejidbmkiecgbjeifoejpgmdaleoha&lt;/a&gt;&lt;/a&gt;
301 - &lt;a href="http://github.com"&gt;&lt;a href="http://github.com"&gt;http://github.com&lt;/a&gt;&lt;/a&gt;
200 - &lt;a href="http://stylebot.me"&gt;&lt;a href="http://stylebot.me"&gt;http://stylebot.me&lt;/a&gt;&lt;/a&gt;
200 - &lt;a href="http://twitter.com/stylebot"&gt;&lt;a href="http://twitter.com/stylebot"&gt;http://twitter.com/stylebot&lt;/a&gt;&lt;/a&gt;
200 - &lt;a href="http://thechangelog.com/tagged/css"&gt;&lt;a href="http://thechangelog.com/tagged/css"&gt;http://thechangelog.com/tagged/css&lt;/a&gt;&lt;/a&gt;
200 - &lt;a href="https://github.com/handlino/CompassApp"&gt;&lt;a href="https://github.com/handlino/CompassApp"&gt;https://github.com/handlino/CompassApp&lt;/a&gt;&lt;/a&gt;

...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The roadmap includes:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Follow redirects, but still inform about them&lt;/li&gt;
&lt;li&gt;Respect robots.txt&lt;/li&gt;
&lt;li&gt;Export to html&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;If you want to help out, &lt;a href="http://github.com/oscardelben/rawler"&gt;fork the project&lt;/a&gt; and contribute.&lt;/p&gt;

&lt;p&gt;[&lt;a href="http://github.com/oscardelben/rawler"&gt;Source on GitHub&lt;/a&gt;]&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://tumblr.teamon.eu/post/2922790072</link><guid>http://tumblr.teamon.eu/post/2922790072</guid><pubDate>Tue, 25 Jan 2011 11:06:21 +0100</pubDate></item><item><title>akka singleton actor</title><description>&lt;p&gt;
If you ever want to do something like this:
&lt;/p&gt;
&lt;script src="https://gist.github.com/793885.js?file=akka.scala"&gt;&lt;/script&gt;&lt;p&gt;DON&amp;#8217;T! NEVER. Even in tests or something, doesn&amp;#8217;t matter, never!&lt;/p&gt;
&lt;p&gt;Using singleton actor object + scala-specs = silen fail with message &amp;#8220;null&amp;#8221; and one big WTF.&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/2912175315</link><guid>http://tumblr.teamon.eu/post/2912175315</guid><pubDate>Mon, 24 Jan 2011 21:27:00 +0100</pubDate><category>scala</category><category>akka</category></item><item><title>akka actors cheatsheet</title><description>&lt;p&gt;
Small cheatsheet for great &lt;a href="http://akka.io"&gt;akka&lt;/a&gt; library
&lt;/p&gt;

&lt;script src="https://gist.github.com/791459.js?file=akka-actors-cheatsheet.scala"&gt;&lt;/script&gt;</description><link>http://tumblr.teamon.eu/post/2878282149</link><guid>http://tumblr.teamon.eu/post/2878282149</guid><pubDate>Sat, 22 Jan 2011 21:49:30 +0100</pubDate><category>scala</category></item><item><title>Scala: Combine several Partial Functions into one </title><description>&lt;p&gt;&lt;script src="https://gist.github.com/790645.js?file=pf.scala"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/2863302230</link><guid>http://tumblr.teamon.eu/post/2863302230</guid><pubDate>Sat, 22 Jan 2011 00:35:54 +0100</pubDate><category>scala</category></item><item><title>Good old C-style for loop in scala</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/790423.js?file=cfor.scala"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/2861044632</link><guid>http://tumblr.teamon.eu/post/2861044632</guid><pubDate>Fri, 21 Jan 2011 22:03:21 +0100</pubDate><category>scala</category></item><item><title>Handle exceptions inside Actor</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/781984.js?file=Exceptions.scala"&gt;&lt;/script&gt;&lt;br/&gt;
and then&lt;br/&gt;&lt;script src="https://gist.github.com/781984.js?file=gistfile2.txt"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/2779765661</link><guid>http://tumblr.teamon.eu/post/2779765661</guid><pubDate>Sun, 16 Jan 2011 18:55:23 +0100</pubDate><category>scala</category></item><item><title>Decompile scala</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/781869.js?file=scala_jad"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/2777836699</link><guid>http://tumblr.teamon.eu/post/2777836699</guid><pubDate>Sun, 16 Jan 2011 16:12:16 +0100</pubDate><category>scala</category></item><item><title>Scala collections #collect</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/779869.js?file=collect.scala"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://tumblr.teamon.eu/post/2745905040</link><guid>http://tumblr.teamon.eu/post/2745905040</guid><pubDate>Fri, 14 Jan 2011 17:52:00 +0100</pubDate><category>Scala</category></item><item><title>Disk image converter</title><description>&lt;a href="http://www.crystalidea.com/anytoiso"&gt;Disk image converter&lt;/a&gt;</description><link>http://tumblr.teamon.eu/post/1715531307</link><guid>http://tumblr.teamon.eu/post/1715531307</guid><pubDate>Sun, 28 Nov 2010 17:43:30 +0100</pubDate></item></channel></rss>

