These links take you to the company page.

Location

  • Call us at 503-780-3736. Based in Portland, Oregon.

Take a look around


Archive for the ‘Tech Tips and Howtos’ Category

Cheating at html conversions

Sunday, March 15th, 2009

So, I’ve been working on moving a website where I don’t have access to the actual files. Long story.

Anyway, I got the layout sorted and started looking at the actual content. It dawned on me how big a pain in the butt it was going to be to format all that by hand, especially since after this move I’ll be working on completely redesigning this site. So, what to do?

First I looked at saving it as html from OpenOffice, but that uses a lot of table stuff, which bugs me. Then I had an IDEA!

I setup tinymce to just output to a page, view the source, trim a line, and boom, about 90% there in a couple swift steps. I might eventually go through and have it output the actual html, but this is good for now.

Checkin’ out readyboost

Friday, March 13th, 2009

I’ve long suspected a certain amount of snake oil to the whole ReadyBoost!!!! thing in Vista. Being stuck on a laptop with Vista, for the mo, and having picked up a nice PNY 8GB thumb drive yesterday, I figured I may as well try it out.

Nothing I do, currently, is all that intense, so I figured the only thing I that would really show any impact would be Forged Alliance. Fired up the benchmark mode and let it run.

Non-ReadyBoost Score: 12465

With ReadyBoost: 11529

So… uh… I guess it doesn’t help with games? Or at least that game.

Here’s the header stats from the two runs-

Stats Log Report

Logged frames          : 4127
Timestamp              : Fri Mar 13 14:03:47 2009

SupComMark (sim)       :   10000
SupComMark (render)    :    2465
SupComMark (composite) :   12465

Stats Log Report

Logged frames          : 3724
Timestamp              : Fri Mar 13 14:13:38 2009

SupComMark (sim)       :   10000
SupComMark (render)    :    1529
SupComMark (composite) :   11529

So either I’m doing it wrong, or something.

A short Exchange server checklist

Friday, March 6th, 2009

So, you find yourself thinking “Hey, company should host it’s own email server. Then we can spam at will!” or something to that effect. I mention spam because there’s no sane reason to run your own email server.

Anyway. For this task you might be considering Exchange. Let’s see if it fits your environment and needs.

Do you run on an Active Directory domain?

Do you have more than, say, a dozen users that need email?

Do you have a severe learning disorder?

If you answer yes to any of these, then Exchange might work out. Unless you don’t run an AD domain, in that case just move along regardless of the other two.

I should add

Thursday, March 5th, 2009

in regards to this fine post from a while ago, which someone decided to pitch some software on in the comments, that once your PST file, in those versions of Outlook, is over 2GB, you’re hosed. You have to take whatever you can extract after truncating, or pony up the money to use that Outlook tool. The issue is one of file format, and is rather boring. I just wanted to be perfectly clear that you can’t just upgrade Outlook, or move to another client, and have the actual file be fixed.

LVM Hell Part III

Monday, February 2nd, 2009

Well, that went flawlessly. For swap I really wasn’t sure if resize was applicable, so I just turned off swap and ran mkswap on the logical volume, which worked fine. For the root partition I girded my loins and ran ext2online /dev/<volume group>/<logical volume>. Took something like 10 minutes I’d guess.

So, wonderful. Now I just need to figure out a backup plan for this thing.

LVM Hell Part II

Saturday, January 31st, 2009

So, rather than doom myself to total repition, I instead used a non-solution. I added the new drive into the existing volume group, then used it to extend the logical volumes. This was done with the following commands (I’m using lvm2, just FYI)-

fdisk /dev/hd<new disk> (/dev/hdb in my case)
Depending on your specific system the hd portion may be different, so check on that.

In fdisk create a new partition, size it how you want, then set the system id to 8E. This marks the partition as Linux LVM.

Next, create the physical volume-
pvcreate /dev/hd<new disk><new partition> (/dev/hdb1 in my case)

Run pvscan to make sure it shows up.

Now add it to the volume group-
vgextend <volume group> /dev/hd<new disk><new partition>
If you aren’t sure what the name of your volume group is you can use vgscan or vgdisplay.

Next we extend the logical volume size, utilizing our new roomy drive-
lvextend -L+100G /dev/<volume group>/<logical volume name> /dev/hd<new disk><new partition>
Now, the -L indicates you’re going to be using a space indicator, instead of one of the other bizarre options. The + indicates we are adding space (you can also shrink lvs), the rest means 100 gigabytes. The default is megabytes. The last argument tells it to extend this using space from the specified physical volume. There’s also lvresize, but I wasn’t sure if it would have balked in this case or not, so I went this route.

Check the details to see if it worked-
lvdisplay (you should see it listed with the new size)

