author profile image

Matt Reid

Solo Entrepreneur | Lead Software Architect

Having moved my blog over to use facebook’s comments plugin I needed a new way to display the number of comments for each of my links. It turns out to be very easy. Simply making a request to URL_TO_COUNT_COMMENTS returns a json string with the following format { “http://www.matt-reid.co.uk/blog_post.php?id=68”: {...

I recently needed to be able to kick off a jar file running for a batch job in the background from a linux shell. After some googling I found the required steps. Save the following into your .sh file, replacing the jar file name #!/bin/bash nohup java -jar JARFILENAME.jar &1...

I have been writing some data import programs recently and have had trouble with foreign characters in a text file I was reading. The solution is in fact very simple. To create a BufferedReader for a file in UTF-8 format, simply write the following: new BufferedReader( new InputStreamReader( new FileInputStream(file),...

Elasticsearch is a distributed, scalable nosql search server built on lucene. It can use plugins(rivers) to hook into changes made on other databases such ascouchdb.  There is currently no “official” river for mongodb and elasticsearch but aparo has written one and it is available on hit github repo. Here is...

I was recently importing data from various sources, some of which had some non-standard (unicode) characters. In particular I wanted a way to remove the accents from french letters from á to a   I stumbled across this code which does the job perfectly: /** * replace accented characters with...