08 February 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.
07 February 2017
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.
06 February 2017
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!
05 February 2017
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.
03 February 2017
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.
03 February 2017
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.
02 February 2017
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.
01 February 2017
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.
30 January 2017
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.
20 January 2017
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.
15 January 2017
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.
10 January 2017
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.
04 January 2017
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.
28 December 2016
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.
20 December 2016
This debate has been labeled as the “Vietnam of Computer Engineering” and deservingly so. Here are some pros and cons I have learned.
19 December 2016
Here is a 1500+ lines of PostgreSQL goodness. Want to add or change something? Create a pull request. I hope this helps!
15 December 2016
I’m building a “cheat sheet” on finding files, monitoring and everything related to that in Linux. Here’s some of them.
12 December 2016
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
06 December 2016
Currently, Docker does not have a command to do this so we will have to do some good old fashioned command piping.
04 December 2016
Expand this blog topic if you’d like to see the text version or read more.