There are similarities between mongo and eXist in that they are both document orientated and work with collections of documents. The main difference is that eXist uses XML documents and mongo uses JSON documents. There’s plenty of documentation on both but from my point of view it’s quite interesting to compare them and will help […]
Author Archives: admin.ian
Rookie python
When running in a virtualenv don’t forget to source bin/activate Install packages using pip e.g. pip install beautifulsoup4 Create a REQUIREMENTS file using pip freeze and load using pip install -r REQUIREMENTS Creating a module you need __init__.py in the directory in order to import successfully otherwise you’ll get AttributeError: ‘module’ object has no attribute […]
Javascript debugging using Eclipse
Start Chrome with remote debugging enabled google-chrome –remote-debugging-port=9222 –user-data-dir=/home/iwright/chrome Create a new debug configuration using WebKit Protocol Host localhost Port 9222 Wip backend Protocol 1.0 Software update site http://chromedevtools.googlecode.com/svn/update/dev/
grails – the very basics
A lightening fast summary of how to create a CRUD application using grails. In many ways this is a similar to using Spring Roo (see this post) but with Grails/Groovy instead of Spring Roo. There are a lot of similarities between the two approaches and, of course, if you want to you can mix java […]
Some maven thoughts
Some random observations about using maven Checking dependencies mvn versions:display-dependency-updates mvn versions:display-plugin-updates Release With github Use at least mvn 3.0.4 and release plugin 2.3.2 otherwise it hangs/takes a long time to return apparently after doing git push (it may still work) When you want to release but don’t want to deploy to a repo One […]
Using an Association to a data (contact) list
The aim of this post is to describe how to use associations in Alfresco to link to a data list. The use case I’m addressing here is to be able to associate a folder with people held in a contact list. The first thing to do is to create the association in the model. Here […]
CMIS using perl
I’ve had a requirement to get some document details out of Alfresco using perl. CMIS seems to be the obvious answer and a little bit of googling gives us the WebService::Cmis package. This seems to do the job nicely but the documentation isn’t great (hint: use the pod) so here is a trival example to […]
How to tell if my DHCP ipaddress has changed
A line of script to send you an email if your DHCP allocated IP address has changed. Either run it from a cron or put it in /etc/rc.local ls -rt /var/lib/dhcp/dhclient*eth0* | xargs grep fixed-address | tail -2 | awk ‘{print $3}’ | xargs echo -n | sed -e ‘s/;//g’ | awk ‘{if ($1 != […]
Spring Roo ConverterNotFound
In webmvc-config.xml look for <bean class=”org.wwarn.cb.web.ApplicationConversionServiceFactoryBean” id=”applicationConversionService”/> This will give you the name of the class to edit so go and find that class and add the following code: Note that the installFormatters method is deprecated in 3.1 but as that is what Roo is currently generating I’m leaving it alone public Converter getStudyConverter() { […]
MySQL performance problems
I wrote a stored procedure on MySQL that is using a cursor to update a table of about 45,000 rows. The details what it is doing is are unimportant but the logic is very simple. The procedure was running extremely slowly (of the order of 1/10 th second per operation) – the steps below describe […]