Slick Carousal in RTL Mode


img_0448I have been scratching my head all night to get this thing fixed! We have been using Slick Carousal in one of our projects and it breaks whenever ‘dir=”rtl” is injected into the body tag.

I wish I had came across this before because it costed me a good night sleep and 2 cups of coffee to make it work in the arabic version of the website.

The solution was plain simple, you basically have to use the following option when initializing the carousal:


rtl: true 




Creating a Bootable Ubuntu USB Drive, for PC, on a Mac


Tried UNetbootin but didn’t work out! Command Line saved the day yet one more time.


  • Download Ubuntu ISO
  • Convert the Downloaded File Format
    hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso
  • Determine the Device Node for the USB Drive
    diskutil list
  • Unmount the USB
    diskutil unmountDisk /dev/diskN
  • Create the Bootable USB Drive
    sudo dd if=/path/to/ubuntu-14.04-desktop-i386.dmg of=/dev/rdiskN bs=1m
  • Prepare to Remove the USB Drive
    diskutil eject /dev/diskN

Regarding the dialogue box, click Ignore to get rid of it.

How to fix PHP.INI that is not updating in an apache mac setup


If you issue the following command in terminal:

php --i | grep ini

This will show you the loaded pho configuration file. My output was this:

Loaded Configuration File:         /usr/local/etc/php/5.6/php.ini

But when I upgraded my MacOS from El Capitan to Sierra, updating the above file didn’t reflect any change on my development websites. WordPress was still showing 2 MB even though I was using the following:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

After googling here and there, I found a solution. Thanks to Gergely on stackoverflow here.

First use phpinfo to find out the current loaded file.

You would see:

Loaded Configuration File  None

now open your terminal:

cp /etc/ /etc/php.ini

Thats it. Make any change to the newly copied file and it would update in the webserver without any issues 🙂

How to allow an user to SSH to an EC2 Ubuntu instance?

By default ubuntu instances on amazon aws allows only ubuntu user to login through ssh. This is done using the SSH key provided during the initial setup of the instances. There will be scenarious where you would like to create new users. But login through ssh is not enabled by default. To enable it, follow these instructions:

Open the following file:

sudo nano /etc/ssh/sshd_config

Search and Change the following (you can use Ctrl+w to search inside nano)

PasswordAuthentication no


PasswordAuthentication yes

Reload Apache

sudo restart ssh

Workaround: jQuery Select2 doesn’t let user to select option after unselect when maximumSelectionSize is used

jquery-v3I am using jQuery Select2 plugin, for select boxes, on one of my projects. The best thing I like about this plugin is that it allows the user to search through a multiple select box. Also the user doesn’t have to use the (CTRL+Click) combination to select multiple options. But today, I just came across a problem when I was trying to limit the number of options a user could select. I wanted the user to select only a single option on the multiple select box. And thankfully, Select2 has something called maximumSelectionSize which we can simply pass to the constructor.