Skip to content

Monthly Archives: July 2008

Firefox 3 Mouse Wheel Zoom


Zooming with the CTRL+Mouse Wheel Up/Down has been in inversed in Firefox 3. In version 2 you zoomed in (enlarged the text) with CTRL+Mouse Wheel Down and zoomed out with CTRL+Mouse Wheel Up, its now in Firefox 3 the other way round.

The revert back to the old behaviour, change

mousewheel.withcontrolkey.numlines = 1


mousewheel.withcontrolkey.numlines = -1

in about config.

To me “pulling” the page towards myself always felt much more natural to me than the other way round, but that’s just me.

regex: URL thingy with username, password, host and port


Just in case i do keep forgetting that stuff, here’s a regex for decoding urls like


in Java:

final Hashtable<String, Integer> portMap = new Hashtable<String, Integer>();
portMap.put("ftp", 21);
portMap.put("sftp", 22);
final Pattern urlPattern = Pattern.compile("(ftp|sftp)://(\\S+):(\\S+)@([\\S&&[^:]]+)(:(\\d+))?");
final Matcher m = urlPattern.matcher(url);
	throw new RuntimeException("Invalid ftp url!");			
final String protocol =;
final String user     =;
final String password =;
final String host     =;
final int port = != null ? Integer.parseInt( : portMap.get(protocol);

Just in case anybody is interessted, i’m writing a wrapper around j2ssh and Commons::Net to support both ftp and sftp in a J2SE program.

E-mail It