WordPress Themes at davelevy.info

I am basing my newer themes on zBench. This page talks about customisations I have undertaken or am in the process of implementing. It includes stuff about header images, the front page, (mainly full articles vs. snippets) and favicons.

Header Images

The theme editor panel allows one to assign an image file to the header. Since this was one of the motives for moving the blog to wordpress, I really should get on with it.

Front Page

The default front-page is implemented using index.php.

For the wiki, I should make a new front page, maybe, this page at themelab explains how to do this simply.

This article Corporate Blogs: Front Page Structure, recommends the use of summaries on the front page, as opposed to the full articles. During July, I wrote some exceptionally long articles, and published them out of order  which really made finding content really hard, and even following the story hard.

This wiki also uses the read more  features of WordPress. I researched this, with help at the wordpress community forums, I started a thread called, use of Insert More with zbench, which discuss the use of ‘insert break’ button and the dashboard settings. This page at the wordpress codex, called, Customizing the Read More explains how to use the read more features.

In October 2013, I decided to revise the Read More functionality, I installed the advanced-excerpt plugin in order to have some say on length of the the excerpt. This gives some issues around the hypertext link and decoration for the hypertext link. The rendering of the » symbol varies, and for the default look in zbench it is managed via a css class rule which is quite pretty.

I also installed the featured picture widget and set up a CSS rule to force the pictures to aligh left.

I decided to emulate the comments page by having horizontal lists detailing the catagories and tags for each entry.

I get them using the following functions,

<!--- entry customisation code by dfl  16 Oct 2013 --->
   <span class="post-info-bottom">
   <span class="post-info-category">
       <?php echo get_the_category_list(','); ?>
   <span class="post-info-tags"><?php echo get_the_tag_list(' ',', '); ?></span>

The post-info-* classes are part of zbench, the use of get_the_category_list realises a class called .post-categories. I have defined the following CSS rule

    .post-categories ul li {list-style-type: none; display: inline; }

which makes the category list behave properly.

Fav Icons

I have used the HTML editor in the dashboard to insert the favicon code lines. I used this page, http://is.gd/SHiZED as a guide which also points at a favicon maker.

BT Broadband

The UK’s premier provider of residential broadband services. This page holds my notes on their Fair Usage policy as at Autumn 2011. The comment documents BT’s transition to true unlimited. The page is now pretty much out of date.

On the 25th July (2012?), I started to document the performance of the line at home. This is held, originally in the comments, and on transition to this platform as the final comments on this page. . Continue reading “BT Broadband”

Orange and Mail

You’d have thought that I’d have configured enough phones to know my mail config paramters by now. So here’s so I don’t have to forget.

Using the HTC mail client with tiscli as my mailbox provider and orange as my telco.

pop: pop.tiscali.co.uk, no security

smtp: smtp.orange.net – no login

default ports

Not sure if ‘send’ works over wifi


Lustre is the premier HPC parallel file system.

It was originally an open source project which Sun Microsystems bought and when the Oracle aquisition occurred it seems that Oracle failed to run with it

Here are some links I found,

Unfortunately the last of these points to an old Sun web site page, that  no longer works and I can find no reference to the Lustre .rpms on the Oracle Site, except on this Oracle Technet page about HPC.

I want to install it to run some tests but can’t find the rpms.

So it seems that http://www.whamcloud.com/ have picked up the ball.

pkgs.org points to http://pkgs.org/centos-5-rhel-5/puias-computational-x86_64/lustre-

The US NRAO says this about it, detailing the Red Hat sources

An alternative might be http://www.pvfs.org/

Configuring NTP

I want to configure NTP on this box, i.e. the Cobalt Qube as its losing time. Badly.

Dhis is now done, I have a very simple ntp.conf file and am using DNS hostnames. This is not advisable under Linux because you must have a valid DNS service available when the daemon seeks to resolve the addresses. It might be possible to resolve the dns names vis the /etc/hosts file. The Howto article below is quite good.

The test should be ntpq -p to see if the deamon is working Ok, I don’t think the Cobalt ntpd script does this; it browses the process table.


  1. check ntp isn’t running
  2. Add the server lines to /etc/ntp.conf, you really need two. Use time servers from organisations that permit or don’t care that one’s taking a feed.
  3. Enable port 123/udp on the firewall
  4. Start the daemon
  5. Test the service using ntpq, can you see all the configured servers
  6. If the drift is significant from the time server, then take the service down and then use ntpdate -u to set the clock

