Changes Since Last Push in Git

The "git status" command only shows uncommitted changes locally. But what if we need to see "what files would get pushed if we did a push now?". The answer is not trivial (and no, "git push --dry-run" is not useful since it does not show changed files).

I've been looking for an answer, and since I am no git expert, it took me a while to find one, until @iosebi came to rescue. Apparently, what you need is this line of code:

git log origin/master.. --stat

Thank you, @iosebi! I probably hate git a little less, now :)

Adding Drupal, Django and JQuery Support to Espresso

MacRabbit's Espresso (http://macrabbit.com/espresso/) has been my favorite editor for server-side scripting for a while now. I was an avid Coda user before that, and Coda is a fine editor, but I like several features of Espresso better (e.g. large file browser in the center and ability to simultaneously open files from any number of servers).

Espresso is much "younger" than Coda and it was a little behind on language support (and availability of plugins in general), initially. We even had to post a hacking instruction for how to "teach" Espresso Drupal files.

The situation is much different now. There's a wonderful abundance of quality plugins now at http://fileability.net/coffee/ that work like a charm. We are using Combined Python&Jango, JQuery, YAML and Drupal-PHP sugars and they are simply awesome. To install, all you need is download appropriate tar.gz, unarchive. rename resulting folder so it has extension .sugar and move that to ~/Library/Appplication Support/Espresso/Sugars

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

Syndicate content