About Archive Tags RSS Feed

 

Entries posted in January 2007

All the pigs are all lined up

1 January 2007 21:50

I am slowly recovering from a very hectic New Year Eve celebration in Edinburgh. I was surrounded by a several visiting schoolfriends of my girlfriend, and we even managed to meet up with a couple of visiting Canadians - the ex-girlfriend of an online friend and her cousin (both freshly arrived only a day or two ago).

Edinburgh weather was appalling, to the extent that the outdoor street party was cancelled - and several large trees were blown over in Leith.

The girls and myself spent the night walking around far too much before settling into a local pub and hearing the bells.

Now that I'm recovered I've just released a new version of xen-shell which allows you to control a number of xen instances rather than just the one.

I'm still not a nice person though.

| No comments

 

I've got a trigger inside

5 January 2007 21:50

I'm trying to learn ruby, but having no inspiration of what to write with it.

My girl suggested I post "Will code for films" and see what people would pay to have written .. I expect very little. Still who knows?

I'm suffering connectivity issues again, which are making me actual freetime difficult to spend. Grr.

To follow the meme: Five random facts:

  • I believe that garlic can be used to enhance all food. Even ice-cream.
  • My first scar was given to me by my sister, when I was approximately six weeks old. Families, eh?
  • I have lived in the same flat for 2.5 years, and in all that time have never opened the bedroom curtains/blinds.
  • I have twelve bottles of Single Malt in front of me. Current favourite? A balvenie.
  • I rarely dress before noon.

And for bonus points: "My girl" refers either to my sister, or my girlfriend. Context usually makes this obvious if it matters…

| No comments

 

But still you'll never get it right

11 January 2007 21:50

Command of the day:

ls -sh

I didn't know /bin/ls could do that. Neat.

Now if I write it down often enough I'll be able to remember it when I need to use it. Hopefully.

| No comments

 

Would you choose to walk or stay

15 January 2007 21:50

Once upon a time I wrote a collection of shell scripts for managing virtual hosting. Combined these allow me to easily.

  • Add/Remove/List Apache2 virtual hosts.
  • Add/Remove/List virtual domains for use by Exim4.

These work well, but every now and again I think "I want a web-based control panel".

After mulling this over for a while and remembering how many of the existing control panels are tricky I'm actually going to do it.

There are two hard parts:

  • The user-interface is key.
  • The format I'm using for domains isn't appropriate.

The last point is the part I'm worrying about right now. So far I have a list of mail domains, and a list of web domains - and the two are unrelated. This becomes obvious when they are listed:

DomainFacilities
steve.org.ukMAIL
bar.steve.org.ukWEB
foo.steve.org.ukWEB

See? No link - I'd expect to see the domains listed as just "steve.org.uk" with links to "Mail" showing the mail setup, and "web" showing the subdomains.

Or maybe they really should be listed seperately - I can't decide.

