Skip to main content

Posts

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. Rubbish is not extraordinary thing. Trailer Kakashi Killed Rin

Important Records for Mail Domain Name

When you have a domain, for example,  yourdomain.com , you can create your email address at that domain name like yourname@yourdomain.com . 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: Name Priority Type Data yourdomain.com 10 MX mx.yourdomain.com 2. SPF Record SPF is a spam and phishing scam fighting method that uses DNS SPF records to define which hosts are permitted to send e-mails for a domain. See http://www.openspf.org . For example: Name Type Data yourdomain.com TXT "v=spf1 mx mx:yourdomain.com -all" This configuration means emails sent from all servers defined in the MX record of yourdomain.com are permitted by the sender organization 3. DKIM Record DKIM allows an organization to take responsibility for a message in a way t

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 = apcu.so" >> /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 from NodeMCU DevKit (ESP-12E) board. It doesn't have USB support. You need a USB to TTL serial converter and a 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 a USB to TTL converter to flash ESP-01. I use Prolific USB to TTL. It's the 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 an error state. If it's an error, you can use the solution from  HERE . The following image shows the circuit for flashing ESP-01 using a USB to TTL converter. I use an external 3.3V supply because my Prolific can provide only a 5V supply from USB and the current is too low. USB to TTL to ESP-01 If you are too lazy with push-button and resistor you can use the followin

X Japan

Besides classical music, I also like heavy metal music. X Japan is one of the most famous heavy metal bands from Japan. I like most of its music. Its tone is strong and brings me a certain feeling. One of their songs that makes me fell in love with X Japan was Kurenai. X Japan was formed in 1982. In the beginning, I don't really care about its member. Recently, when I watched 2000s concert videos, I just realized that one of its members, 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 career since then. While he still had a certain project with another music group in 1998, he was found dead in his house. His death was followed by the copycat suicides of three of his fans. In 2007, X Japan was reinvented and launched a new album. In the 2008 co

Hardening SSH Security in Linux

SSH is a popular network protocol used to access remote computers through certain networks or the internet. OpenSSH is an application that provides SSH accessibility for a computer or server. A common method used to start a communication with SSH access is by providing a username and password before a secured connection is established. This method is not really safe because you provide credentials in plain text and transfer them through the network. It also makes it any scumbag individuals be easier to guess your password or perform a 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 access Change SSH port number Utilize RSA authentication Disable plain password login Disable root access 1) Before you disable the root access, you need to make sure that there is another user account on your remote computer. 2) Create a new user as needed. $ adduser youruser 3) Edi

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 it  here . There are a 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 the 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 to build from the cloud , just follow the steps then the firmware will be sent to your email. 2. Install esptool.py. It is a python application to communicate with the 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 https://github.com/espressif/esptool.git There are several other tools that you can use to

Itachi Uchiha

The Real Hero of Konoha

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

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.

Obito Uchiha

Evolution Kid Obito Obito with White Zetsu Masked Obito Obito Jinchuriki Obito and Black Zetsu End of Obito

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 a 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 are no other applications accessing it. If it still doesn't work, you can buy a new webcam. Seriously. Don't buy a 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 the main application that will access your webcam and duplicate its video stream. V4L2loopback is needed to create multiple virtual capture devic

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

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 cer