MyThinkPond

On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

Archive for June, 2011

Tired of “Terminate batch job (Y/N)?”, try this

Posted by Venkatt Guhesan on June 24, 2011

When you invoke a batch file or most applications in a command-prompt and when you wish to close the application by doing a CTRL+C, you get the annoying “Terminate batch job (Y/N)?” prompt. And in most cases, even if you type a “n”, it still kills the application. Example is the Tomcat startup. To avoid this, try this:

YourScript.cmd < Nul

This should no longer ask you with the annoying prompt “Terminate batch job (Y/N)?”.

Now for a few examples from my everyday usage:

grails run-app < Nul
h2.bat < Nul
startup.bat < Nul
mvn tomcat:run < Nul
mvn jetty:run < Nul

Cheers.

Posted in General, Scripting | Tagged: , , , | 2 Comments »

How-To: Turn off Firefox browser cache during development

Posted by Venkatt Guhesan on June 22, 2011

Sometimes (when your are developing) you may want to force fetching all content fresh all the time including images, resources such as style sheet etc. To facilitate this you can do the following:

  1. Open a new window or tab in Firefox.
  2. Type about:config in the address bar.
  3. Search for “cache” in the search bar and look for network.http.use-cache in the filtered results.
  4. Double-click it will toggle it from “true” to “false”. Default should be “true”.

And you’re all set.

Sometime you want to force the cache on one particular page\request. You can do that by holding the “Ctrl” key while clicking reload or F5.

Cheers

Posted in web development | Tagged: , | 2 Comments »

How-To: Change Grails User work and cache directory under windows

Posted by Venkatt Guhesan on June 10, 2011

The directions below will help you move the Grails user work and cache directory to a different location.

Why?

Sometimes your default “primary drive” may be running out of space and you need to move your workspace else where.

How?

  1. Create a file called “settings.groovy” under “C:/Users/.grails” directory.
  2. Edit this file and add the following line:
    grails.work.dir="D:/grailswork"
    
  3. Make sure that the defined folder exists.
  4. Remove all other content, files and folders in the “.grails” folder.

Your are all set

Posted in Grails, Groovy, Java | Tagged: , , | 1 Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 117 other followers