Peter's Blog

Redefining the Impossible

Items filed under firefox


I had a complaint from a loyal reader about this site not rendering properly on IE. It got half way through my article on Ruby Metaclasses and stopped.

The problem was caused by my using the term <object> in my text and the wilki filter not changing the < and > into html entities. IE treated <object> as a keyword and tried to download a trojan or whatever it does in those circumstances. Presumably firefox saw that the semantics were totally wrong (for example, no attributes to direct it to a specific object) and ignored it.

Since I use firefox and I don't proof read ever article in every available browser this one slipped through.

Apologies for interruption of service.

And thanks again Dean for your concern.


Filed under: firefox ie

2 Comments

I was studying my access logs and noticed visitors using the Safari web browser under Windows. I thought, "No, can't be right, maybe Safari is lying to the server about the OS to get around compatibility problems" since Safari is an Apple OS/X browser.

I was at the Apple site for something or other and discovered it is true: there is a version of Safari for Windows here. It's a beta but everything is beta these days.

I've been using it at home and I'm liking it. It has the features of Firefox that I actually use but it feels leaner and meaner. There is something about the way it presents web pages that makes them look nicer. Don't ask me what, it's a subtle Apple designer thing that an engineering brain cannot put a finger on: if mine could I would be outta here and busy growing a ponytail.

One thing about Apple design I must address: the brushed metal look gets old very quickly, I'm already tired of it from iTunes I don't see any way to change the 'theme' and Windowblinds cannot change it (did I mention that rather than buy Windows Vista I just bought Windowblinds?).

It has crashed on me once, the text box I am typing this in has tiny weeny text and is making me squint (my glasses are two flights of stairs down sad ) I have found one or two sites with problems but I'm still using it. Oh, and it seems to insist on installing Quicktime when you install it which is a minus to me.

Firefox is seeming more and more bloated these days and takes about thirty seconds to boot on my crappy work computer. Opera is ok but whenever I try it I drift back to Firefox. Safari is quite likely to go the same way but it's a new toy for a few days. Internet Explorer, well HA I only use it on sites that don't work with anything else.

I so want an iPhone.


Filed under: firefox safari windowblinds

4 Comments

Trying to get firefox to link to files on the intranet I came across a couple of useful tips:

  • You can find a users personal application directory under documents and settings by opening '%AppData%' in the run menu.
  • If you have to create a user.js file remember that if you do it with notepad in stupid hide registered file extensions mode you will actually get a file called user.js.txt and it will take you another 20 minutes to figure out why it doesn't make any difference.

Filed under: firefox

2 Comments

I'm back on the new beta of Opera version 9. It seems a bit more stable than the alpha version I tried before. It is generally compatible with most sites I have visited, only having problems with some Microsoft sites so far, not a big surprise.

Opera is a nice piece of software, it 'feels' less bloaty than firefox and yet has more features built in (Gestures, email) that don't come with vanilla firefox and you don't have to mess with extensions.


Filed under: firefox opera


I'm trying the Opera 9 preview as an alternative (or complement) to Firefox. Opera has been attractive to me in the past but always gave odd rendering problems or crashes that put me off. This version has been ok thus far and has features built in that are quite seductive. Ok firefox has extensions but these all seem to break every time they upgrade it and I have got fed up with reinstalling them (too high maintenance).

Opera goodies, some maybe all available as Firefox extensions but are bundled with opera:

  • Fast Forward: this button seems to find the 'next' link on your page and clicks it for you. You can go through google results very quickly.
  • gestures: right click and move the cursor around to control the browser: e.g. right click and move right does the fast forward action so takes you to the next page with no fuss and minimal physical effort.
  • email client: this supports IMAP and works with Microsoft Exchange. It chucks all email in one folder and gives lots of options for searching through it. For example, you click on a contact name and see all the mail from that contact. Looks ok so far and is appealing as the memory footprint of Opera should be less than Firefox + Thunderbird. Only downside so far: cannot compose html email. Not a showstopper as I rarely bother to format email (like I rarely bother to format blog postings) and it does display html email (as a web browser should be able to).
  • It supports widgets if you have a need for a huge clock that cannot be resized. There are only 9 of them so far (clock, calculator, calendar etc).

