<?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>I’m CS student who loves to hack and play with open source code (especially Ruby and Python)
Me on the web
@ropikuLinkedInGitHubStackoverflow CVGoogle Reader
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-78928-10']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
  })();
</description><title>Mihai Anca</title><generator>Tumblr (3.0; @ropiku)</generator><link>http://mihaia.com/</link><item><title>FreeAgent hackfest: App-wide Search</title><description>&lt;p&gt;At &lt;a href="http://www.freeagent.com/"&gt;FreeAgent&lt;/a&gt; we had our first hackfest a short while ago and I got off and played with ElasticSearch to build an app-wide search.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s my short review from the &lt;a href="http://engineering.freeagent.com/2012/01/23/hack-week-round-up/"&gt;Hack week round up&lt;/a&gt; post on the &lt;a href="http://engineering.freeagent.com/"&gt;FreeAgent Engineering blog&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;
As we are about to move to &lt;a href="http://www.elasticsearch.org"&gt;Elasticsearch&lt;/a&gt; for indexing our logs, my Hack Week idea was to experiment with building an app-wide search function. It is just a prototype but it enables users to search across Contacts, Projects and Expenses and can easily be extended. Elasticsearch is accessed from Rails using the &lt;a href="https://github.com/karmi/tire"&gt;Tire gem&lt;/a&gt;. Instead of using Tire’s &lt;code&gt;after_save&lt;/code&gt; callback to keep the index up to date, Elasticsearch has the concept of &lt;a href="http://www.elasticsearch.org/guide/reference/river/"&gt;rivers&lt;/a&gt; which pulls new data. Every update triggers an AMQP message using &lt;a href="https://github.com/ruby-amqp/bunny"&gt;Bunny&lt;/a&gt; which is then picked up by &lt;a href="https://github.com/elasticsearch/elasticsearch-river-rabbitmq/blob/master/README.md"&gt;Elasticsearch RabbitMQ river&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It was an exciting idea and I really enjoyed the hack week and had the opportunity of experimenting with new pieces of infrastructure which we hope to use soon.&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://mihaia.com/post/19134324249</link><guid>http://mihaia.com/post/19134324249</guid><pubDate>Sun, 11 Mar 2012 19:43:11 +0000</pubDate></item><item><title>Selling my MBP</title><description>&lt;p&gt;&lt;b&gt;Update: Sold&amp;#160;!&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;

