Skip to main content

Posts

Showing posts from August, 2017

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 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 esptool.py. 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 https://github.com/espressif/esptool.git There are several  other tools that you can use to flash the firmware, for e…