Meta

You are currently browsing the archive for the Meta category.

Just testing Wordbook. If all is well, this blog post should appear on my Facebook profile!

Friday, 3 October 2008 | No comments

One of the attractions of Bluehost, my host, is the ability to ssh into your box, which makes administering your site that much easier if you know how to use the *nix command line. (See related post.)

I’ll just write about two things that I’ve worked out recently.

Lesson #1: Read the README file.

Well duh, you say. The story is, I’ve had the bash_completion script for some time (a really useful extension that makes typing on the command line that much easier), but I’ve never quite worked out why it didn’t work. Now I know why. It’s because I naively assumed that the bash_completion.sh script was the meat of it, and simply called it from .bashrc, expecting it to just work. It would, ordinarily, but I don’t have it installed in /etc which is where it expects to be (it’s in my home directory). If you have somewhere else like me, you will need to set the $BASH_COMPLETION variable and modify the bash_completion.sh script to reflect where you’ve actually put it.

Lesson #2: If you didn’t set up the system yourself, things might not be as you expect them to be.

SUITS has a bunch of useful scripts that you can use to improve your command line experience on the undergraduate IT servers, and I copied them over to my account on nointrigue.com because I like them so much. One of these scripts sets nice colours for the command line. It was all working fine until I realised TortoiseSVN could no longer access the Subversion repositories via svn+ssh, failing with the error “connection closed unexpectedly”. I figured something I added recently was injecting garbage into the stream. It turns out it was the colour-adding script! But why? It was protected like this:

if [ -n "$PS1" ]; then
        . ~/.bash/colors
fi

That means that it should only have been run if it was running in an “interactive” terminal, and the colour-adding script should not have been called if I was using svn+ssh. After some more poking around, I found this in /etc/bashrc (which was being called from .bashrc):

# For some unknown reason bash refuses to inherit
# PS1 in some circumstances that I can't figure out.
# Putting PS1 here ensures that it gets loaded every time.

Uhh, ok, nice work, Bluehost. I guess not many of their customers actually use ssh. At least there was a comment.

But even if it was called, why the colour-adding script was failing in the first place? It turns out that tput colors fails if $TERM is not set, which happens to be so when using svn+ssh. (Actually, this would not normally prevent me from accessing my Subversion repositories. The command line svn seems to ignore errors; however, TortoiseSVN dies the moment it sees anything untoward.) My ultimate solution was to simply pipe error to /dev/null.

Tags: , , , ,

On a blog, asides are short posts (like this one), designed to allow you to write in a more fluid and dynamic manner; as the linked article says, “The format of a weblog dictates its writing.” I’ve been looking for a place to stick up random thoughts or two, or an interesting link, and my new template just happens to allow for asides - perfect!

Saturday, 16 August 2008 | 1 comment

Gallery2 database error

I thought the sky almost fell down just then when I went to my gallery2 installation (/gallery) and saw that it had a database error. “Noooo!!! I’ll have to spend hours reinstalling and uploading again!” The error in question was

An error has occurred while interacting with the database.

If you get this error, don’t panic. For me, it turned out that one of the database tables was corrupted and needed repairing. Log in to phpMyAdmin or to the mysql console and check whether any of the tables are listed as corrupt. In my case, it turned out to be g2_CacheMap.

I snooped around some forums, and in the threads that had responses (a lot of forums have questions left unanswered unfortunately), it seems like the blame lies with your host having a bad mysql setup or bad hard drives that corrupt at random. Shame on you, Bluehost.

Tags: , , , ,

Blogging

It would be amiss of me not to post at least once during the month of December, but posting on the last day of 2007, that’s what I’ve almost done.

It’s reticent of me not to have posted regularly recently, as I promised to do earlier on. However, blogging is something that requires momentum - for me at least, once I start writing, I can’t stop, but it’s getting started that’s the problem. Maybe that’s why my law assignments always get written so late. I lost momentum in the lead-up to honours thesis submission and then the inability of the older version of Opera to cooperate with WordPress while I was in Hong Kong was a bit of a showstopper. But maybe I’m just making up excuses.

