irakli's blog

Best jQuery Book Ever

An absolutely awesome jQuery book: http://jqueryenlightenment.com/

It's this simple: if you are a Web developer, you need this. And you will support the project. And PDF version is dirt-cheap.

Prevent Terminal from timing-out SSH on Mac.

If you use Terminal application on Mac OS-X to connect over SSH, you have most probably been annoyed by closed connections. Following is a quick recipe to prevent timeouts:

Open Terminal

> sudo vi /etc/ssh_config

Edit the file to make lines 20-21 look like:
Host *
    ServerAliveInterval 5

Save file and restart Terminal. Your connections won't time-out nearly as frequently.

Font Sizes

Following is a handy matrix for those among us who like to indicate HTML (font) sizes in "em"s. All modern browsers use a 16px default font size. Specifying the font-size and line-height in ems (relative to the 16px default font) allows the user to resize the font in the browser and produces the most consistent results across different browsers.

For more about using em's, read: http://www.alistapart.com/articles/howtosizetextincss

Now, the matrix:

 font-size: .625em;            = 10px 
 font-size: .6875em;           = 11px 
 font-size: .75em;             = 12px 
 font-size: .8125em;           = 13px 
 font-size: .875em;            = 14px
 font-size: .9375em;           = 15px
 font-size: 1.0625em;          = 17px
 font-size: 1.125em;           = 18px     
 font-size: 1.188em;           = 19px      
 font-size: 1.25em;            = 20px   
     
 font-size: 1.313em;           = 21px        
 font-size: 1.375em;           = 22px         
 font-size: 1.438em;           = 23px         
 font-size: 1.5em;             = 24px
 font-size: 1.563em;           = 25px         
 font-size: 1.625em;           = 26px          
 font-size: 1.688em;           = 27px         
 font-size: 1.75em;            = 28px         
 font-size: 1.813em;           = 29px          
 font-size: 1.875em;           = 30px           

Tutorial: Installing Django 1.1. on CentOS 5.4

This step-by-step tutorial walks you through the installation of Django 1.1 with Apache and MySQL. on CentOS 5. The example VPS used during the walk-through is the popular SliceHost from RackSpace ™ The steps involved should be quite similar for any properly installed CentOS 5.x (or RedHat EL 5.x).

We use the latest stable version of Python: 2.6 and mod_wsgi (far superior alternative to mod_python), in this tutorial. Django is not, yet, compatible with Python 3.x branch (few things are).

Searching Drupal Files with Ack

Ack is a recursive grep-replacement Perl script that you can download from: http://betterthangrep.com It is somewhat similar to "egrep", but is much smarter and has ten times nicer output format. It also automatically ignores annoying .svn files and you can teach it different file types.

If you are a Drupal developer you need to put the following line in your /etc/profile:

export ACK_OPTIONS=--type-set=php=.php,.module,.inc,.install

After which you can enjoy yourself some:

ack --php "check_plain"

Install PHP XDebug via Pecl

Even though you may find xdebug in a yum repository, due to version incompatibilities you may need to compile/install it using Pecl. Following are several easy steps to achieve exactly that:

> pecl install xdebug

check the output of the command above, if everything went well, you should see something like :

Installing '/usr/lib64/php/modules/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.0.5

at the end of the output. Note the location of the .so file and using it create /etc/php.d/xdebug.ini file that rads something like:

; Enable xdebug
zend_extension="/usr/lib64/php/modules/xdebug.so"

Once you are done with the installation, restart Apache and check the PHP module list with: "php -m", you should see "xdebug" appear in the list.

OpenPublish and Tattler (app) Webinar, Hosted by Acquia

Acquia and Phase2 Technology will be hosting Tattler (app) and OpenPublish™ Webinar tomorrow Wednesday, September 23, 2009 1:00 PM - 2:00 PM EDT.

To sign up visit: http://bit.ly/2nypWj

While You Were Sleeping - Looking Back at Last Couple Years on the Internet

=== Originally published at: The Agile Approach ===

In the ’90s romantic comedy that we borrowed the title from, a chain of dramatic events take place, while the main character (played by Peter Gallagher) is in a post-accident coma.

Comatose sleep is a little too dramatic for this, but just in case you spent the last couple of years on a beautiful island, away from the daily strains of the everyday life in the 21st century, let us list some of the major, latest technical advancements for you. For the less-fortunate rest of us, who did not get to lounge on an island, this is a chance to look back and identify new technologies that have changed the way we live and operate, but were not around just couple of years ago.

Twitter

Twitter took off during 2007 SXSW festival. This 140-character-limit social messaging service revolutionized the Internet landscape by inventing, and at the same time monopolizing, a completely new phenomena: Micro-Blogging. The invention was so successful that it went far beyond the initial idea and became the most effective way to share ideas on the Web.

Linked Data

Unix Shell Programming and Broken Symlinks

The well-known approach for checking whether path exists, in Unix, is: "if [ -e $path ]" condition. However, contrary to popular belief, "-e" does not always work. The "-e" check works for folders, files etc with one exception: if there's a broken symlink on the path, it won't recognize that. Which makes sense: broken symlink is not a valid path. However, if you are writing some kind of cleanup code, you do want to be able to check on broken links, as well. To achieve that, you need to add extra condition:

if [[ -e $filepath ||  -L $filepath ]]; then
  echo "There's something at: $filepath"
fi

Drupal Can Be Very Pretty

There has been increasing amount of complain about how Drupal is ugly or not designer friendly yadda, yadda, yadda. Well, sure - it's not WordPress, because it is much more complex and used for building much more complex websites. Neither do I, personally, think should it try to copy WordPress. Whilst there's always room for improvement, Drupal and WordPress have very distinct niche areas that each should strive in and not try to compete with each other.

But, for the skeptics that think Drupal is just Garland, check out the new, shiny, semantically powered The New Republic [http://www.tnr.com/] website built using the OpenPublish distribution of Drupal. And it was built in a matter of couple months with a small team and without any crazy work hours.

Drupal is awesome and Drupal can be pretty.

Syndicate content