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](“http://www.postgresql.org" “PostgreSQL”) 8.4 install using the great[Homebrew](“http://github.com/mxcl/homebrew" “Homebrew”) by [Adam Vandenberg](“http://twitter.com/flangy" “Homebrew”). Run the author’s [installation script](“http://gist.github.com/323731" “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](“http://www.datamapper.org" “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](“http://www.postgresql.org" “PostgreSQL”) 8.4 I wanted to have [PosgreSQL](“http://www.postgresql.org" “PostgreSQL”) server working on the Mac so that development is easier. There is a .dmg package from the guys at [EnterpriseDB](“http://www.enterprisedb.com/" “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: me@mydomain.com 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 gems.rubyforge.org to the gemcutter.org 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](“http://portolinux.org/doku.php" “PortoLinux”) had a meeting at the engineering faculty of Porto University to discuss about usage of diferent [SCM](“http://en.wikipedia.org/wiki/Revision_control" “source”)’s. Main systems covered, centralized vs distributed: Subversion” “Subversion”) Git” “Git”) It was a good tech event, spent a [good time](“http://portolinux.org/gallery2/main.php?g2_itemId=1449" “me”) there. Some [photos here](“http://portolinux.org/gallery2/main.php?g2_itemId=1203" “pictures”).

next week... Codebits

November 23, 2009

Next week fun starts… [much sooner](“http://codebits.eu/s/blog/5fc7e5123ff2012611801fef6246496e" “quiz”); conference; talks; code; Lisbon; 3day => [codebits](“http://codebits.eu" “CodeBits”) Just like [last year](“http://www.flickr.com/photos/ndantas/3043438572/" “at”) a lot of hacks and experiments are expected. Kudos to the [SAPO](“http://www.sapo.pt" “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