maanantai 19. syyskuuta 2016

Android development. Virtualdevice commands and Cordova.

I just gathered here commands I need for development:
List all your emulators:
emulator -list-avds
Run one of the listed emulators:
emulator @nameofyouremulator
where emulator is under:
${ANDROID_SDK}/tools/emulator

To deploy on specific device use:

  • Target specification. This includes --emulator--device, or --target=<targetID>.

keskiviikko 14. syyskuuta 2016

PostgreSQL on Mac OSX

Installing postgreSQL was so hard for mac. Because there are zero complete tutorials?? Or they require I know postgreSQL commands beforehand. This tutorial is for total noob.

Steps:
  1. $ brew update
  2. $ brew doctor
  3. $ brew install postgresql
Start or Stop postgresql

$ brew services start postgresql

$ brew services stop postgresql

THEN for MAC creating default db failed, so use command

$ createdb

after that you can login to psql using

$ psql

You can also setup database to specific folder using:

$ psql -d template1

To exit the psql command line use:

CTRL + D

tiistai 26. huhtikuuta 2016

Installing MongoDB on OSX EL Capitan

So I recently started using OSX and I have been struggling with all the commands around. I tried to install MongoDB about 10 hours before finally getting how to do it. So here is short how I did it.

1. Install homebrew http://brew.sh/
2. brew install mongodb
3. brew install autoconf
4. brew install php56 //This is optional I think
5. brew install openssl
6. brew link openssl --force
7. Install PEAR and PECL http://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/
7. sudo pecl install mongo
8. locate your php ini which is loaded. php --ini (Loaded Configuration File:         /usr/local/etc/php/5.6/php.ini)
9. add line extension=mongo.so somewhere in the file
10. Edit file /etc/apache2/httpd.conf and add line LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so (this points to the installed php version)
11. sudo apachectl restart
12. create php.info file and check that you see mongodb installed.