Possibly more cool: Opera Mini. This is a version of Opera written in Java so it works on my Sony-Ericsson K750i phone. This is a proper web browser, it supports http/html, it is not a crippled WAP thing so you can look at real web sites. It displays them in a tiny font that gets a lot of info on the screen. It communicates with a server at Opera which compresses the pages you are viewing and minimises the download: the front page of this site was a 8k! I installed it thusly:

  • Download the .jar and .jad files for the k750i.
  • Connect phone to USB
  • Copy files to \MSSEMC\Media files\other
  • Unplug phone (stopping USB devices on Windows 2000, not necessary on XP).
  • On phone, go to 'My Items', Other.
  • Select the .jar file, right click and Install. It will ask you if you want it installed as an Application or Game: you decide.
  • For uk vodafone, go to Settings/Connectivity/Internet Settings/Internet Profiles and create a new profile. Give it any name and set the 'Connect Using' field to 'Contract Internet'.
  • Go to Settings/Connectivity/Internet Settings/Settings for Java(tm) and select here the new profile you created above.
  • Go to My Items/Applications (or Games) and select Opera Mini. It will do a connectivity test. If it fails the internet profile for java above might be wrong.
  • Enjoy


Firefox 1.5 is out and has broken the check checkloadurl option that I previously used to access local files. By default firefox will not let you open local files defined by the file:// protocol in the url.

This page proposes a fiddly solution involving editig user.js files but the following also appears to work:

  • go to about:config
  • find the term network.automatic-ntlm-auth.trusted-uris and edit it
  • enter the address of your intranet site, e.g. http:://intranet.bigco.com (this threw me for a bit, I though you had to put the file:// link in here but it's the originating web site that you are trusting).

Credit to whoever mentioned this method in the comments to Firefox intranet problem.

UPDATE: this may only work if you log into the windows domain, otherwise you have to use the fiddly solution (editing files, no gui sad ).

To summarise the fiddly solution, edit/create a user.js file in your firefox profile directory and put this in it:

user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "http://intranet.bigco.com");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");

where intranet.bigco.com is the url of your intranet.

If you don't know where your firefox profile directory is then look here.


Filed under: firefox intranet

2 Comments

My work pc (450MHz, 256M ram, Win XP) is very slow, particularly when Firefox is running. Firefox uses about 30M of ram and if I minimise it and use other applications, when I go back to it I have to wait about a minute for it to swap back from disk. If, when it does show itself, I start typing in the google search bar it takes about five seconds to show each letter.

I gave Opera a try in the hope that it would be better. When I have tried it in the past it had had problems redering some sites, more so than firefox but I can always live with that. However this time the javascript on gmail made it crash. No solution. While it was running it was also using 30M ram. It is as if these webbrowsers just create a huge bitmap of the website in memory and display that.

Don't mention IE. I'm looking for something lean, not just mean.

I have another PC I am using (1.7G, 512 ram, Win2K) and it flies. Even while compiling a huge Visual C++ project (1000 source files) and with firefox loaded it has over 200M of ram still free.

I think I'd much rather use a fast PC running Win2k than a slow PC running XP. It would help if I could think of just one feature of XP that I miss.

Moral: ask your boss for a faster PC.


Filed under: firefox opera windows

2 Comments

I hate pdf files. Or maybe just Acrobat Reader.

Reason 1: acrobat reader has made firefox lock up for me for a while, such that I have disabled the .pdf plugin so that pdf's simply get downloaded. This morning I am playing with my new MSN Search toolbar install (or whatever the name is this week) and it locks up trying to show me a pdf file. (Sidetrack: I indexed some of the company file server: could be interesting).

