Rob Golding

Technology Consultant
  • Home
  • About Me
  • Curriculum Vitae
  • Contact

Custom Section Numbering in LaTeX

February 28, 2010

For our last coursework (which was for a really interesting compilers module), I chose to present my answers in LaTeX. It’s been a very steep learning curve, but I’m extremely happy with the results. I don’t even mind the slight drop in productivity that’s caused by my uncontrollable urge to stop and admire my document every so often! One thing that had me stuck for a while, however, was the automatic section numbering system.

To answer the questions for the compilers coursework, I wanted my sections to be numbered (1, 2, 3), my subsections to be numbered (a, b, c), and my subsubsections to be numbered (i, ii, iii). This numbering pattern matches that which is given in the question paper, whereby a number of nested enumerates were used. The default LaTeX section numbering however is (1, 1.1, 1.1.1). I finally found a way to alter this default behaviour by using the following code in the preamble:

\renewcommand{\thesubsection}{(\alph{subsection})}

\renewcommand{\thesubsubsection}{\roman{subsection}.}

This code modifies the way that the counters for subsections and subsubsections are printed (section counters are correct when left at the default).

I hope this saves someone even the few minutes it took me to work this out, once I’d applied some logic! It’s very useful to know that LaTeX has a counter for everything. This particular post was very helpful in working out which ones to alter, and how.

Comments
No Comments »
Categories
LaTeX, Life, Technology, University
Tags
LaTeX, University
Comments rss Comments rss
Trackback Trackback

It Begins…

September 22, 2009

The country has just undergone a mass-exodus of university students from their parents’ houses back into halls. I played by own small part in blocking up the roads moving back into university accommodation this weekend, and it’s all gearing up for the new school year.

I’ve been working with Django more and more lately, and I’ve written my first “commercial” application using my new favourite framework – a booking system for taught causes at the City Council. I’m really enjoying writing web applications with Django, and I’m sure this blog will start to resemble a web-developer’s in the near future.

Also, I’m really looking forward to this year at university. As I understand it, there’s a lot more work to be done, but the software engineering group project should be fun – as long as my “randomly chosen” team are happy with us using Python!

Comments
No Comments »
Categories
Django, Life, University, Web Development
Tags
Django, University
Comments rss Comments rss
Trackback Trackback

Exchange 2007 Autodiscover Issues

July 7, 2009

Exchange 2007 LogoOver the past week, I’ve been upgrading my e-mail system to Exchange 2007 (I was previously using Exchange ‘03). For me, it’s very useful to have the systems that I write about, and consult for, installed at home in a “semi-production” manner. It means that I have a system to work on, and I am concerned with keeping it up and running as smoothly as possible – which introduces me to intricacies that I would not otherwise encounter, if I were just running a little test lab.

For example, when setting up Outlook Anywhere (the rebranded RPC/HTTP feature of Exchange, allowing Outlook users to connect from outside the organisation) I discovered a lot of “Sync Issues” appearing in my Inbox. The messages all had a common theme:

11:19:07 Synchronizer Version 12.0.6315
11:19:07 Synchronizing Mailbox ‘User’
11:19:07 Synchronizing Hierarchy
11:19:07 Done
11:19:09 Microsoft Exchange offline address book
11:19:09              Not downloading Offline address book files.  A server (URL) could not be located.
11:19:09       0X8004010F

Clearly, something was wrong with the Offline Address Book. I was only getting these messages when using Outlook Anywhere, however, so this issue was obviously specific to RPC/HTTP.

Looking up the error code, I found that the problem I was experiencing was very common, but that nowhere seemed to have the ultimate repair. The information available was sparse, and I had to put together my own solution – which I will document below.

First, I registered an extra DNS (A) record for my email domain, called “autodiscover”. I must be clear here, that this is for the mail domain, not for the domain used to access your OWA site. For example (and we’ll go with the Microsoft classic here), if your users have addresses such as user1@contoso.com, user2@contoso.com and you access your OWA via https://mail.contoso.com/owa, then you need to register an A record for autodiscover.contoso.com.

Next, I prepared a new certificate request, that would hopefully end up with me obtaining a certificate that I could use to replace the current one, which would be valid for both mail.contoso.com and autodiscover.contoso.com (to continue with our example) – so that my Outlook clients could successfully access the autodiscover service, and download the OAB. To do this, I used the following EMS command:

New-ExchangeCertificate -domainname mail.contoso.com, exchange.contoso.local, autodiscover.contoso.com -Friendlyname “Contoso Exchange CAS SAN Certificate” -generaterequest:$true -keysize 1024 -path c:\certrequest.req -privatekeyexportable:$true –subjectname “c=GB o=contoso inc, CN=mail.contoso.com”

This command requires a little explanation. The -domainname switch is used to specify a list of addresses for which this server is valid. This is called a SAN (Subject Alternative Name). Not all CA’s support SANs, but Windows Server 2008’s CA Services does, which I will come back to later. Next, we give the certificate a “Friendly Name”, which is just a reference for you, the administrator. Then we specify that we are looking to generate and save a request, and that we want to be able to export the private key. The Subject Name is important, but also slightly confusing. You must specify your country code (US, GB, ES), your organisation name, and Common Name (CN) – which is the most important one. This must be the URL used to access the SSL service using a web browser, so mine was mail.contoso.com.

Once this request is saved, I passed it on to my CA to get the certificate issued. If you’re using a 3rd party CA (like VeriSign), then you’ll have to check first whether they support SANs. I use self-signed certificates, and my CA is running Windows Server 2008, which does support SANs, so I issued the request internally. This is done by accessing the CertSrv website, at http://servername/certsrv, and clicking the “Request a Certificate” link. Then, I chose “Advanced Request”, and pasted the reqest file’s contents into the box, and picked the “Web Server” template.

This presented me with a downloadable certificate, which I saved locally in CER format on the exchange server. Then I used the following command to import the certificate:

Import-ExchangeCertificate –path <certificate>

Once the certificate was imported, I enabled it for use with exchange. A similar command is used for this:

Enable-ExchangeCertificate

This prompted for a list of services, where I entered IMAP, IIS, SMTP as these are the default installed services. Only IIS actually gets used here, so I shouldn’t worry too much about this one. If you’re not sure, then just enter the same as me. Lastly, it asked for a thumbprint, which I copied and pasted from the output of the import command. Finally, after accepting the confirmation, the certificate was enabled.

And that was it. Both OWA and Outlook Anywhere are now working perfectly, and hopefully this post will help at least one other lost soul with the same problem!

Comments
No Comments »
Categories
Exchange, Home Network, Life, Technology, Windows Server
Comments rss Comments rss
Trackback Trackback

The Trials and Tribulations of Django + Git

June 2, 2009

I just finished my last exam today – Web Programming and Scripting – which explains the distinct lack of activity around here in recent times. Thankfully I could end my exam season on a high, as web programming is, well, what I do – so it wasn’t too much of a challenge!

Something strange happens to me every time exams come around. I seem to pick up new projects, and just run with them. This time, I’ve become involved with a small group of people at university, writing a portal-style information system for universities. I suppose most people call this behavior procrastination, but I’m quite deeply in denial about that.

Ever since my post about the Backtrac Backup System, I’ve been really enjoying using Django. Something about it just makes developing for the web, well, exciting. That can only be good, right? I am the designated server administrator for this latest project, mostly due to the fact that I am the only one with a server to administer, and some of the things I’ve learned so far seem worthy of a mention here.  Firstly, we as developers were – how can I put it – stepping on each other toes somewhat. The project at this point had no version control, so we were just editing a bunch of files over SFTP. Obviously, some sort of Source Control Management was in order. I did some research, and decided that Git was a nice, modern alternative to the ever-popular SVN. It also meant that my server was constantly backed up by everyone on the team – but that’s just a bonus!

So, I installed Git, and started a repository. A lot of effort went into learning how the system works, and more importantly, how to make it work for us. Directed Acyclic Graphs thankfully made some sense to me, so I could just about understance the documentation. I wrote some custom hooks, and a C Program to syncronise the web-server. I was happy, and absolutely certain that this was the solution to all our woes. I was mistaken. Git just didn’t work the way I had hoped. The custom hooks were throwing permission errors all over the place, and my development team (read: my friend Rob Miles) was locked out of the repository. We made the decision yesterday to scrap Git, and go back to the previous system of editing the files over SFTP. We are always in constant communication when developing for the project, so it’s not too big a deal, but I feel that I failed as an adminisrator. You see, as an admin your job isn’t just to play with cool toys and loud servers – your primary purpose is to give the users what they need to work, and that is most certainly not what I achieved.

I’m glad I took the time to learn Git – and I’m sure it will help me later in life, in some way or another. It’s just unfortunate that it didn’t work out the way I had hoped for our project.

Comments
3 Comments »
Categories
Life, Technology, University, Web Development
Comments rss Comments rss
Trackback Trackback

