Author Highlighting

I read this post by Matt Cutts awhile back (I recommend subscribing to his blog, some useful stuff there) and now that my blog is getting to the point where people are commenting on my posts and I am commenting back, it made sense to implement this on my blog. Going through his instructions I had a couple things to add. Instead of just adding a new line to your css file with a background color, I would recommend duplicating the .alt section of your css and then changing the color there. That way all the other formatting sticks with your comment. For example, all of my comments have rounded corners, if I just added the line he recommends, my comments are square. Enough said there.

The other section I wonder about but doesn’t really apply to my blog, is for blogs with multiple authors. His code says:

if (1 == $comment->user_id)

which only highlights the comments of the admin user – who may not even be the original author. Someday, when I’m a WordPress hacker, I’ll tell you what the correct line should be, or some other guru can add it. But there should be something like:

if ($article->user_id == $comment->user_id)

Again I don’t know what the right variable for the $article->user_id would be. If you take the time to figure it out, let us know.

Upgrading WordPress

Well, it’s one of the great and annoying things about open source software – frequent code changes, updates, and security releases.  Version 2.5 of WordPress came out less then a month ago.  I decided, I’d wait for the first subversion release (2.5.1), which, of course, would inevitably fix problems with all the new features introduced.  Unfortunately, one of my blogs (not this one), was “hacked” and had malware inserted into a post.  So, I went ahead and upgraded all my blogs.  Now, three days later, WordPress releases 2.5.1.  Some guys just have all the luck, maybe sometime I’ll have some!  Since 2.5.1 fixes a “very important security fix”, I installed it immediately. . . let the script kiddies hack somebody else.

How to add a swap drive to Solaris 10

So I needed more swap space, but didn’t have any more space on the current disk. What to do? Add another drive and set it up as swap space. The only caveat is that I am running the 32 bit version of Solaris 10, which has a limitation on maximum swap size of 2 GB. So if you have a hard drive that is larger then 2 GB, you need to partition the drive into multiple 2 GB slices.

First, check what your swap space is already set to:

# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c1t0d0s1 61,1 8 4194288 4194288

In this case, it is set to 2 GB (4194288 x 512 bytes = 1.99999237 gigabytes) and is set to partition 1 on the first drive.

So in this example, I added a 4 GB drive and ran devfsadm. Format shows the second drive available:

# format
Searching for disks…done

AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@0,0/pci1000,30@10/sd@0,0
1. c1t1d0
/pci@0,0/pci1000,30@10/sd@1,0

Next, the drive needs some partitions, so we use fdisk (after choosing 1, the new drive):

format> fdisk
No fdisk table exists. The default partition for the disk is:

a 100% “SOLARIS System” partition

Type “y” to accept the default partition, otherwise type “n” to edit the
partition table.
y

format> part

PARTITION MENU:
….

partition> print
Current partition table (original):
Total disk cylinders available: 2044 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 – 2044 3.99GB (2045/0/0) 8376320
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 – 0 2.00MB (1/0/0) 4096
9 unassigned wm 0 0 (0/0/0) 0

partition> 0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0

Enter partition id tag[unassigned]: swap
Enter partition permission flags[wm]:
Enter new starting cyl[1]:
Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 1021c

partition> 1
Part Tag Flag Cylinders Size Blocks
1 unassigned wm 0 0 (0/0/0) 0

Enter partition id tag[unassigned]: swap
Enter partition permission flags[wm]:
Enter new starting cyl[1]: 1022
Enter partition size[0b, 0c, 1025e, 0.00mb, 0.00gb]: 1021c

partition> print
Volume: swap
Current partition table (unnamed):
Total disk cylinders available: 2044 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 swap wm 1 – 1021 1.99GB (1021/0/0) 4182016
1 swap wm 1022 – 2042 1.99GB (1021/0/0) 4182016
2 backup wu 0 – 2043 3.99GB (2044/0/0) 8372224
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 – 0 2.00MB (1/0/0) 4096
9 unassigned wm 0 0 (0/0/0) 0
partition> label
Ready to label disk, continue? y
partition> quit
format> label
Ready to label disk, continue? y
format> quit

Now to add the partitions as swap space:

swap -a /dev/dsk/c1t1d0s0
swap -a /dev/dsk/c1t1d0s1

And check that it is now available:

swap -l
swapfile dev swaplo blocks free
/dev/dsk/c1t0d0s1 61,1 8 4194288 4194288
/dev/dsk/c1t1d0s0 61,64 8 4182008 4182008
/dev/dsk/c1t1d0s1 61,65 8 4182008 4182008

Now we need to add them to /etc/vfstab so that they are used after a reboot by /sbin/swapadd. This one was already in there:

/dev/dsk/c1t0d0s1 – – swap – no –

So then we add the additional partitions:

/dev/dsk/c1t1d0s0 – – swap – no –
/dev/dsk/c1t1d0s1 – – swap – no –

If you decide to delete your old swap swap, use the `swap -d` command and don’t forget to change your dump space with `dumpadm -d`.

Rename a Solaris 10 server

To rename a Solaris 10 server, simply change these three files and then reboot:

/etc/nodename
/etc/inet/hosts
/etc/hostname.hme0 (change hme0 to whatever the network interface name is)

Another piece that makes sense to change, although not necessary is the dump space where you save crash dumps. To fix this is also easy:

cd /var/crash
mv oldname newname
dumpadm -s /var/crash/newname

To change the IP, all you need to do is change the IP address in /etc/hosts.

Note: /etc/inet/ipnodes may also need to be changed when using IPv6.

Premium EV SSL Certificates

So I purchased a premium SSL EV (Extended Validation) certificate from GoDaddy awhile back for a customer.  It all sounded like a good idea, there are many reports that talk about the lower abandonment rates in shopping carts, thanks to the green address bar.  Besides the fact that they cost ten times as much, I figured there would be a little bit more validation then simply e-mailing the administrative record in DNS for the domain asking for verification, but I had no idea how complex the process was to validate ownership of the domain.

First, you had to provide all of the details on the company from the registered number of incorporation, location of incorporation, etc., but then there was a 13 page contract and then after you get that to them they ask for a legal opinion letter from a registered attorney in the location of the company’s incorporation verifying the company’s identity.  Who knows, they may want more after that – I’ll never know.  This was enough for the company to decide they no longer wanted one.  I called up the billing department and was able to get a refund pretty quickly.

I then purchased a standard SSL and had a new certificate the next day.  I don’t think I would ever recommend the EV certificate again.