And you’re done, right? Well… no. Now you have to resize the file system. Since this is the root file system on a production box, I’m taking the time to ask around about whether I should even attempt doing this online or not, and which command is recommended. There’s ext2resize, resize2fs, or ext2online. I’ll post a part III about how this worked out.

So, why do I call this a non-solution? Because the main hard drive is old, and I’d like to get rid of it all together. Once I have this sorted out and get some breathing room I’ll make some backups of key files and stash them on the local backup box.

LVM Hell

Saturday, January 31st, 2009

LVM is awesome, it really is, but as I’ve learned today it can also be an extreme pain the ass. I maintain a little CentOS gateway/internal web server. It had a tiny hard drive and eventually got very close to full. So, I figured no sweat, get a new drive, use gparted to copy and resize everything, bam, done.

Only the file system is an LVM, and there seems to be no option for cloning this bastard. I’m going to try partimage, but once that fails I’m going to be back here next damned weekend just installing CentOS on the new drive and copying the files I actually need over.

If anyone can point me to some good documentation on handling this I’d appreciate it. I found some that was great, except I don’t have any room to generate a snapshot.

This is important

Thursday, January 8th, 2009

Remember, in an XML document, a text value is also a node. At least in RB, though I imagine it’s the same in other contexts.

I accidentally got this correct when I wrote Witch Hunt, and so I’ve been utterly mystified for like the past week as to what the hell I was doing wrong.

To give you an idea, here’s some test code that wasn’t working, where idx is an XML document I’ve loaded-

count = idx.DocumentElement.ChildCount

for i = 0 to count – 1
node = idx.DocumentElement.Child(i)
Window1.EditField1.Text = Window1.EditField1.Text + node.Name + EndOfLine + node.Value
next

This would give me the name, but not the value. So here’s the correct way-

count = idx.DocumentElement.ChildCount

for i = 0 to count – 1
node = idx.DocumentElement.Child(i)
Window1.EditField1.Text = Window1.EditField1.Text + node.Name + EndOfLine + node.FirstChild.Value
next

In case you don’t see it offhand, look at this part-
Window1.EditField1.Text = Window1.EditField1.Text + node.Name + EndOfLine + node.FirstChild.Value

That last call to node is the difference. Here’s the XML-

<?xml version=”1.0″ encoding=”UTF-8″?>
<root>
<test>frood</test>
</root>

So in the bad version I was going “hey, <test>, what’s your value?” and it was, rightfully, saying “what drugs are you on?”. In the working version I was going “hey, <test>, what’s the value of your first child?”. The first child, in this case, is a textnode, which actually can have a value.

Lordy I’m glad I finally got that.

MS Outlook XP and earlier

Wednesday, October 15th, 2008

These all have something insane in common, they can only open pst files that are 2GB or less, but they’ll write those files until well over that limit. So the next time Outlook opens it just sort of spazzes out.

Fun yes?

There’s a tool to truncate the file, from MicroSoft, but it doesn’t seem to follow any sane pattern or allow you any kind of selectivity.

Definitely fun. The only options from here are to change mail clients (I suggest Thunderbird) or upgrade to a later version of Outlook. I don’t suggest that because then you’ll still be using Outlook.

Some speedup stuff for FireFox in Hardy Heron (Ubuntu 8.04)

Saturday, September 13th, 2008

If I could get to the Ubuntu Forums right now I’d link to the post that had these instructions. Maybe later.

Anyway, it had me set these to true in about:config

network.http.pipelining
network.http.proxy.pipelining

Then this was set to 30:
network.http.pipelining.maxrequests
Note that this value is controversial since it can eat more bandwidth at once from a server. The default is 4, feel free to use that or any other low number you want.

Then it had me create this key:
nglayout.initialpaint.delay
Which was an integer value, set to 0.

Previously I already disabled ipv6 with this key:
network.dns.disableIPv6 set to true.

Lastly I used a modification of this great tip from tombuntu:
Added tmpfs /fftmp tmpfs defaults,noatime,size=100m,mode=1777 0 0 to /etc/fstab
Make sure you adjust the size to fit your needs. By default you only really need 50MB, or 50m, but I figured some padding is good. You can leave the size option off and it’ll default to half your RAM, but that’s a maximum number, not what it’ll always use.
Next I mounted that with sudo mount -a, after making /fftmp, then added this key to Firefox:
browser.cache.disk.parent_directory which was a string equal to /fftmp.

The result? So far a really snappy Firefox.

Edit: Looking at this a couple of days ago I realized that I made some basic mistakes and never corrected myself. For a regular user app it would be best to place the mount point under a user’s home directory, and in the options make sure to specify at least the uid, and possibly the gid as well. So, my example above would be something like this-

tmpfs /home/gump/fftmp tmpfs defaults,noatime,size=100m,uid=1000,gid=1000,mode=1777 0 0

Make sure you know your uid/gid since it isn’t always going to be 1000.