17 8 / 2012
Zsh and slow git completion
I noticed that using Zsh give me slow access to my git repo or my command line for that matters. However, this fix seems to speed up my access to my git.
thanks!
17 8 / 2012
Fixing Error with Pow, RVM, Rack and Rails 3
So I decided to enable back POW for easy setting up rails app in my computer. POW allows you to have .dev which link back to your rails app directory. Also I’m using Powify gem by 37signals. Instead of using rbenv, I’m using RVM — don’t ask why.
My pre-rails-3 apps works ok except for latest one. Reason being, I need to add .rvmrc and .powenv in my root application directory. Once that done, my rails app works like a charm.
more links:
09 5 / 2012
Apache won't start with error - cannot modify limit
Ubuntu 12.04 LTS just relased last few days, so I decided to upgrade my current Ubuntu 11.10 to this release. If you new to Ubuntu, please take note that LTS refers to Long Term Support. In short, LTS versions are the most stable for production mode and it release one in two years time.
Well back to my issue, once i restart my apache2, it give me lots or error, this one refers to ULIMIT set at apachectl script. I’m no expert with Apache, but this fix is working.
19 4 / 2012
Brew PHP5.3 on OS X
update url to => https://github.com/josegonzalez/homebrew-php
Tired of getting to re-compiled all my PHP manually, since I’m using brew for updating my rails app, just googling if the same can be done for my php app — and yes, click on the link for more details
19 3 / 2012
Apple releases Safari 5.1.4 with improved JavaScript performance on OS X Lion (via The Verge)
28 2 / 2012
30 11 / 2011
How to install Drush server-wide in less than one minute
in short:
sudo wget —quiet -O - http://ftp.drupal.org/files/projects/drush-7.x-4.4.tar.gz | sudo tar -zxf - -C /usr/local/share
sudo ln -s /usr/local/share/drush/drush /usr/local/bin/drush
sudo drush
enjoy!
30 11 / 2011
Installing PECL uploadprogress Extension
I’m just updated my Drupal copy to version 7 recently and reliaze that I have not installed PECL uploadprogress library. A quick search on google give me the above url.
In short, just do the following:
- Download PECL uploadprogress library (uploadprogress-1.0.3.1.tgz)
- tar -zxvf uploadprogress-1.0.3.1.tgz
- cd uploadprogress-1.0.3.1
- phpize
- ./configure
- make
- sudo make install
next, you need to update your php.ini file and add the following line:
extension=uploadprogress.so
final step it to restart your apache server and you’re done!
06 10 / 2011
Steve Jobs 1955-2011 #SteveJobs #Apple #RIP
(Creator unknown. Discovered via @LeoLaporte)
29 9 / 2011
PHP DOCUMENT_ROOT in Windows Servers
Being a Mac user somehow makes you tend to forget others in Windows world. Recently, one of my app failed to redirect my script to proper url simply because it was not be able to detect $_SERVER['DOCUMENT_ROOT'] variable. I thot I have already fixed this, but unfortunately it is not or my assumptions was wrong. So, being a lazy developer, Googling surely help me and found this solution:
// let's make sure the $_SERVER['DOCUMENT_ROOT'] variable is set
if(!isset($_SERVER['DOCUMENT_ROOT'])){ if(isset($_SERVER['SCRIPT_FILENAME'])){
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
}; };
if(!isset($_SERVER['DOCUMENT_ROOT'])){ if(isset($_SERVER['PATH_TRANSLATED'])){
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
}; };
// $_SERVER['DOCUMENT_ROOT'] is now set - you can use it as usual...
Thanks to Fyneworks for the article – http://fyneworks.blogspot.com/2007/08/php-documentroot-in-iis-windows-servers.html