The Linux chkconfig utility is set up for the rc script and I shall therefore invoke it using chkconfig -add.

I have found the following links

I returned to this in 2011, and found http://www.pool.ntp.org/en/use.html. It’s all got a lot easier.

Municipal WiFi

In Jan 2012, the Telegraph ran a story on how Westminster and Kensington & Chelsea boroughs have agreed with O2 to build the world’s biggest free wifi network, this is mirrored at this thread at South East Central.

  • Municipal Urban WiFi at Wikipedia, includes a list of Cities with fee Citywide WiFi, in the UK, Bristol and Norwich. (Liverpool has a paid service and the funding status for Newcastle in County Down is unstated.)

San Francisco

San Francisco famously experimented with free city wide WiFi. It was started with quite a splash and I was visiting it on a frequent basis. It seems they have suspended municipal investment in the programme in 2007 and invest in more directed programme to resolve the digital divide.


I returned to Python in Oct 2010.

I have two problems to solve,

  1. converting my bliki to wordpress
  2. scripting for KDB & Hadoop

Notes on the old Bliki

  1. http://davelevy.dyndns.info/snipsnap/space/Dave/Python+datetime, a list of notes
  2. http://davelevy.dyndns.info/snipsnap/space/Dave/Python+2.x, an article about my initial python build on the Cobalt Qube. This is really no longer relevant, and an example of content, that should NOT be brough across.

Notes on File I/O

  1. http://docs.python.org/tutorial/inputoutput.html
  2. http://www.penzilla.net/tutorials/python/fileio/
  3. http://www.techniqal.com/blog/2005/05/17/python-simple-file-read-and-write/

Notes on Date and Time

Python does not load the datetime, calendar or time modules as default. They need to be imported.

  1. http://docs.python.org/library/datetime.html
  2. http://docs.python.org/library/time.html

I also found the following tutorial useful.

There is an example of how to use gmtime and strfdate in my wiki entry, on Snipsnap to WordPress.

Notes on blogs.oracle.com

Originally posted on my sun/oracle blog in Feb 2009, copied here in July 2016.

We also discussed Python. I have been trying to write a game theory solver for a 2×2 formal game. I was representing the game as a dictionary so that I could retrieve game scores using the strategy names. One problem is that two dimensional dictionaries get syntactically cumbersome. I had ended up with a list as the key. In theory it should make the programming easier, where game is a dictionary attached to class instance g.

i.e. score = g.game[(‘decoy’, ‘defend’)]

makes great sense where decoy and defend are blue and red strategies, however, I have usually placed the evaluation of a score in an iteration, and so coding the strategy names is rare e.g.

strategies=['heads', 'tails'];
for s in strategies:
    # some iterated code

It is probably simpler to represent the game as a 2×2 matrix held in a list and to use the classic technique of holding the names of the strategies in an ordered list so we can translate the matrix cell location such as n(1,1) into n(tails,tails) by looking co-ordinates up in one, or two name lists.

score=matrix(strategies.index('heads'), strategies.index('heads'))

This would also have the advantage that I could look for and use the matrix manipulation packages that exist to avoid writing a lot of code. The code would look a lot simpler, and not just because I have put a lot of it in an external package; this is usually a good clue that the answer is correct.

Lesson 1: Be careful when using dictionaries.

Python Path

Actually PYTHONPATH, according to my findings, the python module loader looks for modules in the same directory as the top level file, the PYTHONPATH, the standard library directories and then the contents of any .pth directories.  The last technique is useful for windows and where you want it towards the end of the search order.

Socket Programming

It has to be Python

Don’t ask.



This was the web platform for Vanessa Garlick and Liz Gorman’s final year undergraduate project.


WordPress gives us most of what we need, most importantly identity and authentication functionality. The one thing we are obviously missing is a voting solution.

I have found two,

  • Post Voting, this is their web site, it is available via the ‘install themes’ page.
  • Vote it Up, this is on the wordpress site.

We want to vote on Posts aka Places, Proposals and Comments. This means that we need to distinguish between comments and proposals. This may require using templates to force the use of pictures. a ‘Proposal’ tag and forcing the inclusion of the voting panel. The installation of votes into a theme, may involve editing the .php files. WordPress document ‘the Loop’ on the codex, which needs to be understood. The voting themes give us a way of reporting the votes.

Domain Name

I ordered this domain name, but got the web interface wrong. It placed the domain in a separate commercial package. I rang ‘one and one’ who talked me through the transfer. The support call id is 245322465. Thanks.

Header CSS

I added an 8px margin top to the header logo.