My Latest Project: BackTrac Backup System

March 6, 2009

My life has been pretty busy as of late, mostly with a new project I am working on called BackTrac. I am developing a network backup solution, written entirely in Python – using the Django framework as a front-end web interface.This came at quite a good time, as I’ve been asked to give a presentation on any highly technical topic, on which I know my stuff. The plan is to use BackTrac as a base, and to explain the technical concepts behind the system that make it work. The things I am going on concentrate on are:

  • Pyhon in general
  • XML-RPC
  • Filesystem hardlinks
  • The MVC concept, and Django

This should be enough content to fill a 15-minute slot, I hope.

Now I’ll explain a little bit about how BackTrac works, for the benefit of those not coming to the presentation.

What I wanted to achieve with BackTrac was a smart backup system, that doesn’t necessarily have to be the fastest. I wanted a very detailed web interface, with scheduling capabilities and log view. I decided on Django for this, seeing as I had already decided on Python for the system itself.

The nodes in the system use XML-RPC to communicate, and SMB for the actual file-copying. The real bonus of this system is that it takes advantage of a little-understood feature, present in most modern filesystems, called hardlinks. Hardlinks enable the user to essentially point to the same piece of data on a disk from more than one position. Essentially the concept is that if a file has been backed up before, why back it up again? Just create a link or “shortcut” (a hardlink) to the previously backed-up file. This is the basis for BackTrac.

Also, Django is turning out to be a real treat. This is the first time I have used an MVC like Django, and I’m really enjoying it. Web development is exciting again! I do agree with one point however, that Django makes the easy things easy, and the hard things impossible. Not quite impossible in my case, but I’ve had to do some pretty strange things to get Django to do what I want.

Finally, I’ve had the BackTrac project approved on Sourceforge.net, so watch out – I’ll be doing the initial import soon and getting some web content online. First though, I have to decide on the best way to distribute the application. This is a bit more complicated than it might otherwise be, because there are three different aspects of the system – the client application, the server application, and the Django project. On this topic or any other, as usual, opinions are most welcome.

Comments
1 Comment »
Categories
Life, Technology, Web Development
Comments rss Comments rss
Trackback Trackback

Dell Studio Laptop Wakes Itself up from Hibernate

November 28, 2008

My new laptop, a Dell Studio 1535, has started exhibiting a strange problem as of late; when I hibernate it over night, it resumes early in the morning, waking me up with the fan spinning.

I was preparing to send the thing back to Dell, when it happened one night and I checked out the event logs. It turns out that Windows Update was resuming the machine from hibernate – and then updating itself. After turning this off, I’ve had a good night’s sleep! Also, Windows Defender was scheduled to scan the machine every morning at 2.00am, so that’s been disabled too.

-

I hope this post can provide answers to anyone else experiencing a similar issue.

Comments
10 Comments »
Categories
Home Network, Life, Technology
Comments rss Comments rss
Trackback Trackback

Ubuntu and The University of Nottingham’s Proxy

November 24, 2008

I have recently enrolled on a Computer Science course at The University of Nottingham, and as such have had to make sure my machines correctly use their proxy server for web access. This post outlines the process of configuring Ubuntu for exactly that purpose – and could be applied to any network with a similar layout.

Network Proxy

First and foremost, Ubuntu has a setting in gnome for the Network Proxy, which should set gnome’s proxy – but I can’t see as it affects anything at all – still, better to be safe than sorry.

At Nottingham University, the recommended configuration is a proxy auto-configuration script (proxy.pac) which is downloaded by the client and parsed to configure the appropriate proxy server. In this case, it is located at http://wwwcache.nottingham.ac.uk/proxy.pac. This URL is entered into the correct field of the gnome Network Proxy settings dialogue.

Terminal Proxy

Secondly, the terminal has a proxy configuration option, so that programs that run inside the terminal making HTTP requests can access the internet – namely wget and aptitude. This is slightly more difficult to configure than the previous, and is achieved like so:

The terminal proxy is set using a variable called http_proxy, which is set using the export command, i.e.

export “http_proxy=http://proxy_server_ip:port”

In this case, the proxy server’s IP and port for the SNS (Student Network Service) is 128.243.253.119:8080.

This change can be made permanent by editing /etc/bash.bashrc, and adding the above line to the end of the file. Otherwise, the change is only effective in the terminal window currently open by the user, and disappears when it is closed.

Synaptic

