Blog Archives

Automated JavaScript testing with Mocha and js-coverage for NodeJS

I used to extensively use Jamine and Jasmine-Node for my JavaScript testing. While jasmine is great I’ve recently moved over to Mocha for several reasons but primarily because it supports coverage reporting. Here are some basic steps to get going.

Tagged with: ,
Posted in JavaScript, nodejs, programming, TDD, testing

XML find and change node script

This is a script written in ruby designed to find a specified node in an XML file, and replace one value with another. Usage example: changenode /home/me/foo bar.xml name bob john will find all ‘name’ nodes in bar.xml and replace

Tagged with: , , ,
Posted in programming, scripts

JavaScript Map object implementation

The idea of this object is to mimic the API of the Map object in Java. It can be used in the following way: I know this behaviour can also be attained by using an array in the following manner:

Tagged with: ,
Posted in programming

Replace webapp in deployed tomcat

This script will quickly replace the webapp dir of a deployed webapp in tomcat. It scans at your current directory tree for an appropriate artifact. It will look for a target subdirectory, and will try to find a .war file

Tagged with: , , ,
Posted in programming, scripts

Copy to apache script

This script is designed to work with OS X and will copy the specified dir into the users local sites dir. It looks for the specified dir, and if it exists copies it into apache. If the dir already exists

Posted in programming, scripts

Copy to tomcat script

This script will quickly copy an app into tomcat by scanning at your current directory tree for an appropriate artifact. It will look for a target subdirectory, and will try to find a .war file in it (assumes you’ve build

Posted in programming, scripts

Generic tomcat script

This script makes it easy to control your main tomcat installation. All you need to do is set the $CATALINA_HOME environment variable to the location of your tomcat installation. The available switches are: start starts tomcat stop stops tomcat restart

Tagged with: , , , ,
Posted in programming, scripts

Introducing unix scripts

I’ve got several scripts that I use for doing useful things on unix. They can be found on github here. I’ll add some details about them individually in separate posts.

Tagged with: , ,
Posted in programming, scripts

More on TiddlyBlogger

Just a quick note to point out some work that’s been done “White Hat Marketer” Check out the details here: http://whitehat-marketer.com/blog/tiddlyblogger-with-permalinks-and-updates/ It basically includes the capability to update posts (rather than just create new ones), and also create permalinks.

Posted in programming

C# Win32 messaging with SendMessage and WM_COPYDATA

I had a real pain recently where I wanted to control one windows app from another. I found some useful stuff on the net, but nothing that gave an end to end solution. So here’s what I came up with.

Tagged with: , , , , , ,
Posted in geeky, programming