Turn of Tabs in Textmate

Posted by Andrew Premdas Wed, 13 Aug 2008 21:03:39 GMT

God it took me a long time to find this again ...

If you want to you can disable tabs from the command line. Make sure TextMate isn't running, and then type:

defaults write com.macromates.textmate OakProjectWindowShowTabBarEnabled false

into the terminal. To bring tabs back, you'll have to:

defaults delete com.macromates.textmate OakProjectWindowShowTabBarEnabled

Winmerge for OSX

Posted by Andrew Premdas Wed, 13 Aug 2008 19:12:09 GMT

Slightly spurious title as there is absolutely no need for a winmerge for OSX. Included with the Developer Tools for OSX is filemerge, which is an excellent diff tool. There is also a tool to call it from a terminal called opendiff so you can do

opendiff  dir1 dir2
opendiff  file1  file2

You can also find filemerge using spotlight.

Gems from GitHub

Posted by Andrew Premdas Mon, 14 Jul 2008 13:04:58 GMT

Answer to my problems with gems being updated at github well before they are updated at rubyforge. Following allows you to install gems from github using standard gem command

sudo gem update system
gem sources -a http://gems.github.com

Unfortunately this doesn't seem to work for rspec. Perhaps they have not published their plugin as a gem there.

New Rails Project (part 3) - Default Layout

Posted by Andrew Premdas Sat, 12 Jul 2008 19:45:19 GMT

Here we discuss getting a simple structure in place for laying out the pages of our application ...

New Rails Project (part 2) - Plugins

Posted by Andrew Premdas Fri, 11 Jul 2008 19:19:32 GMT

Now we have a deployed application we can add some plugins to get those extra bits of functionality we want.

Creating a New Rails Project

Posted by Andrew Premdas Fri, 11 Jul 2008 15:10:45 GMT

A step by step guide to creating a new rails project. The project will be called np. We start with ...

Getting a Rails action to return to where it was called from

Posted by Andrew Premdas Fri, 04 Jul 2008 15:16:15 GMT

Often in Rails you will want to use a partial in more than one place. Such partials might add or delete things. Once this is done you will want to return to where you were. The following works without javascript and Ajax ...

Rails Debugging

Posted by Andrew Premdas Thu, 03 Jul 2008 11:35:02 GMT

Easy peasy once you know how.

  1. start up your server with the -u
  2. put debugger in your code where you want the debugger to start
  3. run that code e.g. in a web browser

The web browser will hang, and a debugging session will be started in the terminal you ran the server. Main things to remember are

  • h get help
  • l list the code where you are
  • reload if debugger doesn't pick up changes in your code give it a little kick
  • cont carry on execution

That should be enough to keep me happy

Obtrusive Javascript and Rails

Posted by Andrew Premdas Mon, 30 Jun 2008 19:54:00 GMT

Rails has a number of helpers which put fairly chunky bits of javascript into your html. This isn't the purest solution, and is particularly messy for accessibility when javascript is disabled. A number of people have addressed this issue which I'll discuss here

Javascript for Rails

Posted by Andrew Premdas Mon, 30 Jun 2008 17:30:00 GMT

This article was prompted by the problems caused when using a restful design and deleting things with link_to

Older posts: 1 ... 5 6 7 8 9 ... 11