avatar

Andres Jaimes

Enumerations

Using case object

Unlike other languages, Scala does not have a keyword for enumerations. One way to implement them is by using case objects. For example:

1sealed trait OperatingSystem extends Product with Serializable
2
3object OperatingSystem {
4 …

Installing Rancher on Ubuntu/Docker

On this article we are going to install a rancher server on Ubuntu. Let’s start by getting the rancher image from docker hub:

1sudo docker run -d --restart=always -p 8080:8080 --name=rancher-server rancher/server

Go to http://ip-address:8080 …

From MySQL to Postgres - Useful commands

This article shows a list of basic commands on MySQL and their corresponding versions for PostgreSQL.

Connecting to a database

MySQL

1$ mysql -u root -p

Postgres

1$ psql -h <host> -U <username> <database-name>

Try the following if …

Ideas for successful software projects

This article describes some ideas on getting a successful software development process.

A successful project:

  • Depends on the expertise of the team. Don’t try to push many new technologies into a project. It will be difficult for the team to …

Storing MySQL credentials on a file

MySQL allows you to store credentials in a file called ~/.my.cnf. The contents can look like this:

[mysqldump]
user=myuser
password=mypassword

We have to modify the file permissions and give read/write permissions to the owner only:

1chmod 600 …

Common tasks when working with MySQL

How to install MySQL server in Ubuntu

It’s pretty simple:

1sudo apt-get install mysql-server

How to connect to MySQL using Java

This is a useful and simple snippet:

 1import java.sql.Connection;
 2import java.sql.DriverManager;
 3public class Test { …

Akka Actors

The Play Framework is built upon Akka actors, but does everything so that you don’t really need to use them. Despite this, actors are easy to integrate with Play, precisely because it is built on them (there is already an actor system for you …

Inspirational videos

This article contains a series of curated inspirational videos from different users.

“It will make you rich”. What poor people don’t know about making money

Videos from UKspreadbetting

This article contains a series of inspirational videos from user UKspreadbetting which I consider very important.

Why trading forex is so difficult

Is trading the road to great rewards and richness?

Trade entries and exits …