Nurulazrad Blog

RSS
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

I see you reposted an article about installing RoR on Centos 5.6. I'm trying to follow the steps but have an issue with the gcc configure step. It gives me few warnings and then "configure: error: invalid variable name: `—prefix'". Any ideas to get past that?

hi there

maybe it could be from copy&paste? try to type in the command (and yes i know it’s painful). btw, i can’t seems to find the re-post link.

i think it should be ” --prefix ” with two ” - ” (single dash), instead of ” —prefix “ with long dash. 

please let me know if you managed to install it or need more help.

thanks

AWS with downgraded PHP5.2

So, we have some old server running on obsolete PHP version which happens to be PHP5.2. There’s some issue with application running and we need to fix it. I just recently upgraded my PHP to 5.4 since 5.3 also marked as archived by PHP.net.

Since I’m using AWS AMI, so google has point me to this site (http://forums.fedoraforum.org/showthread.php?t=240556) on how to downgrade my PHP5 installed.

Everything when ok when suddenly my configure command issue me “cannot find libmysqlclient" error. It turns out that, you need to specify the libdir variable, so by doing "ldconfig -v | grep mysql”. So I will add “—with-libdir=lib64”. Remember to remove “/usr" from the given path and if you are using 32bit, it should be in "lib" directory (if not mistaken).

./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local --with-libdir=lib64

So, configure action when well until it give me another error. This one is related to PHP need to be patched. Since, Im using 5.2.17, this site (http://www.litespeedtech.com/support/forum/showpost.php?p=74000&postcount=8)

wget https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
patch -p0 -b < txtbgxGXAvz4N.txt
make
make install

So, by patching the PHP, it helps me finished the installation. Finally, you need to chown /var/www/html so that you can upload files here and you’re DONE!

sudo chown -R ec2-user /var/www/html