Skip to main content

Posts

Showing posts from 2016

I Love Books

I like reading books since I was kid. Thanks to my parents that let me bought any books and embraced me to read. Bookstore becomes one of my favorite place. I like to learn any topics, not only about science or IT stuffs. For me, reading book isn't always intended to have possession in the topic, but it's for my personal pleasure and building an insight of something.


There're many things around us that we don't understand really well. If we try to figure it out by our selves, we will waste most of our precious time. So, it's better to learn from the expert who have studied it well then considering it with our common sense and logic.

I grow up, many affairs had occured, and shit happens. I realize that I have forgotten a lot of things. I likely tend to aware on less things. So let me open a cupboard full of books which I've collected since long time ago.

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 = my_blog binlo…

Tulisan Seorang Seniman

Dalam tulisan saya yang lalu, saya menyampaikan bahwa saya dapat dengan mudah menunjukkan kesalahan logika dan kurangnya pemahaman seseorang berdasarkan tulisannya yang beredar di sosial media. Setelah beberapa waktu, saya jadi terpancing.
Mungkin sebagian orang banyak yang sudah membaca tulisan di atas sebelumnya di sosial media. Paragraf pertama, "Apa yang saya lakukan jika agama saya dihina?" Diam adalah sesuatu yang tidak logis. Jika agama Anda dihina berarti ada seorang penghina. Maka yang logis untuk dilakukan adalah menegur penghina tersebut. Tidak hanya soal agama, apapun itu, misal seseorang menghina pakaian Anda, Anda harus menegurnya dan menyampaikan bahwa menghina itu tidak baik. Khusus untuk penistaan agama, ada undang-undang KUHP 156, dan contoh kasus yang pernah terjadi terkait UU ini adalah seperti pada tautan berikut http://www.bekasimedia.com/di-bali-perempuan-kristen-dipenjara-14-bulan-karena-menghina-agama-hindu/.

Paragraf kedua dan ketiga, hal yang tidak…

Menangis

Sudah lama saya tidak mengisi blog karena kesibukan. Hari ini, seperti hari-hari biasa, saya melakukan rutinitas saya yaitu ngoding. Sesekali saya buka sosial media karena penasaran dengan perkembangan demo hari ini. Tapi sayangnya tidak semua yang dibagikan teman-teman saya di sosial media seperti Facebook atau Path adalah sesuatu yang layak dilihat.

Ada beberapa konten yang menghina, merendahkan, dan membuat lelucon atas demo hari ini. Lalu saya mengingat-ingat siapa saja yang hadir dalam demo hari ini. Ada ustad Aa Gym, ustad Arifin Ilham, dan tokoh-tokoh lainnya. Seketika itu saya langsung menangis. Saya jadi tidak fokus untuk melanjutkan pekerjaan dan memutuskan menulis tulisan ini.

Apa yang membuat saya menangis? Saya tidak pantas dibilang orang yang baik, saya juga tidak pantas disebut muslim yang taat, tapi saya selalu mengagumi dan hormat kepada orang-orang baik seperti ustad-ustad itu. Saya sangat sadar bahwa pembangunan itu tidak hanya soal jembatan, gedung, pelabuhan, dan …

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.phpapp\protected\core\tests\unit\DatabaseCompatibilityUtilTest.phpapp\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_certificate_key /path/to/yourdomain.key;
        access_log /var/log/nginx/yourdomain-access.log;         error_log /var/log/nginx/yourdomain-error.log  error;
  …

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.
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 the SQL file, you need to make …

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.6Significantly reduced memory usageAbstract Syntax TreeConsistent 64-bit supportImproved Exception hierarchyMany fatal errors converted to ExceptionsSecure random number generatorRemoved old and unsupported SAPIs and extensionsThe null coalescing operatorReturn and Scalar Type DeclarationsAnonymous ClassesZero 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: 1. Add PPA repository $ sudo apt-get …

Setting Up SSL Certificate

Nowdays, SSL certificate which is usually used for HTTPS connections becomes pretty important. Even Google starts to give a ranking boost to secure HTTPS/SSL sites. There are some cheap certificates that you can buy like Comodo PositiveSSL. I usually buy cheap certificates from Namecheap.com which provides SSL certificate as low as $4/year. After you buy the certificate, you need to setup your server. Here are the steps to set up SSL certificate on your server.
1. Purchase the certificate You can buy 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 linux server, you can run following command on terminal to generate 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 email, etc. For the domain name, you have to fill it with vali…

Losers

Ana said to Betty that Betty is her friend. Betty believes to Ana's words. Betty is a good girl. She also has spacious knowledge in many fields so that she always does good things to everyone. 
One day, Clara came to Ana and said that Betty is a bad girl. Ana was agreed with Clara. Ana always likes what Clara said whether it was wrong, fake, or manipulative. Even though Ana looks down on Betty, Ana always be nice in front of Betty so she can still get benefits from Betty. Clara usually talks about godliness things although her appearance or her doing is far from the teachings of God entirely. It also proves that she is fake or manipulative.
Therefore, Ana becomes a loser and Clara is a kind of witch. They become a solid loser team.
It's just like what The Secret teaches us. Bad one always attract bad one.  Lowly one always like to be around with lowly one.