Hack Reality 2 – The rise of information

Quando si parla di Whymca si tratta di hacking allo stato puro.
Gli eventi che riescono ad organizzare gli irrefrenabili Andrea Piovani e Paolo Sinelli rientrano in quegli avvenimenti che qualsiasi geek che si rispetti non può ignorare. Detto, fatto. L’occasione per esserci è alle porte: dopo un anno il team di Whymca, in collaborazione a numerosi partner e supporter di settore, ritornano con Hack Reality, l’evento dedicato all’interazione tra dispositivi mobili e mondo reale.Hack Reality 2All’interno di tematiche particolarmente sentite dal mondo della tecnologia dell’informazione, quali l’internet of things e le smart cities, l’hackathon che avrà luogo sabato 25 maggio al Talent Garden di Milano sarà uno dei molteplici scenari che andranno a definire questo Hack Reality 2.

Continua a leggere

Setting up PostgreSQL on Ubuntu (precise/12.04), Ruby on Rails (RoR/3.2.11 ruby/1.9.3) and Heroku (gem/2.34.0)

At Sellf we are using PostgreSQL as our backend database and facing with its configuration it wasn’t so immediate as I would expect. I wrote this tutorial for Ubuntu an RoR to easily configure PostgreSQL in combo with Heroku. Some steps are directly cutted from the original guide of PostreSQL written by the Heroku team.

#1 Installation

To install Postgresql you may use the command line and type:

sudo apt-get install postgresql

#2 Basic server setup

To start off, we need to change the PostgreSQL postgres user password; we will not be able to access the server otherwise. As the “postgres” Linux user, we will execute the psql command:

sudo -u postgres psql postgres

Set a password for the “postgres” database role using the command:

\password postgres

and give {your-password} when prompted. The password text will be hidden from the console for security purposes. Type Control+D to exit the posgreSQL prompt.
To create the databases for the development and test environments, simply type:

sudo -u postgres createdb {your-db-dev-name}
sudo -u postgres createdb {your-db-test-name}

where {your-db-dev-name} and {your-db-test-name} are the names of the databases at your convenience.

#3 Installation of pgAdmin III

PgAdmin III is a handy GUI for PostgreSQL, it is essential to beginners. To install it, type at the command line:

sudo apt-get install pgadmin3

#4 Installation of pg Ruby gem

To use PostgreSQL as your database in Ruby applications you will need to include the pg gem in your Gemfile.

group :development, :test do
gem 'pg', '0.12.2'
end

group :production do
gem 'pg', '0.12.2'
end

Run

bundle update
bundle install --without production

to download and resolve all dependencies.
To verify the presence of the installed gem type

bundle show pg

Continua a leggere