Educating the world

Our blog has over 10,000 readers a month

Saving user name and password

March 28th, 2014

I have a log in form that requires a user name and password. The form won't remember my passwords because the submission form has autocomplete switched off. Here is an example of a similar form:

<form method="POST" name="loginform" autocomplete="off" action="/cgi-bin/security.cgi">
<input name="un" type="text" />
<input name="pw" type="password" autocomplete="off" />

This means that the person who created the login form has specifically prevented my browser from saving the form user names and passwords. This might be ok in the wild but if you have lots of test systems then it can be a bit of a pain. As my old pal says, "if it's got a chip in it, you can re-program it". This is where I learnt about Bookmarklets.

A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands to extend the browser's functionality.

These are very handy for getting around the restrictions build into the D.O.M.. So from the example above we want to switch on the autocomplete for the form and the password field so that the web browser will allow me to save the form data ready for next time.

So here is what you do in Firefox but it should work in any browser.

  1. Right click on the bookmark bar and select New Bookmark.
  2. Give it a Name, doesn't matter what.
  3. In the Location enter the following Javascript:

    <a href="javascript:(function(){var fm=document.getElementsByTagName('loginform'); var pw=document.getElementsByName('pw'); for(i=0;i<fm.length;i++){fm[i].setAttribute('autocomplete','on');} for(i=0;i<pw.length;i++){pw[i].setAttribute('autocomplete','on');}})()">Autocomplete on</a>

  4. Click Add.
  5. Make sure your browser is set up to remember passwords then go to your logging page.
  6. Click the bookmark in your bookmark bar. This will alter the DOM and switch the auto complete attributes to on.
  7. Fill in the User Name and Password on the form and click Login.
  8. Your browser will ask you if you want to remember the credentials, so say that you do.

When you return to the page the browser will ignore the autocomplete in the form because it already has the values, so double click inside the User Name field and select the username. The password will be filled in automatically. Then all you need to do is click the Login buttons and you're in!

Who's who in Islam

March 12th, 2014

What's the difference between Sunnis and Shi'a in Islam?

BBC News report 20th December 2013:

The division in Islam goes back to a dispute over who should succeed the prophet Muhammad after his death in 632. Those who wanted his position to be inherited by his closes associate became Sunnis. Those who wanted him to be followed by his descendants became Shi'a.

Just is in the split in the Christian church between Catholics and Protestants, it's been as much about power as [it has been about] religion.

Windows XAMPP, Apache, PHP, libssl2 pain

February 25th, 2014

Just spent most of the day trying to get XAMPP, Apache, PHP, OpenSSL and libssl2.dll working on Windows. Yep, DLL hell as usual. In the end I found a pure PHP implementation of SSH which worked out of the box on Windows without a problem.


Glasgow Fright Fest 2014 Programme

January 28th, 2014

All the films are listed on the main Glasgow Fright Fest 2014 web site but the layout isn't very helpful for printing out or planning. So here it is, nice and easy:

Thurs 27 Feb 2014

21:00 Ti West in conversation

Fri 28 Feb 2014

13:30 - 15:05 Savaged (95 mins)

-- 35 m --

15:40 - 17:40 Proxy (120 mins)

-- 1 h 5 m --

18:45 - 20:29 Wolf Creek 2 (99/104 mins cut/uncut)

-- 46 m --

21:15 - 22:50 The Sacrament (95 mins)

-- 40 m --

23.30 - 00:55 Afflicted (85 mins)

Sat 1 Mar 2014

11:00 - 12:10 Video Nasties: Draconian Days (~70 minutes probably similar to Moral Panic)
IMDB not listed, follow up to "Video Nasties: Moral Panic, Censorship & Videotape"

-- 1 h 20 m --

13:30 - 14:51 The Scribbler (81 mins)

-- 1 h 9 m --

16:00 - 17:30 Torment (90 mins)

-- 1 h --

18:30 - 20:05 Mindscape (95 mins)

-- 55 m --

21:00 - 22:20 Almost Human (80 mins)

-- 55 m --

23:15 - 01:32 Killers (137 mins)

Sun 2 Mar 2014

12:00 - 13:10 Video Nasties: Draconian Days (Repeated from Sat 11:00)
IMDB not listed, follow up to "Video Nasties: Moral Panic, Censorship & Videotape"

-- 50 m --

14:00 - 15:20 Almost Human (Repeated from Sat 21:00)

-- 40 m --

16:00 - 17:44 Wolf Creek 2 (Repeated from Fri 18:45)

-- 46 m --

18:30 - 20:05 The Sacrament (Repeated from Fri 21:15)

-- 55 m --

21:00 - 23:17 Killers (Repeated from Fri 23:15)

Uninstall Eclipse plugin

January 7th, 2014

If you are using anything below Eclipse 3.7 (Indigo) then upgrade!

Help > About Eclipse > Installation Details > Installed Software tab > Uninstall...