Skip to main content


Showing posts from 2017

The Tale of Jiraiya

Jiraiya is one of most favorite character in Naruto.

Kakashi Killed Rin

Kakashi is a scumbag. He killed Rin, let Obito died for saving his life, let Sasuke left from Konoha, but finally he became Hokage.

Important Records for Mail Domain Name

When you have a domain, for example, you can create your email address at that domain name like Several domain name records which I consider to be important for mail domain are:

1. MX Record
Of course, it assigns a domain where the mail exchange server is located. For example:
2. SPF Record
SPF is a spam and phishing scam fighting method which uses DNS SPF-records to define which hosts are permitted to send e-mails for a domain. See For example:

NameTypeDatayourdomain.comTXT"v=spf1 mx -all"
This configuration means emails sent from all servers defined in MX record of are permitted by sender organization

3. DKIM Record
DKIM allows an organization to take responsibility for a message in a way that can be verified by a recipient. DKIM defines a domain-level digital signature authentication framework for email through the use of pu…

Installing APCu in PHP 7

APCu is one of caching application for PHP. In this case, I use PHP 7.0 on Ubuntu 16.04. In PHP 7.0, this application is provided via PEAR.

First, install PEAR.

$ sudo apt-get install php-pear
Install APCu. If an error occured state that there's no phpize, you need to install PHP 7.0-dev which provide phpize support.

$ sudo apt-get install php7.0-dev $ sudo pecl install apcu
Create APCu module configuration in PHP modules directory.

$ sudo echo "extension =" >> /etc/php/7.0/mods-available/apcu.ini
Add that configuration to PHP FPM and CLI.

$ sudo ln -s /etc/php/7.0/mods-available/apcu.ini /etc/php/7.0/fpm/conf.d/30-apcu.ini $ sudo ln -s /etc/php/7.0/mods-available/apcu.ini /etc/php/7.0/cli/conf.d/30-apcu.ini
Restart PHP FPM.

Uchiha Madara

End of Madara

ESP-01 Flashing Circuit

ESP-01 board is different with NodeMCU DevKit (ESP-12E) board. It doesn't have USB support. You need a USB to TTL serial converter and certain circuit to switch the board between normal boot and flashing mode. You can buy a USB to TTL converter as cheap as $1 or you can utilize your current Arduino board.

First, I want to show my simple circuit using USB to TTL converter to flash ESP-01. I use Prolific USB to TTL. It's cheapest device you can get in the market. If you use this device on Windows operating system, you must check Device Manager and validate that the device isn't in error state. If it's error, you can use solution from HERE.

This following image shows the circuit for flashing ESP-01 using USB to TTL converter. I use external 3.3V supply because my Prolific can provide only 5V supply from USB and the current is too low.

If you are too lazy with push button and resistor you can use this following circuit.

In the second circuit you just need jumpers without …

X Japan

Besides clascisal music, I also like heavy metal music. X Japan is one of the most famous heavy metal band from Japan. I like most of its music. Its tone is strong and brings me certain feeling.

One of its songs which makes me fell in love with X Japan was Kurenai.

X Japan was formed in 1982. At the beginning, I don't really care about its member. Recently, when I watched 2000s concert videos, I just realized that one of its member, the guitarist, who used to appear with his blooming red hair was missing. Now I know that the guitarist, Hide, 33 years old guy, was dead in 1998 because of suicide, based on police evidence.

X Japan had been disbanded in 1997 and Hide had started a solo carreer since then. While he still had certain project with another music group in 1998, he was found dead in his house. His dead was followed by copycat suicide of three of his fans.

In 2007, X Japan was reinvented and launched a new album. In 2008 concert, there was something touching. Hide was recal…

Hardening SSH Security in Linux

SSH is a popular network protocol used to access remote computer through certain network or internet. OpenSSH is an application which provides SSH accesbility for a computer or server. Common method used to start a communication with SSH access is by providing username and password before secured connection is established. This method is not really safe because you provide credentials in plain text and transfer it through the network. It also makes any scumbag individuals to be easier to guess your password or perform brute force attack in order to gain your server access. There are several possible ways that I think can be used for hardening your SSH security.
Disable root accessChange SSH port numberUtilize RSA authenticationDisable plain password login Disable root access 1) Before you disable the root access, you need to make sure that there are another user account in your remote computer.

2) Create new user as needed.
$ adduser youruser 3) Edit SSH configuration in /etc/ssh/ssh…

Flashing NodeMCU Firmware on ESP Board

NodeMCU is popular firmware for ESP8266 WiFi SoC. When you buy a NodeMCU ESP8266 board, it must have been flashed with the firmware. But, you can also flash it anytime by yourself, for example when you want custom NodeMCU firmware. For complete documentation of NodeMCU you can see here. There are few steps to flash your board firmware. In this example, I use NodeMCU DevKit 1.0 with ESP-12E core which is easy to get in market. If you use ESP-01, you need to see my other post about the ESP-01 flashing circuit.

1. Build the firmware. The easiest way is building from the cloud, just follow the steps then the firmware will be sent to your email.

2. Install It is a python application to communicate with ESP ROM bootloader. You can install it either from python package manager using pip install esptool or download manually from github repository here.
$ git clone There are several  other tools that you can use to flash the firmware, for e…

Itachi Uchiha

Film Misteri Asia Terbaik

Akhir-akhir ini saya sedang tertarik menonton film-film misteri, horor, atau thriller asia. Berikut ini beberapa film-film misteri asia terbaik yang saya rekomendasikan.