I have befriended my trusty MacBook Pro for a lighter Air and I&amp;#8217;m now selling it. It was my main computer for a year and a half and enabled me to make a living out of it. &lt;br/&gt;&lt;br/&gt;
It&amp;#8217;s a 2010&amp;#160;15&amp;#8221; &lt;a href="http://en.wikipedia.org/wiki/Macbook_pro#Technical_specifications_2"&gt;MacBookPro&lt;/a&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;2.4GHz Core i5&lt;/li&gt;
&lt;li&gt;4GB RAM (upgradable to 8GB)&lt;/li&gt;
&lt;li&gt;GeForce GT 330M 256MB (StarCraft 2 works fine ;) )&lt;/li&gt;
&lt;li&gt;320&amp;#160;GB HDD&lt;/li&gt;
&lt;li&gt;15.4 inch LED-backlit glossy widescreen display, 1440-by-900 resolution&lt;/li&gt;
&lt;li&gt;AppleCare expiring 14 April 2013&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://f.cl.ly/items/0O3G0q0c0T2A2p0J0K3w/mbp.png"/&gt;&lt;img src="http://media.tumblr.com/tumblr_ltkkm3sjYp1qzrx94.jpg"/&gt;&lt;br/&gt;
One of it&amp;#8217;s legs has fallen and it has some scratches on the bottom case (which you might get it replaced by Apple). Other than that it&amp;#8217;s in good condition.
&lt;br/&gt;&lt;br/&gt;&lt;strike&gt;I don&amp;#8217;t want to stick too much with it so I think &lt;strong&gt;£750&lt;/strong&gt; would be a good price for it.&lt;/strike&gt;&lt;br/&gt;&lt;br/&gt;
If you are interested please drop me a line at &lt;a href="mailto:mihai@mihaia.com"&gt;mihai@mihaia.com&lt;/a&gt;. Please also share this with anyone you know might be interested.</description><link>http://mihaia.com/post/11862201982</link><guid>http://mihaia.com/post/11862201982</guid><pubDate>Mon, 24 Oct 2011 13:31:00 +0100</pubDate></item><item><title>PivotPad, an iPad client for Pivotal Tracker, won Best New...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lbl9m434ex1qzr7j1o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;PivotPad, an iPad client for Pivotal Tracker, won Best New Skills at &lt;a href="http://leedshack.com/"&gt;Leeds Hack&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Had a blast with &lt;a href="http://twitter.com/mathie"&gt;@mathie&lt;/a&gt; and &lt;a href="http://twitter.com/_rahim"&gt;@_rahim&lt;/a&gt;, photos will follow on Flickr.&lt;/p&gt;</description><link>http://mihaia.com/post/1519390117</link><guid>http://mihaia.com/post/1519390117</guid><pubDate>Mon, 08 Nov 2010 23:08:00 +0000</pubDate></item><item><title>Summer in Edinburgh</title><description>&lt;p&gt;&lt;img src="http://farm5.static.flickr.com/4148/4980103974_27a2366e3c.jpg" width="500" height="374" alt="Arthur's Seat"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://farm5.static.flickr.com/4112/4957088772_b8c7928f60.jpg" width="500" height="374" alt="Princess Street Gardens on a sunday"/&gt;&lt;/p&gt;</description><link>http://mihaia.com/post/1337767426</link><guid>http://mihaia.com/post/1337767426</guid><pubDate>Sun, 17 Oct 2010 19:55:59 +0100</pubDate><category>pictures</category><category>scotland</category></item><item><title>Garana Jazz Festival</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_l67tesyqWC1qzr7j1o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Garana Jazz Festival&lt;/p&gt;</description><link>http://mihaia.com/post/865788994</link><guid>http://mihaia.com/post/865788994</guid><pubDate>Tue, 27 Jul 2010 13:00:40 +0100</pubDate></item><item><title>London photo stories</title><description>&lt;a href="http://www.pictorymag.com/showcases/london/"&gt;London photo stories&lt;/a&gt;: &lt;p&gt;&lt;a href="http://www.pictorymag.com/showcases/london/"&gt;&lt;img src="http://static.mypictory.com/static/assets/img/showcases/london/london_header.jpg"/&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://mihaia.com/post/666980683</link><guid>http://mihaia.com/post/666980683</guid><pubDate>Sat, 05 Jun 2010 18:19:02 +0100</pubDate></item><item><title>Edinburgh, where I’ll spend my summer working at a cool...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_l3d4rySCaJ1qzr7j1o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Edinburgh, where I’ll spend my summer working at a cool startup.&lt;/p&gt;</description><link>http://mihaia.com/post/654952732</link><guid>http://mihaia.com/post/654952732</guid><pubDate>Wed, 02 Jun 2010 02:14:22 +0100</pubDate></item><item><title>Learn you some erlang</title><description>&lt;a href="http://learnyousomeerlang.com/"&gt;Learn you some erlang&lt;/a&gt;: &lt;p&gt;… for great good! &lt;/p&gt;

&lt;p&gt;I’ve long been wanted to learn Erlang and I found a very good guide (isn’t as thorough but for an Erlang-noob it looks perfect).&lt;/p&gt;

&lt;p&gt;The syntax is kind of strange but the most difficult part is thinking in a functional way. Hopefully I am going to write some toy projects in Erlang and get accustomed with it.&lt;/p&gt;

&lt;p&gt;Another article I’ve been reading is a &lt;a href="http://lethain.com/entry/2009/nov/30/hands-on-review-of-the-dynamo-paper/"&gt;hands on review of Dynamo&lt;/a&gt; by implementing a key-value store in Erlang. It’s not a tutorial but the first article is simple enough to learn how to write Erlang modules.&lt;/p&gt;

