Gangmax Blog



| Comments

ZooKeeper is a high-performance coordination service for distributed applications. It exposes common services - such as naming, configuration management, synchronization, and group services - in a simple interface so you don’t have to write them from scratch.


| Comments

Lombok is a Java library which provides a set of annotations with which you can simplify your Java code(get rid of “getter/setter/equals/hashcode” and etc) by using the annotations, after that Lombok will generate the boilerplate code for you during the compiling/building time(“compile” for “Eclipse/IntelliJ IDEA with plugins”, “build” for “Maven/Gradle”) with the annotation information. Then you can use the Java classes as vanilla Java classes.

Introspect Gradle Script

| Comments

It’s difficult to figure out how a Gradle script works as a pure Groovy script. Such as, where are the “buildscript/task/project/allprojects/subprojects/dependencies” functions defined, if they are function calls really?

Expose Static Resources in Grails

| Comments

Recently, I’m working on a project in which I use Grails to implement RESTful API back-end with the “rest-api” profile. It’s simple and works well, until the frond-end developer asks me to intergrate the front-end implementation(React with “javscript/css/font/image”) files into the back-end Grails project.

Pyenv Migration

| Comments

When installing a new Python version with pyenv, you may need to migrate all the installed packages from a previous Python version to the new one. For an example, I had Python 3.5.2 and installed a lot of packages with pip. After I install Python 3.6.0, I want to make the new Python have all the packages under the Python 3.5.2 version.

NVM: Node Version Manager

| Comments

NVM” is the “node.js” equivalent as RVM for Ruby or pyenv for Python. The following code shows how to install and use it.

# 1. Install.
curl -o- | bash
# 2. List all available versions.
nvm ls-remote
# 3. Install a version.
nvm install v6.9.4
# 4. Use a specific version.
nvm use 6.9.4

More information can be found in the official document here.