Tutorials
PageSpeed : Clear or flush cache on web server
Have to migrate one of my website to a new server(droplet) recently when the original server was corrupted by broken….... read more
Javascript : How to check a browser's Do Not Track status?
Problem :
You work for an advertisement network and you want to respect a visitor's Do Not Track status. How….... read more
Golang : Convert octal value to string to deal with leading zero problem
Problem :
You have some integer variables or input data that starts with zero and they are causing some funky….... read more
Golang : Dealing with postal or zip code example
Problem :
For some countries, the postal code
or zip code
starts with zero and this can be problematic for….... read more
Golang : Fix type interface{} has no field or no methods and type assertions example
For new comers to Golang exploring interface{}
for the first time or if you ever use interface{} to handle some….... read more
Golang : Convert PNG transparent background image to JPG or JPEG image
For this tutorial, we will learn how to convert PNG image file to JPEG image file. Because JPEG format does….... read more
Golang : Convert date format and separator yyyy-mm-dd to dd-mm-yyyy
Feeling bored today and just want to play around with date formats. It seems that Golang's time package….... read more
Golang : Linked list example
In Golang, I would say that slices superseded list.... as slices would allow you to dynamically resize, pop, push, cut,….... read more
Golang : Create and resolve(read) symbolic links
Creating new symbolic link for a file and resolving(read) symbolic link back to the origin file is pretty straight forward….... read more
Golang : Change file read or write permission example
Problem :
You have a file and you need to change a file read, write or execute permission. How to….... read more
Golang : Test file read write permission example
Problem :
You need to test if a file has the correct write or read permission before performing write or….... read more
Golang : Handle API query by curl with Gorilla Queries example
This is an add on for previous tutorial on how to use Gorilla mux example. One reader emailed….... read more
Golang : Set or add headers for many or different handlers
Problem :
In Golang, setting headers can be done easily with the Set() method.
At the moment, you are setting….... read more
Unix/Linux : Use netstat to find out IP addresses served by your website server
Problem :
You want to know if the real-time connection information served by Google Analytics is accurate and you need….... read more
Golang : Flush and close file created by os.Create and bufio.NewWriter example
Whenever a new file is created by os.Create()
function and data being written to the file with bufio.NewWriter()
. It is….... read more
Golang : Launch Mac OS X Preview (or other OS) application from your program example
Problem :
You are building a program that specifically target an operating system and you want to invoke another application….... read more
Golang : Convert file unix timestamp to UTC time example
This tutorial is my own notes from helping out a friend from my working days in Indonesia. Putting it here….... read more
Golang : Marshal and unmarshal json.RawMessage struct example
Golang's json.RawMessage type is a good way to deal with generic JSON objects other than interface{}. There are times when….... read more