Nurulazrad Blog


How to fix issue with DB Storage Engine failure

I have done numerous LAMP stack installation and had no issue with MySQL until recently. Upon checking with the mysqld.log file, it seems my storage engine db init function returned error.

I’m not sure what would caused the issue here, but it seems my findings suggested that the mysql/data files that has something to do with the issue. Reading the log file points that the ib_logfile0 has different size.

So, since the mysqld is already at stopped, I just delete the following files:

  1. ib_logfile0
  2. ib_logfile1
  3. ibdata1

Using the following command to remote the files:

sudo rm /var/lib/mysql/data/ib*

Hope others find the article useful.

Angular, Backbone, or Ember: Which is Best for your Build?


With the release of our Shaping Up With Angular.js course, Code School has now produced a hat trick of courses focused on JavaScript frameworks. In order to choose which framework is right for your build, we’ve asked four important questions of each framework.



1. What is…


Since I’m so get used to CakePHP 2+ now, sometimes need to create new site but without using any database — just plain php.

Reason for using CakePHP instead of plain php is because I want to use the extends templates features and in case we need to use database, I can just update my default datasource.

At the moment, I just rely on the PagesController only.

Setup SSH to run on a non-standard port - nixCraft

ok… today I’ve learnt something new regarding accessing non-standard ssh port. Instead of append colon (:) at the end, you need to add ” -p ” option when executing shh command like so:

ssh -p port user@host

eg: ssh -p 1000 user@localhost

well, there’s always first time in everything.


Apr 9

Yum Command Check and Apply Only Security Updates

My Amazon friend just emailed me regarding security vulnerability in OpenSSL. At the moment we are not using it, but may it’s good time to do some updates on my servers.

I’m using the default Amazon Mirror Image (AMI), it’s based on Centos. So in this case, first I will run the following command:

yum --security check-update

#note: if the above command fails, you need to install the security plugin via this command: sudo yum install -y yum-plugin-security

This will lists all the required files to be updated. Next, execute the update command:

sudo yum --security update

#note: you must be a superuser to do this.

Wait for the installations, and you are done.


Apr 9

How to install PostgreSQL on Mac via Homebrew and gem

Just finished my Surviving Rails API course and downloaded the code from github. Currently, the database is set to use PostgreSQL. Not that I cannot changed to MySQL, but I just like to install stuff… =)

So, I’m on a Mac running Mountain Lion, (Maverick just too heavy for my machine) and got homebrew running — I always see if it can be brewed first, otherwise, you just need to compile it yourself.

First step is to make sure brew is updated by executing the following command:

brew update

brew doctor

Next, is to install the PostgreSQL. At this moment of writing, the stable version is 9.3.4. Executing the following to install

brew install postgresql

Wait till the installation to finished.

I followed Moncef Belyamani tutorial and installed Lunchy via gem.

gem install lunchy

Once the installation finished, you need to restart your terminal (in my case). From the command line, just execute . ~/.zshrc if you’re on ZShell.

Then to start and stop the PostgreSQL is a simple as:

lunchy start postgres

lunchy stop postgres

Hopes that’s help and enjoy!

Twitter / MacHomebrew: We now have a brew cleanup ...

… in case you too busy keeping your local softwares updated using brew upgrade, now is time to do some cleanup via brew cleanup.

how cool is that!

How to detect displays in OS X 10.8

In case you found the ‘detect displays’ button is missing, it is merely hidden. Right now, I’m using Mac OS X 10.8 - Mountain Lion, simply hit ‘Option’ key and the button changed from ‘Gather Windows’ to ‘Detect Displays’.

Hope this is what you looking for and enjoy!

Nested Resources

Nested resources in Laravel 4. Use dot when defining your resource routes.

Mar 3

textmate - Automatically Upload The File After Saving - Stack Overflow

I am still using Textmate-2 at the moment, no plan to switch to other software. Sometimes using vim when I’m accessing the server. Anyway, just a note if you’re using Textmate-2 and Transmit-4, you can use DockSend to push files to your remote server from the text editor — Ctrl-Shift-F and press 2.