(For reference here is my live listing of domains - where the problem becomes obvious. Note that you'll not have permissions to see my server stats…)

So I need to decide how to handle this - I also need to be "inspired" by OSWD.

I think the plan right now is to store all data in a database, then regenerate the plain text configuration files on demand. That should give me the best approach - if I restrict myself to running HTTPS on a custom port and avoid the ability to modify the files by hand…

Feel free to tell me this is misguided, or inspired.

Although I remember the last time I talked about control panels and I'm still not seeing a good solution.

I want to be able to:

  • Add/Remove/Enable/Disable apache2 virtual hosting setups.
  • Add/Remove/Enable/Disable exim4 virtual domains - with optional mailing lists (ecartis)
  • Have only "server admin" vs. "nobody" - no resellors etc.
  • Avoid PHP like the plague.
  • Have it be utterly secure. (Ha!)

| No comments

 

Turn another page at the animal bar

21 January 2007 21:50

When I moved to Edinburgh and lived in a student flat we decided we needed pets.

Gerbils were chosen as they were small, cute, and easy to hide. (Because we weren't actually allowed to keep pets ..)

After a few years of gerbils we graduated to rats. The king of the rodent world.

Rats rock: They are small, cute, agile, incredibly soft, very non-bity and highly intelligent.

Time passed and I moved out to live alone and then started to move up the food-chain with my own pet cat. (Tigger).

Badnesstm happened, and Tigger was "replaced" by Six.

I got hit with a year of illness, mostly, and so I decided to do the decent thing and return Six to somewhere where he could be loved and get the attention he deserved.

Since then I've been petless, and basically afraid to commit to looking after a cat/dog for the 10+ years that they would (hopefully) live. I want to have a cat. I would love to own a Dog, and after talking about things in a circular fashion for many weeks with my girlfriend we decided to compromise.

So … tada .. I have rats again. Two beautiful females.

Here is a picture of one of them upon my girl's shoulder.

So two rats, Basil for me, and Moptop for Meg. All being well they will live for the next couple of years, and then we might return to the bigger pets.

| No comments

 

I dont mind not knowing what lies down the track

23 January 2007 21:50

I've got my first real rails application working correctly - a simple online bookmark system, which is scuttle-lookalike. (This is part of my master-plan to remove PHP utterly from the few remaining places where it exists upon my server(s), so it isn't as pointless a project as it appears to be!)

It is pretty neat, and it handles most of the things you'd expect.

Fetch it from CVS and install it with the following recipe:

cvs -d :pserver:anonymous@cvsrepository.org:/home/cvs login
cvs -d :pserver:anonymous@cvsrepository.org:/home/cvs co bookmarks
cd bookmarks/
mysql --user=root -p -e "CREATE DATABASE Books_development" 
rake db:migrate
ruby script/server

Once that is done point a browser at http://localhost:3000/ - and you should see something like this.

(If there is no admin user setup it will display a "signup" link, once there is an admin defined this will go away. When you're an admin you can view/edit/modify all the bookmarks which are set to "private".)

I'm new to rails, and ruby for that matter, so if this is packaged badly, or is missing something to make it work please do let me know.

Updated: Changed from download to the CVS repository. I also have a collection of tools for exporting from Insipid & Scuttle if they are useful let me know.

| No comments

 

Tell you, might not believe it, but

25 January 2007 21:50

I would like to have a simple way of mirroring a webpage, including any referenced .css, .js, and images.

owever to complicated matters I wish to mandate that the file will be saved as "index.html" - regardless of what it was originally called.

This appears to rule wget out, as the -output=index.html option trumps the -page-requisites flag (which is used to download images, etc which are referenced.)

Is there a simple tool which will download a single webpage, save it to a user-defined local filename and also download referenced images/css files/javascript files? (Rewriting the file to make them work too)

Using Perl I could pull down the page, and I guess I could parse the HTML manually - but that seems non-trivial - but I'd imagine there is a tool out there to do the job.

So far I've looked at curl, httrack, and wget.

If I'm missing the obvious solution please point me at it ..

(Yes, this is so that I can take "snapshots" of links added to my bookmark server.)

| No comments

 

Time is like a fuse, short and burning fast,

28 January 2007 21:50

Disjointed:

Busy weekend: A brief trip to Glasgow, a lot of rat-lovin' and a few minutes to hack on CFEngine package automation.

I discovered insane performance problems with running Ruby on Rails applications under libapache2-mod-fastcgi so I switched to Apache2, mod_proxy & mongrel.

The process wasn't as painless as I'd expected - so I might write it up shortly.

In other rails-news: I can't get typo running on Etch. Migration from wordpress 2 fails in strange ways. Help?!

In other news xmms on my AMD64 machine, reading /home/mp3 over an NFS share locks up every couple of days. Not sure if this is an AMD64 bit problem, or if the NFS usage is responsible. I should investigate. (The GUI is visible and responsible; but hitting "next", "play", etc, result in no action. I usually have to "kill" it - then restart.)

| No comments

 

When the light begins to change

30 January 2007 21:50

All being well I now have a blog working using Typo, instead of Wordpress 2 - and no broken links!

We'll see.

Now to make sure that my server load doesn't rise through the roof this time.

For future reference importing entries from Wordpress2 -> Typo will almost certainly give you this error:

1
2
3
4
5
const_missing': uninitialized constant TestRequest (NameError)
        from ./db/converters/../../config/../app/models/blog.rb
...
..
.

This can be fixed by changing:

1
2
3
4
5
def really_send_pings(serverurl = blog.server_url, articleurl = nil)
   return unless blog.send_outbound_pings
   ...
   ...
end

To this:

1
2
3
def really_send_pings(serverurl = blog.server_url, articleurl = nil) 
   return
end

| No comments