Jan Carlo Viray React · Angular · Node · Go · SQL · NoSQL · Cloud · Entrepreneurship

A year from now you’ll wish you started today — Karen Lamb

LinkedIn ·  Twitter ·  Github

PAAS comparison - Dokku vs Flynn vs Deis vs Kubernetes vs Docker Swarm (2017)

This year (2017) is when container orchestration and technology will be standard and clear winners for different use cases will rise. Here are my personal notes on common paas technology, comparing Dokku vs Flynn vs Deis vs Kubernetes vs Docker Swarm.

tldr: Easy but no H/A? Dokku. Easy with H/A? Flynn. Easy with H/A and native out-of-the-box solution? Docker Swarm. Complex, but mature and scales infinitely - the big dawg? Kubernetes. Want to make the big dawg less scary but still use the big dawg? Deis.

Companies Using MySQL

Hate it or love it, MySQL is widely used in massive scale - think Uber, Google, Facebook, Quora. It may not have the best licensing or be fastest out-of-the-box but it is a proven database. Want to get started quick? I wrote a MySQL cheat sheet to help you get started with common tasks. There are thousands of companies using MySQL out there, but here are some brand name companies using it.

Intro to SQL Cheat Sheet

Here’s a quick reference / cheat sheet for SQL language. The CRUD are platform agnostic. Just copy-paste this in your SQL editor like MySQL Workbench and you can step through it. Enjoy!

Go and MongoDB simple example

Both Golang and MongoDB are a perfect pair for rapid application development and building things for scale. They both have native features that allows you to focus on your application. When choosing a database, make sure that MongoDB fits your requirements as it is not a one-size-fits all solution. Read the official docs on its design and use cases. In this post, we’ll go from Installation to building a CRUD.

Why Golang

I dabbled a bit of Go programming before, and after two years of not writing Go code, I decided to check it out. Alas, I fell in love, again. Why? Simply put, it is simple, yet complete. With so many layers, stacks, frameworks, libraries and opionionated “best practices” out there, there is strong cry from most of us that calls for a tool that is simple, yet complete.

Golang and MySQL (or PostgreSQL)

Let’s use a toolkit from one of Go’s standard libraries: database/sql. It is an abstraction and you need to import a database driver also. We will be as simple and “down to the metal” as possible. Not a fan of ORMs, so this should be fun. Whatever SQL database you use, code should be similar or the same. Read my quick start post on the actual databases themselves MySQL and PostgreSQL to get started with either.

MySQL Quick Start and Cheat Sheet

Although my favorite SQL database is PostgreSQL due to its feature-rich capabilities and amazing performance, MySQL still has its benefits, especially in the replication side. In fact, Google Cloud SQL is only compatible with MySQL right now. If they offered PostgreSQL, I would not be writing this. But I’ll stop now on opinions. Let’s do a quick start, and compile a cheat sheet afterwards. Also, check out some tips I learned including some best practices.

Simple Way to Install VespaCP in Ubuntu

Vespa is one of the simplest and straightforward control panels in the market. Best of all, it is open source! Why did I choose it? I played around with 3 control panels and this did the job out of the box, without bugs or failures. Here’s a quick way to install it in your Ubuntu server. For more features, I suggest ISPConfig. If you want to go for paid? cPanel is awesome. Before you continue, check out my guide on how to secure your linux server.

Add Firewall to Linux Server with UFW

So, you have your own server? Setting up a firewall on your server is very important once it is up and running. Thanks to ufw, doing this is fairly easy! Don’t even think about making your server public without a firewall! Check out my previous post on securing your server to add more protection.

How to Harden and Secure Your Linux Server (Ubuntu/Debian)

Don’t let your server get hacked and lose all your hard work. Here’s a step by step way to harden and secure your Linux server - from networking, to permissions. For simple deployments and tests, check out Digital Ocean, my favorite platforms. Can’t beat $5/mo servers that deploy in less than a minute! By signing up through my link, you are helping extend the life of my servers. Thank you.

Send Email in Linux Without An SMTP Server

Typically, to send email, you would need an smtp server or connect to one. Let’s use Postfix to bypass that need. Basically, Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail. Let’s start.

How to run process in background?

I will show you a very quick and easy way to properly run your process in the background. You should not use this workflow in production, but for development and quick tests, this is perfectly suitable for you.

How to Merge Multiple Commits into one Git Commit?

To do this, we use the command git rebase. Typically, it is used to:

  • Edit previous commit messages
  • Combine multiple commits into one
  • Delete or revert commits that are no longer necessary

Let’s work through an example.

Should Table Names be Plural or Singular? What about Column Names?

Naming in programming is hard sometimes. I typically think about the future of the app, some “what ifs”, conventions and if it truly gives a good context for other developers or users. In the end, as long as everyone involved in the project is consistent and better yet, have things documented, then that typically outweighs hardlined rules. But here is a simple guide to help make your decisions.

Should Business Logic Be in Database? Pros and Cons

This debate has been labeled as the “Vietnam of Computer Engineering” and deservingly so. Here are some pros and cons I have learned.

Postgres Quick Start and Best Practices

Here is a 1500+ lines of PostgreSQL goodness. Want to add or change something? Create a pull request. I hope this helps!

Find Files, Texts, Processes in Linux

I’m building a “cheat sheet” on finding files, monitoring and everything related to that in Linux. Here’s some of them.

Better Git Commit Titles

For almost a year, I’ve been writing git commits in a more structured way. It has improved code reviews and skimming through code history. Inspired by angular commit messages, I adopted their commit message guidelines. Here’s are examples

How to update all Docker images

Currently, Docker does not have a command to do this so we will have to do some good old fashioned command piping.

Common Linux Commands

Expand this blog topic if you’d like to see the text version or read more.