For security reasons, the latest OpenMRS now has the autocomplete=”off” html attribute on its login page.  This will prevent the users from seeing a dropdown of previously logged in users.

Unfortunately, this will cost developers precious seconds when writing and testing code.

I found this “Autocomplete Ongreasemonkey script to re-enable autocomplete on all forms.  However, I want Firefox to fill in the admin/test username and password on the form for me, and even with this script it wasn’t doing that.

Luckily I was able to easily craft a new greasemonkey script based on that example. This script inserts “admin” and “test” into all login pages on any OpenMRS site.  Click here to download and install my script: openmrs-login.js (after installing the greasemonkey plugin).

This is in the openmrs category tagged as ,

5 comments »

- 20 Sep 2008 -

I struggled for a long while to get the unix “grep” program to do a true multi word search.  However, grep merely searches within lines, so only files that had all words in the phrase on the same line would be returned.  I wanted to know which files in the current folder contained the words “Reuben”, “Onida” and “Cornelius” anywhere (and in any order) within them.

The solution turned out to be to grep three times and pipe each result into the next:

grep -l Reuben * | xargs grep -l Onida | xargs grep -l Cornelius

The first grep -l Reuben * returns all file names that contain the word “Reuben”.  Piping that to xargs makes the second argument essentially grep -l Onida file1 file2 file3 file4 etc.  This chaining can go on for as many search phrases as you have.  The final output is a list of files that contain every word in your search phrase.

This is in the babble category tagged as , ,

Add a comment »