Reason 2: why can't I set a default resolution that is reasonable? Each and every new document opens in some random way the 'author' left the settings at and I have to fiddle around trying make it readable. Do I have this trouble with html pages? No. Web Browsers are designed to display pages in the most readable way, Acrobat Reader is designed to make the pages appear how the 'author' intended them.

Reason 3: someone sent me a requirement spec containing an extract from a comms protocol I had to implement. I try to copy the extract and paste it straight into my test harness and what do I get? Garbage. It seems that pfd files can use weird fonts and character encodings internally and it makes no attempt to fix itself if you copy and paste. I tried using various ubuntu tools to get the text and same problem, it's the pdf format that is broken here. There are three solutions:

  1. get the 'author' to use standard fonts. Some hope.
  2. print it and read it back using OCR.
  3. retype it yourself. Be sure to charge time taken to client.

Welcome to the age of electronic documentation.

Reason 4: Acrobat reader 7 is out but I don't want to install it because of Adobes policy of accepting $$$ from anyone in return for dumping their stuff on my computer. Yahoo toolbar? I can download it myself. PrintMe? Bite me.

Reason 5: What usability expert decided that clicking on a page should change the resolution? Just when you have it set right?

Conclusion: I hate pdf files. And Acrobat Reader.

Update: Foxit Reader free, small fast pdf viewer.


Filed under: acrobat firefox pdf

34 Comments

Firefox has a tags/css extension that supports borders with rounded corners:

-moz-border-radius : 10px;
For example, this should have rounded corners in Firefox but boring square corners in boring Internet Explorer

I'll be mildly curious to see how much of this is stripped out by bloglines. UPDATE: the whole thing. The last paragraph should have been in a rounded box.

Sharp eyed visitors to my blog may spot this in my theme.


Filed under: firefox


I'm a big fan of O'Reilly books. This weekend I bought Firefox Hacks, 100 tips for using firefox. Really interesting book, the tip about using it to view Mysql databases was the seller for me. An example hack:

  • open about:config
  • double click on browser.tabs.showSingleWindowModePrefs
  • open options/advanced
  • there is now a new option to force all web pages to open in new tabs of the current browser window instead of new windows.

I have seen extensions to do this but extensions are hastle, I'd rather use built in features.

Anyway, on the back of the book was a mention for Safari online bookshelf and I wondered what this could be. It turns out to be something incredible. For as little as about £5 a month you can choose from 3383 books by O'Reilly, Que and others to read online. You choose a book and have access to it for 30 days, after which you can swap it for another book. Depending on the virtual value of each book for £5 a month you could have five books open. The seems to be all the O'Reilly books I can dream of: Mysql cookbooks, python cookbooks, bash reference, you name it.

I think this is a good deal, I like O'Reilly books but I am reluctant to fork out £17 or so a pop. I'm pretty well tempted.


Filed under: firefox

3 Comments

