May 2012
7 posts
8 tags
Mongoid recursively embedding
This is a note for myself for a project I am actually working on that I thought could be useful to share :) More info here. CYCLIC RELATIONS on MONGODB WITH MONGOID A document can recursively embed itself using recursively_embeds_many, which provides accessors for the parent and children. class Tag include Mongoid::Document recursively_embeds_many field :name end programming =...
May 22nd
4 tags
Updating embedded child objects when the parent...
Mongoid has added a tag which automatically makes callbacks for embedded child objects when the parent object is saved. You can find it at the end of the mongoid documentation on embedding. class Post   include Mongoid::Document   include Mongoid::Timestamps   include Mongoid::Paranoia   embeds_many :comments, cascade_callbacks: true   accepts_nested_attributes_for :comments end
May 22nd
1 tag
“I am truly free only when all human beings, men and women, are equally free. The...”
– Mikhail Bakunin - Bakunin on Anarchy
May 18th
1 tag
“Do I contradict myself? Very well, then I contradict myself, I am large, I...”
– Whitman
May 17th
4 tags
“I find fascinating how people protect the right of the richest for fear of...”
– my self :)
May 16th
1 note
3 tags
“If you go where everybody else is you might just end up doing the same...”
– myself :)
May 14th
4 tags
Nested hash in ruby
Ever wondered how to create nested hash in ruby? Here it is: 1.9.3p125 :001 > a = Hash.new{|h,k| h[k]=Hash.new(&h.default_proc) }  => {}  1.9.3p125 :002 > a[2][1] = 2  => 2  1.9.3p125 :003 > a[2][2][3] = 2  => 2  1.9.3p125 :004 > a[2][2][4] = 5  => 5  1.9.3p125 :005 > a[3][1][1][1] = 7  => 7  1.9.3p125 :006 > a  => {2=>{1=>2,...
May 14th
March 2012
2 posts
6 tags
Devise + Mongoid + Cancan
I have thought a while about making a summary post about configuring devise + mongoid + cancan for creating accounts and implementing authentication in a rails app. First of all there are various guides that you can use to get you started. All of them can give you a different insight on the technology and a different perspective and what is needed to accomplish whatever you have in mind :). So...
Mar 26th
otacon22 asked: Hai fatto parte del POuL un po' di tempo fa? :-)
Mar 10th
February 2012
1 post
7 tags
How to load a feed with Google Feed API and JQuery
Here is a quick and dirty way to load a xml feed with Google Feed API with Jquery. Enjoy!! :) First step include the necessary external calls: <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”</script> <script type=”text/javascript” src=”https://www.google.com/jsapi”></script> Second step your javascript...
Feb 21st
November 2011
1 post
4 tags
Quick and dirty search in Rails
Ever wondered how to quick have a search function in your rails app? Here is a super quick and maybe a lil dirty way to achieve so. First step: The view  <p><%= form_tag("/searches", :method => "get") do %>            <%= text_field_tag :keywords, params[:keywords] %> </p>        <p>  <%= submit_tag("Search") %>            <% end %>  ...
Nov 30th
51 notes
October 2011
1 post
4 tags
Ruby headaches pills
If: script/rails generate controller Hello Is failing, try to remember that you have probably installed more than one version of rails in your history, so you might need to call: rvm use 1.9.1 —default :)
Oct 17th
12 notes
September 2011
6 posts
3 tags
“The future is distributed!”
Sep 15th
5 tags
WatchWatch
Hire the hackers!
Sep 14th
2 notes
3 tags
Sep 6th
3,648 notes
3 tags
Home abroad →
I still treasure my memories of two weeks spent in Buenos Aires almost 3 years ago, and this article has brought all of them back again :)
Sep 6th
1 note
4 tags
“Work smarter, play harder”
– Never got why we have to work hard… ;)
Sep 5th
7 notes
9 tags
“Schmidt says definitively: the next generation of leaders and startups to emerge...”
– Reinvent the future, everything else will follow.
Sep 2nd
5 notes
August 2011
3 posts
3 tags
Aug 27th
2 notes
8 tags
Creative destruction
From Capitalism, Socialism and Democracy (New York: Harper, 1975) [orig. pub. 1942] by Joseph A. Schumpeter, pp. 82-85: Capitalism, then, is by nature a form or method of economic change and not only never is but never can be stationary. And this evolutionary character of the capitalist process is not merely due to the fact that...
Aug 19th
5 notes
2 tags
Quick start on Amazon AWS.
How exciting! Amazon has started to offer free tier 1 year account to their AWS services. So why not try the services out with a small project or a new web app? The Ubuntu EC2 starter guide gives you some hints and tips to using Ubuntu’s official images on Amazon EC2. To summarize: 1. Create your account on Amazon, if you don’t have one already. Go to http://aws.amazon.com, and...
Aug 14th
2 notes
July 2011
4 posts
3 tags
Jul 29th
1 note
5 tags
Former Google CIO: LimeWire Pirates Were iTunes’... →
Jul 26th
8 notes
5 tags
Jul 15th
4 notes
7 tags
Skate this! →
Jul 15th
May 2011
12 posts
7 tags
WatchWatch
Every pirate wants to be an admiral.
May 31st
3 notes
May 28th
May 28th
7 tags
On the nature of Innovation
Innovation is in a way at the hearth of the pirate’s spirit and probably the first weapon against competitors. Finding something totally new, grasp a revolutionary idea and taking it into practice, it is something entrepreneurs and companies alike are often obsessed with. It is often believed that innovation goes hand in hand with creativity, and the quality of being able to find unusual, or...
May 26th
May 26th
20 notes
May 25th
7 notes
6 tags
Pirates are essential to innovation
All great inventions, all great ideas started with a leap of faith, a grain of foolishness maybe, and some stubbornness to sustain a project despite everyone believing the opposite. All great inventions, if they are truly extraordinary, they change the world as it was known before, by re-defying space, time, and above all laws and models. All great inventions need pirates. Take the airplane...
May 24th
6 notes
May 23rd
May 21st
May 20th
4 tags
A modern Pirate.
The English term Pirate is derived from the latin word Pirata and from the greek word πειρατής” (peiratēs), “brigand”,in turn from “πειράομαι” (peiráomai), “attempt”, which as well comes from “πεῖρα” (peîra), “attempt, experience”. Nor the word attempt or experience can be found in the modern image that we have of pirates. Nor...
May 19th
A quick intro
Just what it says…
May 19th