Ever had a long string like this: "myveryveryveryveryveryveryveryveryveryveryveryveryveryveryverylongstring" and wanted to turn it into something much shorter, such as this: "myveryvery...longstring"?
Here's a little snippet that does just this. It works great in HTML select lists which, to my knowledge, are
impossible to dynamically resize as the user drags their browser window
larger or smaller.
Continue reading "Ruby Snippet: Shortening Long Strings For Display" »
If you're new or semi-new to TextMate and you're collaborating with someone on the same development project, file change collisions are inevitable. Textmate has nice support for resolving file conflicts when they show up after updating to the latest SVN depot revision.
Note: This post
assumes you are on a Mac :^).
Continue reading "Resolving Files with TextMate, Subversion, and FileMerge" »
As a former Java developer and new to the concept of blocks, these API options seem perplexing at first. They're not. All three take a block. How they use the block is what distinguishes them. You should read the RDoc for yourself but, if you want a quick a dirty summary, continue reading this post.
Continue reading "Ruby Arrays: select(), collect(), and map()" »