Luís Ramalho Entrepreneur & Developer

2014 so far

My previous post was a bit more than a year, thus I reckon it is time for an update on what I have been up to.


In September 2011 I co-founded with two other partners a web development company, and in late 2013 we decided it was time to close it.

The reasons are multiple, but the most important one was the lack of a clear mission statement. The company simply did too much.

We signed the final closing papers this month.


Unfortunately with the departure of Sinemys, another project had to die.

I started a ruby meetup in Porto called Porto.rb which gathered a total of 50 great Rubyists. It is sad to see it go, and would be happy if someone takes over. Let me know.

GITM master’s program

Life goes on, and after some reflection I have decided that I would benefit from a better understanding of IT management. Thus, I applied to the Master's Degree Programme in Global IT Management offered by the University of Turku, to which I was admitted.

Classes will start in the end of August.

How to get the Facebook Access Token, the Extended Page Access Token that never expires

You will need:


When you see 'Success' then you have a URL like:[ACCESS_TOKEN]&expires_in=[SECONDS]


Finally, you will see your extended page access token that never expires


Backup PostgreSQL from AppFog

Backing up a PostgreSQL database from AppFog is as easy as typing two commands:

af login

Attempting login to []
Successfully logged into []

af export-service [POSTGRESQL_DATABASE]

Exporting data from '[POSTGRESQL_DATABASE]': OK[DATABASE]/snapshots/[FILE_NUMBER]?token=[TOKEN]

Restore using pg_restore

If you want to restore that backup in your localhost, then just execute the following command:


[YOURDUMPFILE] is inside the file that you just downloaded when you exported the database.

These are the meanings of the flags used:

-c --clean Clean (drop) database objects before recreating them.

-d dbname --dbname=dbname Connect to database dbname and restore directly into the database.

-U username --username=username User name to connect as.

-W --password Force pg_restore to prompt for a password before connecting to a database.

You can read more documentation

Restore on AppFog with pgdump & pgrestore


Upload the .dump to your AppFog

RAILSENV=proxied-appfog pgrestore --verbose --clean --no-acl --no-owner -h localhost -p [PORT] -d [POSTGRESQLDATABASE] -U [USERNAME] [DUMPFILE]