Thursday, April 30, 2015

Aliases to simplify android development

Recently I added some aliases to bash
(I use Ubuntu : gedit ~/.bashrc )

I added aliases for assemble release, assemble debug and adb install -r

alias ar='./gradlew aR'
alias ad='./gradlew aDeb'

alias ainst='function _ainst(){ adb install -r $1;};_ainst'

Now i can simply build release using ar, and the install it on device using ainst:

Example:
ainst app-flav1-release-1.0-build1.apk

Saturday, January 3, 2015

How to install Postgresql 9.4 with extensions on Ubuntu 14.04

Just by notes, byt maybe this will help to someone...

Install postgress
sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

sudo apt-get update
sudo apt-get install postgresql-9.4 pgadmin3

Install extensions
sudo apt-get install postgresql-contrib

Restart postgresql
sudo /etc/init.d/postgresql reload


Show available extensions
sudo su - postgres
psql
SELECT * FROM pg_available_extensions;

Importing dumps
Getting error: Peer authentication failed for user “postgres” when importing dump
see:
http://stackoverflow.com/questions/18664074/getting-error-peer-authentication-failed-for-user-postgres-when-trying-to-ge