Improve your code quality with LGTM

What is LGTM?

LGTM (LGTM dot com) is a platform that provides useful insights and code quality information for all sorts of people participating in software development.

  • Use open source libraries and frameworks in private projects and want to know how well they’re being maintained
  • Contribute to open source repositories and want to find out about the quality of the code you contribute
  • Own or administer a public Git repository and want to integrate code quality analysis into your pull request review workflow
  • Want to join the debate on how to define good quality code

Currently LGTM supports to analyze code bases written in C/C++, C#, Java, JavaScript/TypeScript and Python. You can easily integrate LGTM with Github to automate the code analyzing process and review the code quality on each submitted Pull Request before merging.

Read More

Share Comments

Import existing AWS infrastructure into terraform

Amazon Web Services (AWS)

Amazon Web Services (AWS) is an on-demand cloud computing platform that offers us a lot of helpful and reliable services. AWS has friendly web interface which user can easily interact with to create virtual machines, networking stuffs, security policies, etc. However, in order to manage all the AWS configuration and keep track of the changes, it is neccessary to work with 3rd party tool like Terraform.

Terraform

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. You can see here the list of supported providers.

If you are building your IT infrastructure on AWS from scratch with Terraform, it is great, you don’t need to follow this article. But if you already had an existing aws infrastructure and now want to manage with Terraform, you might want to read more :-).

Read More

Share Comments

Fixing the issue with Kong deployment as a reverse proxy for Docker registry

What is Docker registry?

The Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. The Registry is open-source, under the permissive Apache license.

What is Kong?

Kong is one of the core technologies used by Mashape to power API request from developers. It is often described as a “drop-in replacement for expensive proprietary API management systems.” The rough idea behind Kong is to give developers a centralized management layer for microservices and APIs.

Why using Kong as reverse proxy for Docker Registry?

Read More

Share Comments

Learning Rust

This post is not a tutorial, it is just my notes during the time i learn Rust. Glad if you found it useful.
If you are finding how to run Rust on your machine, take a look at my previous article to see how to install Rust programming language.

Why did i choose Rust?

I am an Enginner who love programming and building reliable systems. My favorite language is Python, i have written a lot of application based on Python. However, Python is an interpreted language, it is slow. In order to build applications for a high performance system, we have to use compiler language. There are several compiler language such as C, C++, Java, etc but i found Rust is morden and easy to use. Rust can run on both Windows and Unix also.

One of my favorite developement case is building web application. I am good with Python Flask. It is a great framework but i found Rust is able to do the same job. For example, we have Rocket for the web framework, Diesel for the DB ORM and Tera for the template.

For three years in a row. Rust has been voted the most loud language on Stack Overflow’s developer survey. It runs blazingly fast, prevents set falls and guarantees threat safety. It’s a completely open source language and used widely across the world for systems programming.

Read More

Share Comments

Change MySQL Server authentication plugin for root user

Start from MySQL Server 5.7, if we do not provide a password to root user during the installation, it will use auth_socket plugin for authentication. With this configuration, MySQL won’t care about your input password, it will check the user is connecting using a UNIX socket and then compares the username. If it is match, you are authenticated!

Error when login to mysql root user from normal linux user account.

Read More

Share Comments

Install Rust programming language

Rust is an open-source systems programming language that focuses on speed, memory safety, and parallelism. Developers use Rust to create a wide range of new software applications, such as game engines, operating systems, file systems, browser components and simulation engines for virtual reality.

It is simple to install Rust on Linux or macOS machine. To install Rust, run the following in your terminal, then follow the onscreen instructions.

Read More

Share Comments

Query Azure Marketplace image URN with PowerShell

A Marketplace image URN in Azure has the following attributes:

  • Publisher - The organization that created the image. Examples: Canonical, MicrosoftWindowsServer
  • Offer - Name of a group of related images created by a publisher. Examples: Ubuntu Server, WindowsServer
  • SKU - An instance of an offer, such as a major release of a distribution. Examples: 18.04-LTS, 2016-Datacenter
  • Version - The version number of an image SKU.

If you are developing or using an application that need to access the Azure Marketplace image, you would need to use image URNs. Following is the steps to indentify an image URN

Read More

Share Comments

Hello World!

This is my very first post to test new blog engine. Let’s check it out…

“Hello World” in different programming languages

Read More

Share Comments