Was looking at the reviews of flock, a new version of firefox with knobs on, and how easy it made it to add bookmarks to del.icio.us. This struck me as nice, putting my bookmarks online so I can access them from wherever (four pc's and counting).

I didn't fancy installing flock as it is still beta but I did decide to dust off my old del.icio.us account. I noticed two things:

  • The 'post to del.icio.us' page loads much faster than the equivalent from furl which I used previously. I found adding links to furl to be so slow that I rarely bothered with it.
  • The page that lists your bookmarks also lists your tags so you can easily get a list for each tag.

Now I have two levels of bookmarking:

  • Things so useful that I put them in the toolbar to use every day: this blog, bloglines, um, not much else actually.
  • Things I might need to remember one day which I put in furl

I don't bother with the bookmarks menu except for things I want to survive a firefox reboot.

Del.icio.us immediately appealed to me as a way of organising my bookmarks compared to fiddling with toolbar items. Furl didn't seem so 'tag' orientated and I am a fan of tagging. It makes it so much easier to zoom in on a topic I am interested in.

Here are my bookmarks. I haven't got many yet.

I could install firefox extensions to add bells and whistles to this but I'm a little tired of firefox extensions breaking whenever they release a new version so I am trying to live with the default behaviour.

Conclusion: del.icio.us: silly name, annoying to type, but useful.


Filed under: firefox


Interesting to see this at the bottom of this page:

This website is best viewed at screen size 1280 x 960 in Netscape Communicator 7 with Verdana font @ 100%. This website also requires Flash, to download Flash Player click on the icon right.

  • Netscape 7?
  • Verdana font? How am I, nieve reckless speeding driver, supposed to set the font?
  • Flash? Is this so they can photograph your number plate in the dark?

Filed under: firefox


Google have released a Google Toolbar for Firefox smile Now I can lament my poor pagerank without having to boot IE.

It appears to do all the auto form-filling and stuff that it does on IE and it can search gmail directly.

Update: also has autolink. Hope Dave Winer doesn't find out.


Filed under: firefox google pagerank


Last week the second hard disk in my work pc died in the hot weather so I disconnected it. It only held backup stuff and now I backup to my work ubuntu server. Life went on except when I booted firefox all my bookmarks had gone. No idea why this could be, maybe my cache was on the second hard disk so it decided to reset everything. The extensions were still there.

Today I fell into an old Firefox annoyance, click on a pdf file and firefox locks up. The Adobe Acrobat plugin has never been reliable for me. It's bad enough having to use acrobat reader and mess around finding a comfortable text size, it's worse having to kill firefox and reboot.

My normal solution to this is disable the plugin. This is done through Tools/Options/Downloads/Plugins and uncheck the pdf line. Clicking on a pdf then gives you the normal open/save downloading options and you can open it in conventional acrobat reader.


Filed under: acrobat firefox


Working on a web site, trying to get it to look ok in both Firefox and IE. Firefox is ok, a large GIF image on the site renders in the size I would expect, about 600x400. In IE however, it is shown proportionally larger as if zoomed in a bit and hence the site looks poor, especially as the resizing has distorted the image.

Looking through IE options there is nothing to control this. Text Zoom only alters text size, not the size of images.

On a hunch I looked at my Display settings in Control Panel. I had the font size (Display/Settings/Advanced) set extra large, 132 dpi. I tend to use large fonts because of my poor eyesite. I reset the font size to normal (96 dpi) and did the mandatory reboot and, lo and behold, images in IE were of normal size and my website looked publishable.

It's one thing having to either use large fonts or squint all the time, it's another when MS are plotting to make all websites look awful to the optically challenged.


Filed under: firefox ie theme


Looking at the access logs for this site, most entries have a referrer string that tells me how a visitor got here. This string contains information about the page they were on when they clicked and got to my site. For a google search, for example, the referrer string gives the actual google query that they used.

However, some visitors come without referrer information. Presumably they are worried I will figure out what sleazy sites they have visited or they are ashamed of using yahoo search rather than google (would explain why I get so few hits from yahoo). I wondered how they had set up their browsers to stop the referrer string being sent.

Doing an about:config in Firefox and looking through the options, I found one called network.header.sendreferrerheader which sounded interesting. A google search gives very few hits for this but one here confirms my suspicion: setting this variable to 0 (by default it is 2) stops firefox sending out the referrer string. This means you can surf around and no sites you visit will know how you reached them. You will be like an apparition that appears from nothing, only to disappear again, leaving nothing more than an IP address to identify your computer.

I shouldn't really be describing this as I don't want my visitors to hide their referrer information but then again it is my duty as a tech blogger to pass this tip on.

Coming soon: how to deny access to people who block their referrer strings.


Filed under: firefox

4 Comments

Discovered by chance that if you open something like c:\ in Firefox, you get a directory listing and can browse all through your files. Text files, html files, picture files can be viewed, word documents can be viewed in word, other files like executables you can only download to the same computer.

Put a link to this in bookmarks toolbar and it becomes menu with entries for files/folders in the directory.

Not as flexible as Windows Explorer but that typically takes eight seconds to throw up a new window, whereas firefox is normally running anyway.


Filed under: firefox

7 Comments

Working on new intranet I came across a problem getting links from intranet web pages to files on the company file server to work. These are all coded up along these lines:

<a href="file://f:/blah/blah/pretentious document.doc">Important Company Standard</a>

This worked ok in IE but not in Firefox. Click on a link and nothing happens.

With a lot of experimentation it seemed that this happens when attempting to go from an html page loaded through the http:// protocol to a file page loaaded through the file:// protocol. Testing with a html file on my desktop worked because the desktop file was loaded using the file:// protocol.

I found an article that mentions this as a security feature: it stops web pages linking to files in your local directorys.

I have found that the following steps disable this:

  • Open Firefox
  • open the url 'about:config'
  • find the entry 'security.checkloadurl'
  • double click it (this will toggle it from true to false).

IE may treat the local intranet as a 'trusted site' and let me link to files on disk. I don't think there is a way of telling firefox that the intranet is a 'trusted site' and can link to files. I am not sure how many firefox users there are here who would have to tweek their settings.

The biggest annoyance is that you click on the link and nothing happens. Why not a dialog to tell me there may a security problem but to let me go ahead. Silently doing nothing is worse than useless, you don't know what was wrong and you waste a couple of hours finding out why.

Update: 11 Jan 2006: there is more on this topic here.


Filed under: firefox

5 Comments

firefox is a web browser that has actually got microsoft worried enough to add tabbed browsing to Internet Explorer.


Filed under: firefox


Firefox 1.0.2 is out with some security fixes. However, it leads me to moan:

  • Why does each new release break so many extensions?
  • Why does each new release add a new item in add/remove programs?
    images/FirefoxVersions.jpg
    I am a software engineer, I've written setup programs and I know this is avoidable (my clients moaned about it to me).
  • Why did the latest one reset some of my preferences (always show tabs, close multiple tabs without moaning).
  • Why did the size of the install go up to 36M?
  • Why does a new version with a couple of security fixes require downloading the whole program, not just a dll or two?

Filed under: firefox

1 Comment

Discovered GreaseMonkey a cool firefox extension that lets you install little scripts that rewrite the dhtml for web sites you visit. Why would you want to do this?

  • automatically convert a text link like http://www.google.com to an anchor so you can just click on it.
  • remove all google ads from a site if, for example, google have given you pagerank 0 and you hate them.
  • changed underlined text to italic as underlining means hyperlink.

More examples.

Could be worth learning dhtml for.


Filed under: firefox google greasemonkey pagerank


I was looking at the Microsoft Genuine Advantage Program as I wanted to try the Microsoft Antispyware beta. One of the goodies on offer was a 6 month trial version of Microsoft OneNote which is a program for taking notes and organising them. By the time a 6 month trial is finished I am either using something every day or I have not touched it for 5 months so I thought I would give it a try.

I am always interested in new ideas for organising notes. I've tried Wikis but web apps are a bit too slow and fiddly. I've tried blogging but I end up typing more than is necessary in order to be descriptive. I've tried outline editors but I never really get into the habit of using them. For notes I just want to bang in bare details, paste stuff in with a 3 word description.

OneNote gives you the following:

  • A simple place to type in arbitrary text. You click anywhere on a page and type away, giving a box with a note in it.
  • The notes are organised into a confusing multi-layer hierarchy of sections, folders and pages which map onto folders, subfolders and files in the physical file structure. Essentially there are multiple levels of tabs. However, once you have chosen a name for a section and folder, you don't really have to worry about giving your notes names or wonder where to save them.
  • Can drag and drop file or folder locations from explorer to a link in a note and then annotate them. Later you can click on the link to open them. Ditto for urls in FireFox. Cool way to build annotated bookmarks or add metadata to your file system.
  • Paste images into notes
  • A cool 'screen snippet' facility that lets you mark an area of screen and capture a bitmap to poke into your note. This has a bug on my multi-monitor setup whereby the cursor does not appear on one of the monitors.
  • Taskbar OneNote button for post-it functionality
  • If you are one of the select few that have a tablet PC then you can scribble on the pages with a crayonpen. You can use the mouse if you want to write like a three year old.
  • Spelling checker
  • Search through notes for keywords
  • Very basic automation interface that just about allows you to post new items. Here I use Python to poke in a new page:
       1  #
       2  # Poke an entry into OneNote
       3  #
       4  
       5  import win32com.client
       6  import pythoncom
       7  
       8  oOneNote = win32com.client.dynamic.Dispatch( 'OneNote.CSimpleImporter')
       9  
      10  strTemplate = """<?xml version="1.0"?>
      11  <Import xmlns="http://schemas.microsoft.com/office/onenote/2004/import">
      12      <EnsurePage path="Postings\\Posts.one"
      13          guid="{10DA1EEF-6415-4ae8-AF79-9E099F3800A8}"
      14          title="Odours" />
      15      <PlaceObjects pagePath="Postings\\Posts.one"
      16                 pageGuid="{10DA1EEF-6415-4ae8-AF79-9E099F3800A8}">
      17          <Object guid="%(ItemGuid)s">
      18              <Position x="10" y="10"/>
      19              <Outline>
      20                  <Html>
      21                      <Data>
      22                          <![CDATA[
      23                              <html><body><p>Sample text here.</p></body></html>
      24                            ]]>
      25                      </Data>
      26                  </Html>
      27              </Outline>
      28          </Object>
      29      </PlaceObjects>
      30  </Import>
      31  """ % { 'ItemGuid': str(pythoncom.CreateGuid()) }
      32  
      33  oOneNote.Import(strTemplate)
    
    Toggle Line Numbers
    Notes on this:
    • You need to know the Guid of pages to add stuff to them and there is no way to inspect the guids of existing objects so you have to create guids for you own objects and remember what you called them.
    • It won't create guids automatically, you have to do it.
    • You have to specify the position (x,y) of an object on a page and there is no way of knowing if it will collide with another object. The interface was added as an afterthought in SP1 and it shows.
  • Encrypt pages, save passwords etc

What it doesn't give you:

  • No way to link from one note to another, in a different section for example. Hypertextual linking would take it to a new dimension.
  • Can't drag and drop a note from one page to another, have to cut and paste.
  • Integrate OneNote with Outlook or Word unless you have Office 2003.
  • You can only export files in .mhtml format, a mime encoded html archive. Not total lockin but close. No way to extract data through automation interfaces.

I'm going to give it a try, to see if it will become indispensable to me. It seems very version 1 (which it is), there seems to be a lot they could have done with it. However, give Microsoft credit, this does not appear to be another 'me too' app designed to crush competitors but an actual attempt to create a new product.

Update:

This suddenly got more interesting:

  • You can drag and drop an email message from outlook to onenote and the email message is stored in a '.msg' file and a link to the message goes into your notes. Something I have always wanted, the ability to thread emails with notes. This turns out to be a standard thing in Outlook (Xp version anyway), you can drag and drop messages into the desktop.
  • You can scribble on notes with 'ink' and save it all to a .mht file which just about anyone can admire in internet explorer. Amaze your friends. This example may work in Explorer, FireFox may show the raw mime message, which is interesting in itself, eminently parseable.
  • The 'research' feature is set of onlike books. You can look up words like 'plaintively' which aren't covered by google define.

Filed under: email firefox google onenote outlook python

3 Comments

Read about the BBCode Firefox Extension which adds right menu for adding BBCode markup. I had already looked at BBCode and decided that it isn't much simpler than plain html markup and I'd rather only remember one of them. So I went looking to see if there is a similar firefox extension to do HTML markup for this blog and... the BBCode extension can be set up to do html markup as well.


Filed under: blog firefox php


This is the ssh command line to connect to a squid proxy server via ssh:

ssh -L 3128:127.0.0.1:3128 user@remoteaddress

using cygwin open-ssh.

What is this doing? Well ssh starts running on the local pc and creates a socket on port 3128 (this is given by the first 3128 on the command line). Firefox is then configured to use localhost:3128 as the http proxy. ssh then takes connections to that port and forwards them to the ssh server running remotely. It will go through any firewalls in between provided that port 22 (the ssh port) is open. It encrypts whatever is going through it. The ssh server connects to port 3128 on the remote pc which is the squid server port. The squid server acts as a nice caching proxy server and fetches whatever web pages you are looking for.

This works with Ubuntu after installing the standard open-ssh package and the squid proxy.

It must work or you wouldn't be reading this.

Even more cool: using VNC over SSH. This allows gives you a remote desk top cool

  • install tightvnc package on remote server
  • on local pc run the command:
    ssh -L 5900:127.0.0.1:5901 user@remoteaddress
    
  • on server, run the command
    vncserver :1
    
    The first time you do this you will be asked for the login password.
  • On local pc, run a vnc viewer such as ultravnc. Connect to 127.0.0.1:0 and enter the password

This gives you remote access to the server desktop. Easy really and better, in my humble opinion, that using remote X, especially with a local PC running cygwin as X on that is a bit buggy.

Note: for me, vncserver :1 worked as X was already running on the box. The 5901 in the ssh command caters for display 1 being on a port number 1 higher than the default of 5900.


Filed under: cygwin firefox squid ssh ubuntu vnc

1 Comment

Put my new Drupal theme in place on my site. Some design notes:

  • It is xhtml + css, no tables, hand coded. That means big time trial and error.
  • It uses fancy rounded corners and shadows as these have been fascinating me. It's more a technology thing than a statement. My design skills are not good enough for this to be a statement.
  • It uses the Drupal phptemplate engine.
  • For a development tool I wrote a python script that would allow me to code the html like this:
    <div id="abox">
        <style>
            background: blue;
            font-family: verdana;
        </style>
        Hello Peter.
    </div>
    
    The python script parses this using the HTMLParser library, extracts all the <style> declarations and automatically generates the css file, e.g:
    .abox {
        background: blue;
        font-family: verdana;
    }
    
    I found this a better way for me to work, without having to switch between an html file and a css file (a process akin to maintaining c and h files in C programming).
  • The screen is resizable, it doesn't restrict the viewer to a 600 pixel wide strip down the middle of their £1000 21 inch monitor.
  • Choosing a colour scheme is hard for an engineer, especially a male one. I used this colour scheme generator in an effort to make it tasteful.
  • Tested on:
    • Firefox 1
    • IE 5
    • IE 6
    • Opera 7.54
    • Mozilla 1.6
    • Lynx

If it is broken in your browser then please let me know, unless you use some old version of netscape or IE3 in which case you should be accustomed to broken web sites.


Filed under: drupal firefox python theme

6 Comments

Been working on a new theme for my sites, something with round corners and shadows, xhtml and css. It's a really hard process of trial and error, testing it out in available browsers:

  • Firefox
  • IE5
  • IE6
  • Mozilla 1.6
  • Lynx

I've just spent a few hours on a weird problem in IE6 showing round corner bitmaps: the images were all slightly corrupted, as if they were not being displayed in the right place by a few pixels or were being partially overwritten:

images/ie6bug.gif

I spent hours fiddling with this, making sure my gif's didn't have transparent bits, googling for IE6 bugs etc but no joy. On a hunch I checked out the Drupal site and saw that the rounded corners there were corrupted as well.

I tried my new site with IE6 on my desktop pc and it was perfect.

Problem must be something strange about the graphics drivers on my Dell Inspiron 500m laptop.

New theme coming soon: it's already XHTML validated and has earnt a little badge: unlike Drupals bluebeach smile


Filed under: dell drupal firefox inspiron theme

2 Comments

Interesting to see that the new MSN Search can generate results in RSS format which is essentially XML and easy enough to crunch in python. You just submit a query and add '&format=rss' to the end, e.g.:

http://search.msn.com/results.aspx?q=peter's+blog&format=rss

gives this. What's useful about this?

  • can interrogate a search engine without screen scraping (hastle, hoping web page format does not change) or using the google api (limited to 1000 searches/day). There may well be terms and conditions that will stop bots doing 10,000,000 searches a day.
  • could set up aggregator to repeat search terms.
  • could be a use for firefox's live bookmarks.

Searching MSN for 'peter's blog' puts this site first smile Google reserves this for Tom Peter's Blog.


Filed under: blog firefox google python rss

1 Comment

Windows update is offering me the snappily titled Microsoft Windows Malicious Software Removal Tool.

Is this a free adware killer?

Do I need it as I only use IE when web sites won't work otherwise?

Is MS giving it away to make amends for all the security holes in IE?

At work they are deploying Firefox to anyone who wants to use the Microsoft Exchange Webmail feature. Exchange offers two webmail interfaces, a fancy IE one and a bog-standard one for everyone else. The IE one doesn't work outside the firewall because it is giving out URLs from an internal subdain. There is probably a way around this but the Firefox solution is the most expedient.


Filed under: email exchange firefox windows


Installed Ubuntu linux. Posting this from Firefox running on Ubuntu.

The installer created a version that worked pretty much automatically. The only tweeks I had to do are:

  • the installer hardware detection could not find my old dlink de220 ne2000 compatible ISA network card. I had to switch terminals and run:
    modprobe ne io=0x300 irq=9
    
    switching back to the installer, it found the network and was happy. It downloaded a load of updated modules from somewhere via the nerwork. It configured everything via DHCP, even found the name servers.
  • Once Ubuntu was installed it ran ok but network was dead again. I had to edit /etc/modules to add the line
    ne io=0x300 irq=9
    
    and restart (although a modprobe would probably have done the trick).
  • I used the network manager to change from the DHCP setup to a manual one so server has a static IP address.
  • I edited /etc/apt/sources.list to add a 'universe' repository so I could use the Synaptic package manager to install packages unapproved by Ubuntu. This allowed me to install xawtv. I also installed 83 module updates.
  • Ran xawtv from the command line and it Just Worked: the hardware detection had found my Pinnacle PCTV Rave and loaded all the bttv modules. Ubuntu seems to use a 2.6 kernel, hence my old problems were resolved.

Ubuntu observations:

  • Don't like the brown colour scheme.
  • root account is disabled! Everything has to be done via sudo. Apparently Max OS/X works this way. I was able to edit the config files above using 'sudo vim '. Sudo keeps prompting for passwords.
  • Synaptic package manager looks nice, nicer than dselect (old text based apt tool I used to use on debian with weird key assignments).
  • Samba network client Just Worked: was able to find Windows XP pc and poke around.
  • Not bowled over by the documentation on the Ubunto web site. Mostly Wiki notes, often directing me to Room 101, a catchall.
  • Modern X has much nicer fonts than Suse 6.4 vintage.

Filed under: dselect firefox isa linux samba ubuntu vim windows

3 Comments

Yesterday:

FireFox
decided to show me profile manager and refuses to let me open my old profile. Have to start new profile from scratch, installing extensions etc sad
ThunderBird
not connecting to IMAP server: waits forever and doesn't time out sad

Filed under: email firefox imap thunderbird

1 Comment