Invoking angular stuff from console

To get an angular service in chrome console you can use:

angular.element(document.body).injector().get('serviceName')

This will get you a service object.

Source: http://stackoverflow.com/questions/15527832/how-can-i-test-an-angularjs-service-from-the-console

To get to angular scope, inspect an element, for which you want to get the scope and invoke: angular.element($0).scope()

(http://stackoverflow.com/questions/13743058/how-to-access-the-scope-variable-in-browsers-console-using-angularjs)

Advertisements

PostgreSQL on Fedora: psql: FATAL: Ident authentication failed for user “username”

Usually, to add a user to postgres, you have to run psql as user postgres and create user as such.

On Ubuntu it’s enough to let you log in as a newly created user to the DB, but it’s not enough on Fedora. Here psql responds with the error from the subject.

To fix it add the following line to pg_hba.conf (on F23: /var/lib/pgsql/data/pg_hba.conf):

local   all             all                           md5

Line above is for socket configuration. If you need IP access too, add:

host    all             all        127.0.0.1/32       md5