Tutorials

golang.pngGolang : Lock executable to a specific machine with unique hash of the machine

21st September 2017

Problem:

Got a friend that was looking for ways to lock her Golang executable to a specific machine at her….... read more



golang.pngGolang : Capture text return from exec function example

20th September 2017

Problem:

You want to capture the text result return by exec function. How to do that?

Solution:

The code….... read more



golang.pngGolang : Test a slice of integers for odd and even numbers

20th September 2017

Got this question from one of my students and he is from a disadvantaged background(he is a refugee). He wanted….... read more



golang.pngGolang : Execute terminal command to remote machine example

6th September 2017

Problem:

You need to query a remote machine with ssh to extract information such as memory usage or CPU information.….... read more



golang.pngGolang : Verify Linux user password again before executing a program example

4th September 2017

One of my previous tutorial shows you how to restrict a program execution to root only and this can….... read more



golang.pngGolang : Check a web page existence with HEAD request example

30th August 2017

There are times when we need to check if a web server is up and running first before querying further….... read more



golang.pngGolang : Submit web forms without browser by http.PostForm example

30th August 2017

Writing this tutorial on how to submit a web form without using a browser. We submit web forms almost every….... read more



golang.pngGolang : Print instead of building pyramids

29th August 2017

Building a pyramid using ancient Egyptians way can be too difficult for more software developers. Just for fun, let's print….... read more



golang.pngGolang : Calculate percentage change of two values

28th August 2017

Here is a simple example on how to calculate the percentage change from two numbers. If the result is positive….... read more



cloudflare.jpgCloudFlare : Another way to get visitor's real IP address

27th August 2017

Problem:

Your web server's log such as NGINX's access.log is showing unusually high and intense query from a couple of….... read more



golang.pngGolang : Join lines with certain suffix symbol example

23rd August 2017

For this tutorial,we will learn how to join lines of text into a string and also explore the option to….... read more



golang.pngGolang : Convert seconds to human readable time format example

3rd August 2017

Occasionally in the scientific world, we will encounter instruments that gave reading in seconds denomination and in this tutorial, we….... read more



golang.pngGolang : Login and logout a user after password verification and redirect example

2nd August 2017

Writing this tutorial for my own future reference. User name and password authentication is a fairly common task for any….... read more



golang.pngGolang : Get remaining text such as id or filename after last segment in URL path

1st August 2017

Problem:

Retrieving the last segment/part or the remaining text after a slash in the URL or filename in a path….... read more



golang.pngGolang : Roll the dice example

20th July 2017

Just a simple example on how to simulate dice rolling. Useful in situation where you need to use random single….... read more



golang.pngGolang : Convert string slice to struct and access with reflect example

19th July 2017

Writing this down here for my own future references. Basically, what this code does is to convert a given string….... read more



golang.pngGolang : Scramble and unscramble text message by randomly replacing words

19th July 2017

For this tutorial, we will learn how to make a text string unreadable by replacing some of the words inside….... read more



golang.pngGolang : Sort words with first uppercase letter

18th July 2017

Problem:

You use the sort.Strings() function to sort a slice of words. However, you noticed that words with the first….... read more



Advertisement

Advertisement

Subscribe Newsletter