Gangmax Blog

Export Web Page to PDF with Headless Google Chrome

Headless browsers provide automated control of a web page in an environment similar to popular web browsers, but are executed via a command-line interface or using network communication. They are particularly useful for testing web pages as they are able to render and understand HTML the same way a browser would, including styling elements such as page layout, colour, font selection and execution of JavaScript and AJAX which are usually not available when using other testing methods.

Remove Dependencies with Package Using Python pip

When running “pip uninstall ppp” to remove a Python pip package, unlike “apt-get remove uuu”, it seems it removes the package only without its useless depending packages, which will leave unused files there. How to improve it?

How to Return Multiple Values from A Java Method

Every Java programmer knows the short answer(and the easiest one) is to create a class with multiple properties each of which is one value that you want to return in the method, and then you return an instance of this class from the method. But in many cases the returned values is just used one time, in such scenarios creating a class is too heavy and unnecessary. In Python, it’s very elegant to return a tuple in such scenarios. But in Java, what is the most elegant way to do it?

Update ca-certificates

Today after running “sudo apt-get update & sudo apt-get dist-upgrade”, the “ca-certificates” package is updated with the following output.