Generate text to image in Go

In this blog post I will share how to generate text to image in Go programming language (Golang). I have previous and similar blog post using Python. You can check that post here. The reasons why I created this application is for me to share text content like Linux configuration and source code snippet in […]

Continue Reading…

Controller Request Mapping in Golang

Background I’ve been developing web applications using Java and Spring Framework and in 2019, I started using Golang in some of my projects. So far my experience with Golang is great but I miss the annotation that Spring framework provides particularly the @RequestMapping for URL mapping, @Bean and @Autowired for dependency injection. Most of the […]

Continue Reading…

Linux systemd for your Go application

Systemd is a Linux software suite that handles system services (daemon) and timers; it enables you to start, stop and restart your application using systemctl command. It can also start your application during operating systems boot-up sequence. Note that you will need to have root or sudo privileges for this operation. To create a systemd […]

Continue Reading…

Two-letter country codes

Happy New Year! I hope you’re having a great time. Today, I am updating my online tool, ip.johnpili.com to use Cloudflare’s Request Header, “CF-IPCountry” so that I can display the IP address together with the country. I also want to have my own two-letter country code on my website as quick reference. The table below […]

Continue Reading…

IP Address Classes

The table below shows the IP address classes. This could be handy for someone trying to remember possible IP ranges of a particular IP class. The first 8 bits of the IP address are used to determine the class. Class Address Range No. of Network Hosts A 1-126.x.y.z 126 16,777,214 B 128-191.x.y.z 16,384 65,534 C […]

Continue Reading…

How to setup static IP address on Red Hat Enterprise Linux 8

Setting up a static IP address on your RHEL or CentOS is simple. Prerequisite This how-to guide requires that you have administrative access to the Linux operating system. Steps 1. Inside the RHEL Operating system, open the terminal and head to /etc/sysconfig/network-scripts cd /etc/sysconfig/network-scripts Using ls command, you can see the available network devices. 2. […]

Continue Reading…

Notinaut an Arduino driven notifier

I bought this cheap keychain couple of months ago and thought it would be a nice weekend Arduino project. My idea is to modify this novelty device as a notifier to notify me when my Jenkins or software build is successful. It has a web interface and REST API. An astronaut keychain from a novelty […]

Continue Reading…

Create MySQL User and Grant Privileges

Let say that you wanted to create a MySQL user for example johnpili and assign privileges. You can do that using the simple code snippet below: mysql> CREATE USER ‘johnpili’@’localhost’ IDENTIFIED BY ‘Pass2Word3r’; mysql> GRANT ALL PRIVILEGES ON *.* TO ‘johnpili’@’localhost’; mysql> FLUSH PRIVILEGES; […]

Continue Reading…

Login as Jenkins in Linux Terminal

You may need to setup an SSH keys or environment variables to your Jenkins installations. One of the easy way to do this is to setup those environment variablesinside the jenkins user account. If you installed Jenkins in CentOS or Ubuntu via YUM or APT; These package managers will setup a jenkins user account without […]

Continue Reading…