Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Zack Williams http://artisancomputer.com

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

Stop TextMate from writing metadata files (._*)

This stops TextMate from writing it's ._filename metadata files, which can be annoying in mixed environments.

Not mine - from http://blog.amber.org/2006/02/27/stupid-textmate-tricks/

defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1

Validate an email address

I don't remember where this came from, but it's very useful for validating input from a form


function valid_email($email) {

  if( eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) ) { 
    return true;
  }
  else { 
    return false;
  }

}

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed