There I was downloading a bunch of stuff from the Internet quite happily using Firefox built-in download manager when I decided to check code academy (a site that teaches you how to program in javascript, in a cool way - apparently).
So after playing with a few exercises I got to lesson 7 (item 4) which requires you to fill the conditions of a for loop to bring i (the loop variable) down to 0. What happened is that instead of writing the loop as for (i = 2; i >= 0; i--) which would trigger the inbuilt-mechanism that would take me to the next lesson, I "mistakenly" wrote is as for (i = 2; i >= 0; i++), making the loop go on forever causing Firefox to use 100% of the CPU, frizzing everything, and frustrating all my attempts to reload the page or close the tab.
Right now I have paused the process through kill -STOP <pid>, but I don't want to close Firefox because I'm downloading a bunch of stuff that can't be resumed, and I wonder if there's a way to close this tab through the command line. Maybe there's a way to list all firefox' threads and try to close them individually (worst case, I think GDB can assist me on this).
I'm currently using Mac OS X 10.7.2.