DataMapper update_or_create

March 13, 2010

Source code: git repository at github DataMapper has a defined method named first_or_create, very explicit name, that takes a condition and attributes as params. Its source code defined in dm-core-1.0.2/lib/dm-core/model.rb is: def first_or_create(conditions = {}, attributes = {}) first(conditions) || create(conditions.merge(attributes)) end What is does is simply find the first resource by conditions, or create a new resource with the attributes if none found. This always returns an instance of the resource found or created. ... Read more

install PostgreSQL in Mac OSX via Homebrew

March 10, 2010

Apple OSX Snow Leopard System Version: Mac OS X 10.6.2 Kernel Version: Darwin 10.2.0 Install notes for [PosgreSQL](“" “PostgreSQL”) 8.4 install using the great[Homebrew](“" “Homebrew”) by [Adam Vandenberg](“" “Homebrew”). Run the author’s [installation script](“" “install”), and that’s it. Try: $ brew help $ brew search postgresql $ brew install postgresql Summary/usr/local/Cellar/postgresql/8.4.2: 2297 files, 31M, built in 3.3 minutes $ brew info postgresql postgresql 8. ... Read more

install do_postgres on OSX Leopard

March 3, 2010

Install notes for [Datamapper](“" “Datamapper”) do_postgres driver ruby gem on severall operating systems: Apple OSX Snow Leopard System Version: Mac OS X 10.6.2 Kernel Version: Darwin 10.2.0 (No Macports; No Homebrew) [PosgreSQL](“" “PostgreSQL”) 8.4 I wanted to have [PosgreSQL](“" “PostgreSQL”) server working on the Mac so that development is easier. There is a .dmg package from the guys at [EnterpriseDB](“" “EnterpriseDB”) that is a single click install. Check it at their [downloads](“http://www. ... Read more

Gemcutter indexing ruby gems

November 23, 2009

Date: Sat, 21 Nov 2009 22:15:15 -0500 (EST) From: noreply@rubyforge.orgTo: Subject: [RubyForge] Gem index has been shut down Hello - You’re receiving this email because you’re a RubyForge project admin and a recent change robably affects you. A few days ago we repointed to the box. This means that Nick Quaranto’s excellent gemcutter app is now indexing and serving all the gems - so rather than having two gem indexes, we now have one. ... Read more

Revision Control Software workshop

November 23, 2009

Last saturday the local Linux group, [PortoLinux](“" “PortoLinux”) had a meeting at the engineering faculty of Porto University to discuss about usage of diferent [SCM](“" “source”)’s. Main systems covered, centralized vs distributed: Subversion” “Subversion”) Git” “Git”) It was a good tech event, spent a [good time](“" “me”) there. Some [photos here](“" “pictures”).

next week... Codebits

November 23, 2009

Next week fun starts… [much sooner](“" “quiz”); conference; talks; code; Lisbon; 3day => [codebits](“" “CodeBits”) Just like [last year](“" “at”) a lot of hacks and experiments are expected. Kudos to the [SAPO](“" “SAPO”) team, the organisers, to build up such an impressive event.

CouchDB Implementation

November 21, 2009

… just marking this CouchDB Implementation technical post from Ricky Ho here to read tomorrow while hacking on my new Aspire One. Basically, Ricky’s posts are almost all a _mustread.

Gist from Vim

November 20, 2009

Some things are pure smartness: Gist integrated with Vim by the use of vimscript for gist by Yasuhiro Matsumoto. For reference: :[from],[to] Gist -p # post lines (from, to) to gist privatelly :[from],[to] Gist # post lines (from, to) to public gist :Gist [xxxxx] # edit gist xxxxx :Gist -l # lists my gists :Gist -k # lits gists from all I used Paul Dixon’s Paste bin when needed, specially by its simple interface and good highlighting features. ... Read more

Mitch Altmann at Codebits

November 20, 2009

During the three days of Codebits where our minds are focused on hacking code, learning, networking, coding, eating pizza, creating ideas and implementing them, I had the pleasure to meet and talk to Mitch Altman. Mitch invents and hacks the coolest things. Here at Make Magazine, you can see how his BrainMachine is built, and using it is quite an experience… Yet, my favourite one is the Trippy RGB Waves (schematic, video, photos). ... Read more

on Paul Graham's Bad Economy post

October 17, 2009

Paul Graham’s gluing the recession factor with lack of competition, investor semi-blindness, operating cheaply and time is [always] now. While evidence is a virtue, this is !new. :note for non-programmers: ‘!’ as an alias for ‘not’\n\n[update]\nThis slideshare leaked from, as stated, a Sequoia Capital presentation is worth to look at.

© 2018 | Follow on Twitter | pedro mg & Hugo