1. Audition (1999)
Sebuah film thriller yang cukup menyeramkan (sadis) khususnya pada bagian akhir film. Bagian awal film banyak menceritakan kehidupan tokoh utama yang membuat kita penasaran tentang apa yang akan terjadi selanjutnya dan misteri apa yang akan terkuak. Film ini mengisahkan seorang pengusaha sukses yang istrinya telah meninggal sejak lama dan meninggalkannya seorang anak. Setelah lama sendiri akhirnya dia memutuskan mencari seorang pendamping. Setelah ia menemukan seseorang yang ia percaya cocok untuk dirinya, hal yang menyeramkan terjadi.

2. Lesson of the Evil (2012)
Film ini adalah sebuah film thriller misteri yang menceritakan seorang guru SMA yang tampil sebagai seorang yang baik-baik namun ternyata menyimpan suatu misteri yang menyeramkan. Pada awal film kita akan melihat seorang guru yang melindungi…

Setup MongDB on Windows

Download and install MongoDB. You can set custom installation directory or let default location in "C:\Program Files\MongoDB\Server\<version>".

Add "C:\Program Files\MongoDB\Server\<version>\bin" to environment variable.

Create directory for database data and log data. For example, database is in "C:\mongodb\data\db\" and log is in "C:\mongodb\log\".

Create MongoDB configuration file. For example, it is in "C:\mongodb\mongod.conf".

systemLog: destination: file path: c:\mongodb\log\mongod.log logAppend: true storage: dbPath: c:\mongodb\data\db
(CAUTION: Use spaces, not tabs)

Start the server by:

$ mongod --config "C:\mongodb\mongod.conf"
OR install it as a Windows service

$ mongod --config "C:\mongodb\mongod.conf" --install
Then, start the service.

$ net start MongoDB
To stop the service.

$ net stop MongoDB
To remove the service after stoping the service.

$ mongod --remove
If you want to add R…

Obito Uchiha


Enabling Single Webcam for Multiple Applications Access in Linux

A webcam can not be accessed by two or more applications simultaneously. The solution is you can duplicate the video stream and make it available for any application. In short, you create virtual webcam.
First, a webcam is commonly detected on /dev/video*. Before you go through the steps to duplicate video stream, you should check whether your webcam is working. You can try to capture video using VLC by this command. (For example, your webcam is on /dev/video0)

$ vlc v4l2:///dev/video0
If it doesn't work, you can try to change its mode to 0777 and make sure there's no other applications accessing it. If it still doesn't work, you can buy a new webcam. Seriously. Don't buy cheap and unknown-brand webcam. I have $5 webcam and it had wasted my time.

$ apt-get install ffmpeg linux-generic v4l2loopback-dkms
FFmpeg is main application that will access your webcam and duplicate its video stream. V4L2loopback is needed to create multiple virtual capture devices (loopback device…

Retrive Real Client IP in Nginx

Sometimes, your web application is installed in a web server which is behind reverse proxy server like Cloudflare or other services. In that condition, your application will always read the reverse proxy server IP as client IP. In Nginx, you can use ngx_http_realip_module to get the real client IP (see detail).

To enable this module, you need to make sure that you use latest Nginx server from repository or you can build it from source with --with-http_realip_module configuration parameter. I  prefer to install it from repository as Nginx 1.10.0 in Ubuntu 16.04 has enabled this module by default. You can check whether it's enabled or not by following command.

$ nginx -V
Then, the reslut should be like:

$ nginx version: nginx/1.10.0 (Ubuntu) ... ... --with-http_realip_module ... ...
Now, you can put the module configuration in http block or server block of your Nginx configuration. For example, you use Cloudflare service for your web application. You should list all available Cloudfl…

Setup Free SSL Certificate with Certbot

If you want to setup a site with HTTPS, you need a valid SSL certificate from Certificate Authority (CA). Let's Encrypt is a CA that can provide you a free valid SSL certificate by requesting it using certain software. The software which is recommended by Let's Encrypt is Certbot. From the main page of Certbot site, you can choose what web server and operating system you use then it will show you the installation steps. For example, I use Nginx on Ubuntu 16.04.

$ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update $ sudo apt-get install python-certbot-nginx $ certbot --nginx
Last command will get a certificate for you and have Certbot edit your Nginx configuration automatically to serve it. Sometimes, you may get error notes. It is about failure of integration process to existing web server configuration. It's not crucial cause you can integrate manually with simple steps. If you only want to get certificate…

Ini Tidak Sehat

Baru saja saya membaca sebuah berita tentang seseorang yang membantu pembiayaan tempat tinggal untuk sekelompok orang. Ini beritanya. Sementara, bangunan tempat tinggal itu adalah bangunan yang ia prakarsai sendiri untuk didirikan dan dijadikan tempat tinggal untuk sekelompok orang itu.

Tampaknya baik, kan? Itu pakai uang pribadi, lho. Pertanyaannya, sampai kapankah hal itu akan dilakukan?

Kondisi yang lebih sehat adalah ketika pembiayaan itu dibantu oleh anggaran pemerintah atau pemerintah menciptakan lapangan pekerjaan untuk orang-orang yang lahan pekerjaannya sudah hilang itu.

Ceritanya seperti ini. Ada seorang CEO yang perusahaannya mengalami defisit. Lalu dia merelakan sebagian gajinya dipotong untuk membiayai gaji stafnya. Dalam konteks perusahaan, ilmu kepemimpinan macam apakah ini? Jangan menyetujui atau menyukai sesuatu hanya karena sesuatu itu tampak baik atau sejalan dengan ego Anda. Sebaliknya, sang CEO harus dengan segera memulihkan kondisi perusahaan dan segera membayark…