Wednesday, October 26, 2016

[IONIC] Using Google Maps on Ionic App - Adding Fixed Center Marker

Now that we have created an ionic app with Google Map, let's add some feature to it. Google Maps API itself supports dropping markers in the map, but there is no way make it fixed to the center like the Uber app(see image below). In this post, I'll write about how to add a fixed center marker. 


Saturday, October 22, 2016

[IONIC] Using Google Maps in Ionic App

In upcoming multi-series part, I'll write about how to create an ionic app with google maps. In this 1st part, I'll write about the basic of getting Google Map into app ionic app.

Sunday, October 16, 2016

[JAVA,SPRING] Intercept and modify @ResponseBody before sending it back

So I got this idea to have a single common place to modify all my ResponseBody before sending it back to the caller. Initially I thought I can use Spring's HandlerInterceptor but I found out that ResponseBody can only be read once. Once it is read by HandlerInterceptor class, the ResponseBody will be gone. After much googling, I found out there are few solution to this. First is to implement a filter class. Another way is using ControllerAdvice classes which I will share below.

Friday, October 7, 2016

[SCRIPTHACKS] How to quickly change DNS with Windows batch script.

There is probably a few reasons you might want to change DNS on your PC from time to time. For me, I use it to circumvent, region blocking on streaming services. However to change the DNS manually every time manually is tedious. SO I wrote a simple batch script to help me change the DNS in just 2 clicks away.

Thursday, October 6, 2016

[JAVA] Encrypt/Decrypt With PGP On The Fly

Recently I've been working on a project that need to do PGP encrypt/decrypt. The best solution that I found is here. However the downside is the data need to be written to a file. I've modified the file so that encrypt/decrypt can be done on buffered streams. Below is how I do it.