&lt;p&gt;If you have any suggestions for projects or other documentation please leave a comment.&lt;/p&gt;</description><link>http://mihaia.com/post/337049179</link><guid>http://mihaia.com/post/337049179</guid><pubDate>Sat, 16 Jan 2010 07:00:49 +0000</pubDate><category>erlang</category></item><item><title>Stanford iPhone Dev Class</title><description>&lt;a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/"&gt;Stanford iPhone Dev Class&lt;/a&gt;: &lt;p&gt;&lt;img alt="iPhone Application Development (Winter 2010)" src="http://deimos3.apple.com/indigo//82/1e/13/14/821e1314c6c40e054bd86f600d1785c6e5754407c5ab2f135b0e08b510831419-3141239430.png" width="150" height="150"/&gt;&lt;br/&gt;
Stanford started the Winter quarter class which now covers iPhone 3.0.&lt;br/&gt;
It’s a nice opportunity to play a bit with iPhone apps and learn Obj-C (which at first looked weird).&lt;br/&gt;
Get the videos from &lt;a href="http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.3124430053.03124430055"&gt;iTunes U&lt;/a&gt;.&lt;/p&gt;</description><link>http://mihaia.com/post/334926094</link><guid>http://mihaia.com/post/334926094</guid><pubDate>Fri, 15 Jan 2010 01:04:45 +0000</pubDate></item><item><title>Processing logs in real-time</title><description>&lt;p&gt;I thought about how to process logs faster than using a cron job to poll for updates and I found &lt;a href="http://linux.die.net/man/3/mkfifo"&gt;mkfifo&lt;/a&gt; which you can use to get what&amp;#8217;s written in real time. It makes a FIFO pipe which acts like a regular unix file except it has to be opened for reading (using &lt;a href="http://linux.die.net/man/3/fopen"&gt;fopen&lt;/a&gt;) before writing to it. I tested it on Snow Leopard, it is the same in linux as well.&lt;/p&gt;
&lt;p&gt;After getting the updates in real time you can pushing them to a queue server like RabbitMQ for processing. Here&amp;#8217;s how I done it using Ruby, &lt;a href="http://eventmachine.rubyforge.org/"&gt;Eventmachine&lt;/a&gt; and &lt;a href="http://github.com/tmm1/amqp/"&gt;amqp&lt;/a&gt; gem:&lt;/p&gt;
&lt;pre&gt;mihai$ mkfifo log
mihai$ ruby1.9 publisher.rb log &amp;amp;
mihai$ echo "Test" &amp;gt; log&lt;/pre&gt;
&lt;script src="http://gist.github.com/238858.js"&gt;&lt;/script&gt;</description><link>http://mihaia.com/post/251376577</link><guid>http://mihaia.com/post/251376577</guid><pubDate>Sat, 21 Nov 2009 01:58:28 +0000</pubDate><category>ruby</category><category>unix</category></item><item><title>Homebrew</title><description>&lt;p&gt;After a clean install of Snow Leopard I decided not to use &lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt; but to go with &lt;a href="http://github.com/mxcl/homebrew"&gt;homebrew&lt;/a&gt;. Its main advantages are no duplication (macports installed its own version of ruby, python and other libs) and the path layout: packages are installed into their own prefix (eg. /usr/local/Cellar/wget) and then symlinked into the Homebrew prefix (eg. /usr/local).&lt;/p&gt;
&lt;p&gt;And because all of the formulas are in git, to add one you just fork the project on GitHub, push your formula and make a pull request. Because of that it&amp;#8217;s one of the most forked project on GitHub.&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s what I did and now you can install Tokyo Cabinet and Tokyo Tyrant &lt;s&gt;from my &lt;/s&gt;&lt;a href="http://github.com/ropiku/homebrew"&gt;&lt;s&gt;fork&lt;/s&gt;&lt;/a&gt;&lt;s&gt; (I hope it will be merged into master soon) &lt;/s&gt;from main repo:&lt;/p&gt;
&lt;pre&gt;brew install tokyo-tyrant&lt;/pre&gt;
&lt;p&gt;(yep, no sudo needed).&lt;/p&gt;</description><link>http://mihaia.com/post/219057538</link><guid>http://mihaia.com/post/219057538</guid><pubDate>Wed, 21 Oct 2009 14:39:00 +0100</pubDate><category>ruby</category><category>osx</category></item><item><title>Manchester</title><description>&lt;p&gt;&lt;img height="334" width="500" alt="University of Manchester" src="http://farm3.static.flickr.com/2462/4016836547_2e4a267d80.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s been one month since I arrived in Manchester and I really like it. The University is great, I only have 5 courses and 20h per week (and lunch breaks).&lt;/p&gt;
&lt;p&gt;But the thing that I like the most in Manchester are the user groups. I&amp;#8217;ve been to &lt;a title="NWRUG" href="http://nwrug.org/"&gt;North West Ruby User Group&lt;/a&gt;, &lt;a href="http://geekup.org/"&gt;GeekUp&lt;/a&gt; and want to go at the next &lt;a href="http://manchester.fsuk.org/blog/"&gt;Manchester Free Software&lt;/a&gt; talk and to &lt;a href="http://groups.google.com/group/python-north-west"&gt;Python North West&lt;/a&gt;. I will probably talk at the next NWRUG meeting so I strongly recommend you come (and maybe make a short talk as well).&lt;/p&gt;</description><link>http://mihaia.com/post/217069421</link><guid>http://mihaia.com/post/217069421</guid><pubDate>Mon, 19 Oct 2009 11:54:27 +0100</pubDate></item><item><title>Since July I have joined the awesome team at uberVU. I really...</title><description>&lt;iframe width="400" height="323" src="http://www.youtube.com/embed/HjFzljXLfDM?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Since July I have joined the awesome team at uberVU. I really like challenges and their goal to track the whole social media sounded very exciting. During this time I learned a lot of new things (like Python) and discovered how to cope with the amount of new information being generated on the internet.&lt;/p&gt;
&lt;p&gt;This video shows what we have accomplished so far.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.ubervu.com/post/177138569/its-easy-search-for-a-keyword-and-we-can-tell"&gt;ubervu&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;It’s easy. Search for a keyword and we can tell you &lt;b&gt;where are the people discussing that keyword&lt;/b&gt;, &lt;b&gt;how many of them there are&lt;/b&gt; and &lt;b&gt;what are the conversations you should get engaged in&lt;/b&gt;.&lt;br/&gt;&lt;br/&gt;As opposed to buzz tracking technologies that track mentions of your name or brand, our service is oriented around which people are interacting with your content or content about you and whether you are engaging those people or not. This approach turns the tables on buzz tracking by focusing on measuring and growing your community - building relationships and loyalty with people - rather than maximizing mention count without regard to people or relationships.&lt;/blockquote&gt;</description><link>http://mihaia.com/post/177155991</link><guid>http://mihaia.com/post/177155991</guid><pubDate>Tue, 01 Sep 2009 16:22:00 +0100</pubDate></item><item><title>mr. penumbra’s twenty-four-hour book store</title><description>&lt;a href="http://robinsloan.com/2009/41/"&gt;mr. penumbra’s twenty-four-hour book store&lt;/a&gt;: &lt;p&gt;&lt;a href="http://robinsloan.com/2009/41/"&gt;&lt;img src="http://robinsloan.com/storage/24hr-cover.jpg"/&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://mihaia.com/post/122497330</link><guid>http://mihaia.com/post/122497330</guid><pubDate>Fri, 12 Jun 2009 20:25:20 +0100</pubDate></item><item><title>Google Wave Hackathon at Mountain View</title><description>&lt;p&gt;I wish I was at I/O to get the opportunity to play with Google Wave. I love the idea, and I think it&amp;#8217;s limited only by what robots/gadgets makers think of doing with it.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.jaggeree.com/post/115379833/google-wave-hackathon-at-mountain-view"&gt;jaggeree&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;At I/O there were some really interesting Office Hours sessions where you could go and talk to the engineering teams about questions and issues. I wanted to find out a bit more about Wave and so went along to their APIs one. At the end of a really interesting chat an understandably tired Douwe gave me a mysterious looking card and invited me to come up to Mountain View the following day to hack on the Wave APIs… amazing, thank you Douwe.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3367/3578122169_b455a30f2d.jpg" width="500" height="375"/&gt;&lt;/p&gt;
&lt;p&gt;I liked the ARGy nature of the mysterious tr.im URL on a card with nothing else on it, which lead you to a webpage where you could sign up.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3349/3578310565_54c23e999a.jpg" width="476" height="500"/&gt;&lt;/p&gt;
&lt;p&gt;And a set of e-mails telling you where to go and how to get into the Waves sandbox. I had a few meetings in the morning in San Francisco I couldn’t miss and was worried it was getting too late to really build stuff when I got to the Hackathon so I spent most of the journey on the Caltrain up there looking through the docs, pulling together some simple ideas I could do in the 2 hours I’d have to code and also writing some very simple guestimate code based on the docs.&lt;/p&gt;
&lt;p&gt;The ARGy nature of the day carried on with fantastic lo-fi handwritten signs telling you where to go which I wished I’d photographed. When I got into the hacking room there were about 50 of us including the Wave team and it was a real honour and pleasure to meet Lars and many of the others who’d made this exciting new thing.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://farm3.static.flickr.com/2479/3578127331_da5215616a.jpg?v=1243697678" width="500" height="375"/&gt;&lt;/p&gt;
&lt;p&gt;Within about an hour or so (glad I already know AppEngine, all Robots are currently implemented in AppEngine) I had the Robot responding to the text properly and then in a little while longer I had the latest 10 stories from &lt;a href="http://www.guardian.co.uk/open-platform"&gt;The Guardian Content API&lt;/a&gt; being pushed into the right Blip within the Wave. We’ll be covering my code over on the &lt;a href="http://www.guardian.co.uk/open-platform/blog"&gt;Open Platform blog&lt;/a&gt; and we’ll put a screencast of it in action there and here soon. I called it Grauniady, partly because of The Guardian’s pet name in the UK of The Grauniad, partly because a naming convention seems to have come out of the Wave team of robots ending in “y” and partly because Lar’s demo of the spell checking was just so amazing, it all seemed appropriate.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3403/3579121584_8359f595fc.jpg" width="500" height="346"/&gt;&lt;/p&gt;
&lt;p&gt;It was a really amazing day, some fantastic demos from all the developers which ranged from a collaborative drum machine and a piano embedded in a Wave, to a robot from &lt;a href="http://www.twilio.com/"&gt;Twilio&lt;/a&gt; which looked for phone numbers and enabled a call between people, and recorded that call and embedded it in the wave (awesome demo). There were a couple of Robots which behaved like bots and responded to text.&lt;/p&gt;
&lt;p&gt;Apart from the usual laptop/projector hookup mayhem Grauniady performed admirably and worked fine. Thanks to a Tory MP trying to claim for a “&lt;a href="http://browse.guardian.co.uk/search?search=duck+island&amp;amp;sitesearch-radio=guardian&amp;amp;go-guardian=Search"&gt;duck island&lt;/a&gt;” and Anna Pickard’s use of the word “&lt;a href="http://browse.guardian.co.uk/search?search=cockweasel&amp;amp;sitesearch-radio=guardian&amp;amp;go-guardian=Search"&gt;cockweasel&lt;/a&gt;” in The Apprentice live blog I had some good funny examples to show (always good to hear laughter at something other than sketchy code). Obviously I was following &lt;a href="http://twitter.com/simonw"&gt;Simon Willison&lt;/a&gt;’s convention of API demo’s involving animal names.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3355/3576784791_4270a62006.jpg" width="500" height="281"/&gt;&lt;/p&gt;
&lt;p&gt;thanks to &lt;a href="http://twitter.com/pamelafox"&gt;Pamela Fox&lt;/a&gt; for &lt;a href="http://www.flickr.com/photos/88757125@N00/3576784791/"&gt;image above&lt;/a&gt; and for taking notes of the hacks in a wave.&lt;/p&gt;
&lt;p&gt;Thanks to &lt;a href="http://twitter.com/kevinmarks"&gt;Kevin Marks&lt;/a&gt; for the perfectly timed lift back to Mountain View station (5 minutes later and I’d have been sitting on the platform for an hour). Love the double decker CalTrains, couldn’t stop grinning about them and the day on the way back. Totally memorable. Feel very lucky. Thank you.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3324/3578933194_c27d9f4cfb.jpg?v=1243697696" width="500" height="375"/&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://mihaia.com/post/115411318</link><guid>http://mihaia.com/post/115411318</guid><pubDate>Sat, 30 May 2009 20:02:31 +0100</pubDate></item><item><title>Quick jump to folder</title><description>&lt;p&gt;Another script I stole from &lt;a href="http://evil.che.lu/"&gt;evilchelu&lt;/a&gt; is &lt;a href="http://github.com/evilchelu/dotfiles/blob/8832f4b31e8717d849cddd48f9ae835d29ed6107/dotless/bin/chelu/j.sh"&gt;j.sh&lt;/a&gt;. It enables you to quickly jump to a folder that you often access by writing a small part of its name. I use it to quickly cd to my projects or other repositories with &lt;i&gt;&amp;#8220;j &amp;lt;a few letters&amp;gt;&amp;#8221;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;To install it save it somewhere (I use a bin/ folder in my home) and add &lt;i&gt;&amp;#8220;source &amp;lt;path to j.sh&amp;gt;&amp;#8221;&lt;/i&gt; to your &lt;i&gt;.bashrc&lt;/i&gt; or &lt;i&gt;.bash_profile&lt;/i&gt;.&lt;/p&gt;</description><link>http://mihaia.com/post/90492399</link><guid>http://mihaia.com/post/90492399</guid><pubDate>Fri, 27 Mar 2009 23:23:38 +0000</pubDate></item><item><title>I'm a ninja</title><description>&lt;a href="http://philosecurity.org/2009/03/23/pirates-and-ninjas-emacs-or-vi"&gt;I'm a ninja&lt;/a&gt;: &lt;p&gt;As I said on &lt;a href="https://twitter.com/ropiku/status/1322493814"&gt;twitter&lt;/a&gt;, I now switched to Vim (MacVim specifically). I am using &lt;a href="http://github.com/evilchelu/dotfiles/tree/master"&gt;evilchelu’s vimrc&lt;/a&gt; which has FuzzyFinder (my favourite TextMate feature). It wasn’t that hard to get productive at acceptable level.&lt;/p&gt;
&lt;p&gt;Any tips and/or recommendation ?&lt;/p&gt;</description><link>http://mihaia.com/post/89423811</link><guid>http://mihaia.com/post/89423811</guid><pubDate>Tue, 24 Mar 2009 18:03:07 +0000</pubDate></item><item><title>Videos and podcasts</title><description>&lt;p&gt;I wanted to share with you a list of videos and podcast that I listen to when I have some time.&lt;/p&gt;
&lt;p&gt;About videos I posted earlier with recommended talks. Here&amp;#8217;s some courses that I have seen (I got them from iTunes U):&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://see.stanford.edu/see/lecturelist.aspx?coll=11f4f422-5670-4b4c-889c-008262e09e4e"&gt;Stanford Programming Abstractions&lt;/a&gt; (&lt;a href="http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.1616924949.01616924952"&gt;iTunes U&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://webcast.berkeley.edu/course_details.php?seriesid=1906978454"&gt;UC Berkeley The Structure and Interpretation of Computer Programs&lt;/a&gt; (&lt;a href="http://deimos3.apple.com/WebObjects/Core.woa/Browse/berkeley.edu.1621506930.01649506475"&gt;iTunes U&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://railslab.newrelic.com/scaling-rails"&gt;Scaling Rails&lt;/a&gt; series&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I listen mostly to Ruby podcasts, to find out the latest news and opinions:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.railsenvy.com/"&gt;Rails Envy&lt;/a&gt; (I highly recommend this podcast)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://railscasts.com/"&gt;Railscasts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://podcast.rubyonrails.org/"&gt;Rails podcast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.rubyology.com/"&gt;Rubyology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://web20show.com/"&gt;Web 2.0 show&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.stackoverflow.com/category/podcasts/"&gt;StackOverflow podcast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;What do you subscribe to&amp;#160;? Have any informative video that you&amp;#8217;d like to share&amp;#160;?&lt;/p&gt;</description><link>http://mihaia.com/post/84567059</link><guid>http://mihaia.com/post/84567059</guid><pubDate>Sun, 08 Mar 2009 10:22:30 +0000</pubDate></item><item><title>Acts_as_conference videos</title><description>&lt;p&gt;Just saw &lt;a href="http://aac2009.confreaks.com/06-feb-2009-09-00-innovation-in-rails-gregg-pollack-jason-seifer.html"&gt;Innovation in Rails&lt;/a&gt; by Gregg Pollack and Jason Seifer (RailsEnvy guys) where they talked about the new things in the past year in the Ruby and Rails world. Confreaks posted high resolution 720p videos of the conference on their &lt;a href="http://aac2009.confreaks.com/"&gt;site&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Gregg showed how to use a reverse proxy cache to speed up your application. You can find links about the discussed topics on the &lt;a href="http://www.railsenvy.com/aac"&gt;RailsEnvy blog&lt;/a&gt;. Earlier Gregg Pollack also released a series of screencasts about &lt;a href="http://railslab.newrelic.com/scaling-rails"&gt;scaling Rails&lt;/a&gt; debunking the myth that &lt;a href="http://railscantscale.com/"&gt;Rails can&amp;#8217;t scale&lt;/a&gt;.&lt;/p&gt;</description><link>http://mihaia.com/post/78563875</link><guid>http://mihaia.com/post/78563875</guid><pubDate>Sun, 15 Feb 2009 18:03:08 +0000</pubDate></item><item><title>Clearance - login with username</title><description>&lt;p&gt;For my Rails projects currently I&amp;#8217;m using &lt;a href="http://github.com/thoughtbot/"&gt;Thoughtbot&lt;/a&gt;&amp;#8217;s stack (Shoulda, factory_girl) and now I switched to &lt;a href="http://giantrobots.thoughtbot.com/2009/2/9/clearance-rails-authentication-for-developers-who-write-tests"&gt;Clearance&lt;/a&gt;. I love it because it&amp;#8217;s tested and it&amp;#8217;s easy to extend. One such modification that I need is to allow users to &lt;a href="http://wiki.github.com/thoughtbot/clearance/sign-up-sign-in-with-user-name"&gt;login with username&lt;/a&gt;. I wrote a &lt;a href="http://github.com/ropiku/clearance-username/tree/master"&gt;demo&lt;/a&gt; app and here&amp;#8217;s a tutorial on how to do it yourself:&lt;a href="http://wiki.github.com/thoughtbot/clearance/installation"&gt;&lt;br/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;1. &lt;a href="http://wiki.github.com/thoughtbot/clearance/installation"&gt;Install clearance&lt;/a&gt; and run the generator&lt;/p&gt;
&lt;p&gt;2. Test UsersController#new includes a username (or “handle” or whatever) text field&lt;/p&gt;
&lt;p&gt;&lt;i&gt;test/functional/users_controller_test.rb &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/62363.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;And watch it fail:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;test: The public When getting new User view should display username field. &lt;br/&gt;(UsersControllerTest) [/test/functional/users_controller_test.rb:11]:&lt;br/&gt;There must be a username field.&lt;br/&gt;&amp;lt;false&amp;gt; is not true.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add the field to &lt;i&gt;app/views/users/_form.html.erb&lt;/i&gt; to fix it (it still won&amp;#8217;t pass because the model does not have the username field yet):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;%= form.label :username %&amp;gt;&lt;br/&gt;&lt;br/&gt;  &amp;lt;%= form.text_field :username %&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;3. Create migration to add username:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ script/generate migration AddUsernameToUsers username:string&lt;br/&gt;&lt;br/&gt;$ rake db:migrate&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And update the factory &lt;i&gt;test/factories/clearance.rb&lt;/i&gt;:&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/62351.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;4. Test the User model to validate presence of username and to allow mass assignment&lt;/p&gt;
&lt;p&gt;&lt;i&gt;test/unit/user_test.rb&lt;/i&gt; should be:&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/62356.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Now the unit tests are failing, to fix them we need to add validations to the &lt;i&gt;User&lt;/i&gt; model and make the &lt;i&gt;username&lt;/i&gt; field accessible:&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/62361.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;5. Test SessionsController#create that given a User’s username for the :email value, the User should be signed in&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/62365.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Which fails because we only check email. Add a test for the User#authenticate method so it checks email too:&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/62367.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Add the implementation to the User model and all tests pass:&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/62368.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Please post your suggestions/comments, this post was written at 2am and it may have inacurracies.&lt;/p&gt;</description><link>http://mihaia.com/post/77138388</link><guid>http://mihaia.com/post/77138388</guid><pubDate>Wed, 11 Feb 2009 23:38:00 +0000</pubDate><category>ruby</category><category>rails</category><category>tutorial</category></item></channel></rss>