Writing regularly is a good thing to do: I think, like muscles, writing ability gets lost if you don’t use it. Joel Spolsky, a prominent software developer and writer who anyone interested in the business of software should read, mentioned in his blog that one of the best courses he ever took at university was one that involved copious amounts of writing: “Being able to write clearly on technical topics is the difference between being a grunt individual contributor programmer and being a leader”.

I’ll try and regain some momentum in the immediate future, and I hope that I’ll regain your trust as readers.*

* The less I write, the less people read my blog (as measured by the statistics I get). Makes sense doesn’t it?

Tags: , , , , , , , ,

New blog categories

After realising that I’ve been tagging most of my entries as “General”, I thought I’d go and fix up the categories on this blog. After looking at what I’ve been writing about for the last 6 months, I came up with a number of new categories, and I’ve made an attempt to recategorise everything written so far into the new categories. None of the old categories have been deleted, so your RSS feeds should still work (you can get a feed for a particular category by appending /feed to the URL).

Speaking of RSS feeds, if you haven’t subscribed to my blog via RSS, it’s easy - just click the Entries RSS link on the left sidebar.

Also, I’ve decided to license to license my blog under a Creative Commons license. Sharing is caring.

Onwards!

Tags: , , ,

Free wallpaper

I’m pleased to announce the availability of high quality wallpaper on my site. The wallpaper images are free — both free as in free beer, as well as free as in free speech. Series 1 contains 16 high quality images from the Wikimedia Commons, a sister project to Wikipedia, where all the images are either in the public domain or licensed under a copyleft licence — and I’ve been happily using images from there for my wallpaper for quite some time. What I’ve done is I’ve resized and cropped the images all to common screen resolutions, so you don’t have to do it yourself.

Tags: , , , ,

I’m back!

I haven’t blogged for quite some time, and for those of you who wished that you’d never see another horrid Enoch literary composition pop up on your RSS reader (you have put my blog on your RSS feed list right?), tough luck. I’m in my living room at the moment and the only thing stopping me from freezing is a cup of hot and steaming instant asparagus soup, and I’m just going to go and write. That’s right, I’m just going to get started on my backlog of things that I’ve been putting off by just making myself write.

For the last couple of weeks, I’ve been bludging my time away suffering under post-exam traumatic stress syndrome (PETSS), which is the one of the most terrible diseases known to mankind, or at least to university students. I’d like to think it was justified, and here is a quick summary of the past semester to prove my point:

Semester 1, 2007

Argh.

In actual fact, I’ve been putting off writing because I’ve been wanting to reform the categories and the things that I write about (the three categories aren’t working very well), among other changes I want to do to my site. but I couldn’t be bothered doing that until I bothered logging on to my blog. And I couldn’t be bothered logging on because I knew I’d have to go and do the difficult task of reorganising things. This is known as a deadlock. Thankfully, I’m not your average office Turing machine.

Tags: , , ,

Kary (吳雨霏): In Control

Kary has a new album… which I just realised was released the day before her 21st birthday. Well timed! The songs on this one are quite good, although I still like 句句我愛你 from her first album more =)

Kary In Control

(Bah, what a poor upgrade from WordPress. If you’ve upgraded to 2.2, you’ll need to comment out the two lines containing DB_CHARSET and DB_COLLATE in your wp-config.php otherwise all your Chinese characters will turn into jibberish.)

Tags: , ,

Google Ads on nointrigue

I recently signed up to Google AdSense when I converted the main site search to using Google Custom Search. (The revenue share on my accounts page is listed as 0.0% for some strange reason though; I’m not sure what that means, but Google doesn’t actually publicly reveal what share of the revenue they give you, so I’m not too worried about that.)

Now, I’m trialling Google referral ads as well. Because my site’s primary purpose isn’t to make me money, I’ve tried to make them as unobtrusive as possible. Currently, they’re only showing on static pages (such as the home page), and they’re just ads for Firefox and Google Pack - two pieces of software that I’m more than happy to recommend. I definitely won’t be going down the AdWords path just yet - I don’t have positive association with those types of advertisements.

By the way, this is the truth.

Tags: , ,

« Older entries