[56] Results

Golang : How to make a file read only and set it to writable again?

golang permission file-is-readonly writable

Problem:

You want to set a file to read-only mode and also want to test if a file is really….... read more


Golang : How to validate URL the right way

golang validate-url govalidator is-url

Validating input from user or external sources is critical and needed to ensure that your program will not simply process….... read more


Fix "Failed to start php5-fpm.service: Unit php5-fpm.service is masked."

php fpm service-is-masked

Problem:

Encounter this error message :

Failed to start php5-fpm.service: Unit php5-fpm.service is masked.

after upgrading Ubuntu with do-release-upgrade.... read more


CodeIgniter/PHP : Create directory if does not exist example

codeigniter php is-dir mkdir create-directory

Problem :

How to check if a directory exist or not? If not, how to create a directory?

NOTE :

.... read more


Golang : get the current working directory of a running program

golang executable file-path

Problem :

You are looking for way to get the folder/directory of the running program.

Solution :

Use https://bitbucket.org/kardianos/osext.... read more


Golang : Check to see if *File is a file or directory

golang file directory

Sometimes, we need to write codes that is robust and flexible enough to handle different situation. For example, if a….... read more


Golang : Simple File Server

golang file-server

Got a request from a developer friend yesterday on how to open up part of his machine and turn into….... read more


Golang : Save(pipe) HTTP response into a file

golang http file

Problem :

You want to save or pipe a website content via http.Get() function to a file for processing.

Solution….... read more


Advertisement