Nurulazrad Blog

RSS

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.

enjoy!

Mar 3

Set the Time for an Instance - Amazon Elastic Compute Cloud

In case you have your own server hosted at Amazon EC2, please make sure you update the /etc/localtime file to match your local time. By default, it is set to “UTC” which is America time (if not mistaken).

Tutorial: Installing a LAMP Web Server - Amazon Elastic Compute Cloud

Amazon howto for installing LAMP Web Server on EC2. Good starting point for newbies.

Install Apache 2.4, PHP 5.4 & PHP-APC on Amazon EC2 with Amazon Linux AMI

Definitely one-stop solution to install Apache 2.4, PHP 5.4 (with APC) for Amazon EC2 instance (Linux).

What's new in Rails 4.1 - Coherence Blog

new feature in Rails 4.1. check it out!

ActionView::Helpers::NumberHelper

and also, if you want to format your data to percentage, currency or even to human size (I don’t recall such feature in cakePHP), well here’s the place.

The Developer Corner: Lower Case, Upper Case and Capitalize in Ruby

it’s a small note on using lower case, upper case and capitalize in ruby

Rails 4 TurboLinks and jQuery Dynamic Links Not Playing Nice - Stack Overflow

and so on my journey to Rails 4 has brought me to issue with jQuery and TurboLinks. Basically, when the page first load, it loads my datepicker script. Then once I do the update, the same page won’t load my datepicker anymore. A refresh action seems to clear the page and load my datepicker script.

Well, it turns out that having TurboLinks installed, will speed up your page, but it also caused conflict with jQuery. (I think, refresh action seems to clear the cache somehow).

Well, the solution is not that hard, instead of using jQuery(document).ready ... change it to jQuery(document).on 'page:load', -> will fix the issue

… the end