Lastly, Synaptic Package Manager must have the proxy set, in order to update your installation using the in-built Update Manager or Synaptic GUI. This is done by opening Synaptic, and choosing Settings, Preferences, and setting the above proxy information using the Network tab. Unfortunately Synaptic cannot read auto-configuration scripts, so the IP and port must be manually entered here.

Obviously once all this is done, Firefox must be configured to use the correct proxy – but I trust you know how to do that! This turns out to be quite a pain, so I’ll be looking at ways to do this in one fell swoop. If anyone has any suggestions, then please let me know.

Note: These changes can be made much less painful by adding an entry to the hosts file for each of the proxy IPs you need to configure – so you only need to type the word proxy for example, instead of the entire IP. I will document this process shortly in a separate post.

Comments
13 Comments »
Categories
Life, Linux, Technology, University
Comments rss Comments rss
Trackback Trackback

Upgrading to Ubuntu 8.10 (Intrepid Ibex)

November 2, 2008

The next incarnation of the Ubuntu linux distribution came out at the end of this week, and whilst typing this post, I am upgrading my laptop’s operating system. Unfortunately, I was unable to upgrade in the way that is described on the website here, instead my update manager seemed to think that the system was completely up-to-date, even after multiple refreshes. Therefore, I’m just upgrading the old-school way, by running the following commands:

sudo apt-get update

sudo do-release-upgrade

So, hopefully the improvements to gnome, and the new Dust theme will go down a treat when the upgrade’s finished. Personally I’m looking forward to the new BBC iPlayer integration with Totem, Ubuntu’s media player – and hoping for some improvements to Microsoft Exchange connectivity within Evolution, the mail client.

I shall keep the world up-to-date, as this journey continues!

Comments
No Comments »
Categories
Life, Linux, Technology
Comments rss Comments rss
Trackback Trackback

Foxmarks – The addon I could no longer live without

October 21, 2008

As time goes on I seem to be accumulating more and more machines – whether they be physical or virtual – which causes somewhat of a problem with my bookmarks. I use my bookmarks as a sort of knowledgebase, with solutions to problems I have encountered in the past for example.

The solution to this dillema: Foxmarks. I’ve had this addon for a long time now – since it was just a simple little bookmarks backup application – so I’m really impressed with how it’s turned out. Basically, Foxmarks syncronises your bookmarks with their server, so that you can access your bookmarks from any machine with firefox installed. It also functions as a backup if your profile goes bad.

Recently I’ve started at university, so I’m using my laptop as my primary machine nowadays, along with a firefox profile on the Computer Science machines. I’ve also got a few virtual machines on my laptop with firefox, so the amount of profiles is getting larger by the day. This is where foxmarks really comes into its own, keeping my bookmarks current between all my installations.

Comments
2 Comments »
Categories
Life, Technology
Comments rss Comments rss
Trackback Trackback

New Article up on maxms.net

December 26, 2007

For the first time in 7 months, I’ve finished writing a new article for my resource site – maxms.net. The article is entitled Folder Redirection with Group Policy in Server 2003 – it’s purpose should be explained fully in the title!

If this helps just one person out there, I will be happy. I’d be even happier if they contacted me to let me know it helped :) . I hope this will signal a revival for the site, and I shall continue writing more articles as time allows. Any suggestions for future articles are welcome, just shoot me an email with the contact button up top.

For a direct link to the article, and some shameless self-promotion: Folder Redirection with Group Policy in Server 2003

Comments
No Comments »
Categories
Life, Technology, Web Development
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Pages

  • About Me
  • Curriculum Vitae

RSSFollow Me

Rob Golding
  • I've lost my car under all this white stuff...I'm sure it will turn up soon. 10:57:50 AM February 21 from HTC Peep
  • @BenJenkinson I certainly do! Everyone but Simon and River. 07:32:19 PM February 07 from HTC Peepin reply to BenJenkinson
  • Is it sad that my servers are now all named after firefly characters? 12:58:30 PM February 07 from HTC Peep

Recent Posts

  • Mercurial on University of Nottingham Computer Science Servers
  • Custom Section Numbering in LaTeX
  • Linux-Windows Integration (à la Likewise-Open & Winbind)
  • It Begins…
  • Exchange 2007 Autodiscover Issues

Archives

  • March 2010
  • February 2010
  • December 2009
  • September 2009
  • July 2009
  • June 2009
  • April 2009
  • March 2009
  • January 2009
  • November 2008
  • October 2008
  • September 2008
  • July 2008
  • April 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007

Technorati

Blog Information Profile for robgolding63
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox