Tutorials
Golang : convert int to string
While working on previous tutorial on displaying struct
values in string format with a method. I stumbled upon….... read more
Default cipher that OpenSSL used to encrypt a PEM file
Having generated couple of PEM files with OpenSSL for testing and writing tutorial purpose. Sometimes I wonder if OpenSSL has….... read more
PHP : Count number of JSON items/objects
Recently I need to paginate the search result returned by ElasticSearch. To paginate the result with standard CodeIgniter paginate helper....….... read more
PHP : How to parse ElasticSearch JSON ?
ElasticSearch returns search result in JSON format. To parse the items from the search result in PHP first you need….... read more
How to let Facebook Login button redirect to a particular URL ?
Facebook login is a popular way for web developer these days to capture user data and at the same time….... read more
PHP : How to check if an array is empty ?
In PHP, there are many times when I need to check if the return result array is empty or not.….... read more
Golang : Find network of an IP address
We will learn how to use Golang's net
package to find out the network behind an IP address. It is….... read more
How to enable MariaDB/MySQL logs ?
As a web developer that have been toying with MySQL/MariaDB for more than 5 years. I can tell you that….... read more
Setting $GOPATH environment variable for Unix/Linux and Windows
Go relies on one important environment variable called $GOPATH to determine where is the workspace located in your computer. To….... read more
Elasticsearch : Shutdown a local node
Elasticsearch is a fantastic tool for adding search and indexing capability to your website or application. Basically, it functions just….... read more
Golang : Clearing slice
Slice is something that I use frequently in Go and I always prefer slice to array at anytime. If you….... read more
PHP : See installed compiled-in-modules
PHP has compiled-in modules that allows it to perform various operation. If you want see what modules is linked to….... read more
PHP : Hide PHP version information from curl
By default, PHP will expose its version information when query by curl -I
and you may want to hide the….... read more
Golang : Get file permission
Get a file permission in Go is easy. In this tutorial, we will see how to read a file permission….... read more
WARNING: UNPROTECTED PRIVATE KEY FILE! error message
Was trying to ssh into my Amazon Web Services EC2 instances yesterday
ssh -i ec2-webserver.pem root@ec2-***.compute-1.amazonaws.com
and….... read more
Golang : Read file with ioutil
This tutorial will show you how to read a file into buffer and display the content in Go. This example….... read more
Unix/Linux : How to test user agents blocked successfully ?
This is actually a continuation from the tutorial on how to configure nginx to block certain user agents.….... read more
Facebook : Getting the friends list with PHP return JSON format
Problem :
How to get friends list in Facebook with PHP in Json format?
Solution :
Use Facebook SDK https://graph.facebook.com/me/friends