Up and running with PostgreSQL

November 26, 2015 Leave a comment

Up and running with PostgreSQL

1. Install

sudo apt-get install postgresql-9.3

2. Set a password to the postgres user

$ sudo -u postgres psql postgres
psql (9.3.10)
Type "help" for help.

postgres=# \password postgres
Enter new password:
Enter it again:
postgres=# \q

3. Create a new role

$ sudo -u postgres createuser -D -A -P mynewuser
Enter password for new role:
Enter it again:

4. Create a database using the new role

$ sudo -u postgres createdb -O mynewuser mynewdatabase

5. Connect to new database using new role

psql -h -p 5432 mynewdatabase mynewuser
Password for user mynewuser:
psql (9.3.10)
SSL connection (cipher: DHE-RSA-AES256-GCM-SHA384, bits: 256)
Type "help" for help.

mynewdatabase=> \q

6. Manual for createuser command

man createuser


Categories: postgresql

Websites to learn something new

November 26, 2015 Leave a comment

From learning to code, to learning a new language.


Categories: Interesting

Microservices – Martin Fowler

November 21, 2015 Leave a comment

goto; talk

Other resources:

Categories: Interesting Tags:

Semantic Versioning

November 21, 2015 Leave a comment

Semantic Versioning (referred to, for short, as SemVer), is a versioning system that has been on the rise over the last few years. With new plugins, addons, extensions, and libraries being built every day, having a universal way of versioning software development projects is a good thing to help us keep track of what’s going on.

Categories: Interesting


October 28, 2015 Leave a comment


$ gpg –local-user -a –detach-sign

$ gpg –fingerprint

$ gpg –send-key –keyserver hkp://keys.gnupg.net

To get your public key
$ gpg gpg –armor –export

To decrypt file that was shared with you
$ gpg –output

For this version of gpg

gpg (GnuPG/MacGPG2) 2.0.28
libgcrypt 1.6.3
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Categories: bash Tags:

How to use *args and **kwargs in Python

October 28, 2015 Leave a comment
Categories: python Tags: ,

Mosh – Mobile Shell

October 26, 2015 Leave a comment

Mosh (mobile shell)

Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.

Mosh is a replacement for SSH. It’s more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.

Mosh is free software, available for GNU/Linux, FreeBSD, Solaris, Mac OS X, and Android.


Categories: Interesting

Get every new post delivered to your Inbox.

Join 41 other followers