Skip to main content

Posts

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. ...

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 lis...

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...

Books

I have liked reading books since I was a kid. Thanks to my parents, who let me buy any books and encouraged me to read. The bookstore has become one of my favourite places. I like to learn about any topics, not only about science or IT stuff. For me, reading a book isn't always intended to have possession of the topic, but it's for my personal pleasure and to build an insight into something. There are many things around us that we don't understand really well. If we try to figure it out by ourselves, we will waste most of our precious time. So, it's better to learn from the expert who has studied it well and then consider it with our common sense and logic. I grew up, many affairs had occurred, and shit happens. I realise that I have forgotten a lot of things. I likely tend to be aware of fewer things. So let me open a cupboard full of books which I've collected for a long time.

Master Slave Replication to Automatically Backup Your MySQL Database

We can make backup for some databases by periodically running a kind of dump query, like mysqldump in MySQL. That's the simplest method but it can drain our server resources and it's not suitable for large databases. MySQL comes up with master-slave features that allow you to replicate your database to another location (slave). This mechanism enables MySQL to generate a log file which records any action performed to the database. Then, that action will be run in slave database too. For example, we have two database servers with IP address 192.168.0.1 (Master) and 192.168.0.2 (Slave). 1) Configure my.cnf in master server # Master Settings # locate where the changes record will be stored log-bin = /var/log/mysql/mysql-bin.log # set unique ID for master database in master-slave network (up to you) server-id = 111 innodb_flush_log_at_trx_commit = 1 sync_binlog = 1 # select database which will be replicated # by default system will log all databases binlog-do-db = ...

Zurmo CRM wtih Nginx and PHP 7

Zurmo is one of open source CRM application based on PHP. Current application isn't supported for PHP 7 environment because some application scripts still implement unsupported (obsolete) PHP function such as mysql_connect , mysql_fetch_array , etc. First, we must change some scripts which still implement unsupported PHP 7 functions. The scripts are: app\protected\commands\tests\unit\DatabaseCommandTest.php app\protected\core\tests\unit\DatabaseCompatibilityUtilTest.php app\protected\core\utils\DatabaseCompatibilityUtil.php You can download the scripts from HERE . Second, if we run Nginx server, we can use this following configuration. server {         listen 443 ssl;         root /path/to/zurmo ;         index index.php index.html;         server_name yourdomain.com ;         ssl_certificate /pat/to/yourdomain.crt ;         ssl_certifi...

Generate .SQLITE File from .SQL File in Windows

You can generate .SQLite file from .SQL file by using SQLite-CLI. For that purpose, you need to prepare some gears as the following. 1. Sqlite 32-bit DLL 2. Sqlite Tool for Windows (Command Line Tools) You can download all needs from here . After you download the items, you need to extract them into a directory for example "C:\\sqlite". Now, in you directory, you will have sqldiff.exe, sqlite3.def, sqlite3.dll, sqlite3.exe, and sqlite3_analyzer.eze. Next, you should add "C:\\sqlite" or your own location into PATH data in Windows environment variable so you can access "sqlite3.exe" from command prompt without full path declaration. In command prompt you can type sqlite3 then the following messages will appear. SQLite Messages Now, you are in SQLite command terminal. First, you need to open the SQL file. Your opened file will be assigned into an in-memory database. Then you can save that in-memory database into a SQLite file. Before you open...

Upgrading PHP 5 to PHP 7 in Ubuntu

PHP 7 comes with a new version of the Zend Engine, numerous improvements and new features such as: Improved performance: PHP 7 is up to twice as fast as PHP 5.6 Significantly reduced memory usage Abstract Syntax Tree Consistent 64-bit support Improved Exception hierarchy Many fatal errors converted to Exceptions Secure random number generator Removed old and unsupported SAPIs and extensions The null coalescing operator Return and Scalar Type Declarations Anonymous Classes Zero cost asserts Today (12 April 2016), latest Ubuntu release doesn't include PHP 7. You can install PHP 7 from third-party repository such as PPA. PPAs are not bound by the release schedules or policies of Ubuntu so they are free to change versions more frequently, among other things. Ondrey PPA is a popular way of staying more up to date with PHP. Ondrey is the official owner of the PHP tree in Debian, which is upstream from Ubuntu. To install PHP 7 in Ubuntu you can do the following: ...

Setting Up SSL Certificate

Nowadays, an SSL certificate which is usually used for HTTPS connections become pretty important. Even Google starts to give a ranking boost to secure HTTPS/SSL sites . There are several cheap certificates that you can buy like Comodo PositiveSSL. I usually buy cheap certificates from Namecheap.com  which provides SSL certificates as low as $4/year. After you buy the certificate, you need to set up your server. Here are the steps to set up an SSL certificate on your server. 1. Purchase the certificate You can buy the certificate from Namecheap.com . After you buy it, you need to activate your certificate by providing your generated CSR file. 2. Generate private key and CSR file In a Linux server, you can run the following command on the terminal to generate a private key and CSR file. $ openssl req -new -newkey rsa:2048 -nodes -keyout mydomain.com.key -out mydoain.com.csr   When you run the command, you will be asked for Country ID, domain name, registrant...

Proxy Configuration for Git, NPM, and Bower

If you are in a suck place with proxy, you need to configure proxy setting for your repository and package manager tools such as git, npm, or bower. Git You can use this command to set configuration globally git config --global http.proxy http://username:password@proxy.server.com:8080 git config --global https.proxy https://username:password@proxy.server.com:8080 Command to unset git config --global --unset http.proxy git config --global --unset https.proxy Command to check the value git config --global --get http.proxy git config --global --get https.proxy NPM Command format npm config set <key> <value> npm config get <key> npm config delete <key> npm config list npm config edit Command to set (don't forget to include quote and trailing slash) npm config set proxy "http : //username:password@proxy.server.com:8080/" npm config set https - proxy "http : //username:password@proxy.server.com:8080/" Bo...