Thinkpad - Set battery charging threshold in Linux

With kernel 4.17 above, we can set the threshold directly

$ echo 85 > /sys/class/power_supply/BAT0/charge_start_threshold
$ echo 95 > /sys/class/power_supply/BAT0/charge_stop_threshold

Read More

Activate Windows 10 in VirtualBox

I’m using Windows 10 in VirtualBox for testing purpose, where my main OS is formatted to Ubuntu.

I noticed I can activate the Windows 10 with the key sealed in hardware,
get the key with the follwing command

Read More

Web development testing in Android Virtual Device

Some time, we will need to test web development in mobile devices.
Previously, I used to test in iOS simulator, the virtual host will just work.

Read More

Install Arch Linux

First of all, I must say that I was referring OSTechNix for the installation guide.

But when I tried to install, I faced some minor issue, that’s why I write this post.
Also, I not follow everything from the guide (but most of the things)

Read More

Why Vue.js $emit not working

I’m working Vue with Laravel, creating a component (nested view), and try to handle the user event in the root (Laravel blade file).

Read More

Why Google Analytics pageviews different from filter by day and by month

I wrote a script to sync Google Analytics (GA) pageviews to own DB in daily basis.

  • 2019-12-01 -> 342 pageviews

Read More

Find out app API endpoint

Have you ever think of, to find out any app API endpoint?

I’m just know about this. I will be doing this in iPhone.

Download mitmproxy

mitmproxy is free & open source.

Read More

Becareful of JavaScript blocking the main thread

I’ve just made a mistake on production site, the client’s website.

I was working on a tracking script, which let client to include into their site.

Read More

How to prevent duplicated join of table in Laravel Query Builder

Laravel Query Builder is an awesome feature, really.

When comes to generate a complicated report, with complicated filter/sort, the code logic can be very confusing.

Read More

The efficient way to debug JS/CSS in production site

Recently I discovered this package, which allows us to run JavaScript & css in any domain.

Read More