Ethernet cabling done

"Baz" the electrician came by this morning to finally do the ethernet cable run I looked into months ago. I wanted off the WDS bridge (it sucks for gaming, and I thought it was a problem with my disconnects but that turned out to be unrelated), but we couldn't really justify it at the time, though I had him quote on it anyway.

Once I started working remote, it became more of a necessity, but by the time I realized I could afford it and needed it, he was swimming in work and didn't have any time to do it. So we've been putting up with a blue ethernet cable running down the hallway, us tripping over it as it goes across the kitchen, for about two months now. That all changed when yesterday he rang me up because the work he had on for today got shifted to the afternoon, so he had the morning free.

Awesome!

Except that I had a desk to pull apart in the back office to give him access to the wall, and the entire nerd shrine had to come apart so he could run a drop there as well. So I spent last night frantically tearing everything apart, our bedroom is stacked up with video game shit just so he had a clear workspace.

The actual job went rather well - it was only complicated by the fact that there's noggings across the top of where the phone wire comes in, which is where the two ethernet drops were going to terminate as well. That was pretty trivial for him to work around, but it did complicate things.

Everything's ran, and once the testers gave the green light I started plugging things in, and I pulled up that goddamn blue ethernet cable. Tonight after work, I'll put the TV back together, or I might leave it apart, use the old TV stand, and actually finish the bloody thing... dunno yet.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry

Cloudflare - Part 2

Per my last post on the subject, I went ahead and smashed out a small script to organize, thumbnail and sync images to a small FreeBSD VPS running nginx for the sole purpose of flinging files out, then stuck it on a subdomain and put Cloudflare in front of it too.

I edited a couple of posts, and put photos in them - finding it (for the most part) much more convenient than uploading to imgur or anything like that. I don't have to worry about imgur changing policies in ten years and invalidating links (a frustratingly huge part of the web right now, thanks to Photobucket), and it's not dogshit slow like Flickr has become. I still haven't decided whether the Nginx thing is permanent, or I may stuff all the images on an S3 bucket instead. The good thing about the way my site is structured right now is changing from one host to another is just a single large rsync (or s3cmd sync, as the case may be) away - and I can do that from the VPS if I have to, so changing will be pretty painless except in the most dire of circumstances.

The results are pretty good - I'm not sure if it helps, but I stuffed a couple of DNS prefetch tags into the top of my HTML and on perfect cache hits I have entire page loads under half a second, and most of that is still Google Maps. I'm thinking for Google Maps, if I leave the copyright in-tact, and link back to the page, I can probably mirror the static images and be okay, but scripting it is a whole lot harder than scripting the images so I'm unsure of whether I want to bother yet, at this point I'm just making sacrifices on the altar of website speed for no good reason.

There is one more thing I could do to speed my site up, and that's to concatenate all my CSS and Javascript into single files, which would turn 8 requests into two (in theory), and since (well, it used to be that) the average browser will manage about 8 parallel requests at once (and that's pretty optimistic I think, though I haven't kept up with what browsers are doing these days), that could theoretically slash my load times further, so it may be worth looking into. I originally kept them separate because in many cases (jQuery, Bootstrap, and so on) I'm using CDNs, so I could potentially benefit from folks' caches, but I don't know whether this is worth worrying about and in the worst case it adds extra DNS lookups.

If you're interested, here's the little script I knocked together to generate thumbnails - it does tie me to a single box if I want to include images, but I think that's a limitation I can live with. It doesn't pollute my Git repository with massive binaries, and I'll be maintaining at least two copies of every image so I think it'll work. Anyway, here's the script:

#!/usr/local/bin/bash

input=Pictures
output=output/images
tsize=160x160

# Stop script on first error
set -e

# Make sure output directory exists
thumbs=${output}/thumbnail
mkdir -p ${thumbs}

find "${input}" \( -iname '*.png' -o -iname '*.jpg' \) -print | while read f
do
        file_base=${f#${input}/}
        file_original=${input}/$file_base
        file_thumb=${thumbs}/$file_base
        file_dir=$(dirname "$file_base")

        # Skip if the thumbnail already exists
        if [ ! -f "$file_thumb" ]; then
                mkdir -p "${output}/$file_dir" "${thumbs}/$file_dir"
                echo "Processing: $file_original"

                # Copy original image, and strip any geotag from it
                cp "$file_original" "${output}/$file_dir"
                exiftool -q -overwrite_original -gps:all= -makernotes:all= "${output}/$file_base"

                # Now create a thumbnail of the desired size
                convert -thumbnail "$tsize" "${output}/$file_base" "${thumbs}/$file_base"
        fi
done

It's quite fast, taking around 2 seconds to add one new image on an ancient Athlon x2 250, and it doesn't bother regenerating a thumbnail if one already exists - it takes longer for rsync to do its thing than it does for the script to work in most cases.

Update (2017-10-25): I discovered that with a handy plugin called assets, Pelican can use the webassets python package to minify CSS and JS after concatenating them into a single file each, so I went ahead and installed that, and then pushed all ~850 files to S3. I then noticed that they were using relative, not absolute URLs, so I had to push all ~850 files again. RIP my POST request count for S3 for this month.

I'm pretty happy with the results: as forecast, I turned 8 requests into two, and possibly saved a few extra bytes due to a couple less gzip headers. More importantly, it appears to have broken nothing.

Horsham, VIC, Australia fwaggle

Published:


Modified:


Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry

Skate 3

Skate 3!

Duncan has been watching a Youtuber play Skate 3 off and on for several months now, and mentions wanting it every so often. That's not a problem, I thoroughly enjoyed the first one and I'd totally play it too... only issue is, it's horrifically expensive for such an old game. EB want close to $30AUD for a pre-owned copy, on either system!

On Friday though, I noticed an ad on our local Facebook buy/swap/sell group (one of the only things I really use FB for) of a pile of Xbox360 games for $10 each. Skate 3 was in there, along with Forza 4 and Fable II, two other games I'd been wanting to play but not enough to buy (even with EB's buy-one-get-one deal they had a while back). Today, I got around to writing the seller a message, asking if she'd take $20 for three of them, and she replied yes.

That's less than seven bucks per game, and well below my pain threshold, so I made arrangements to go pick them up. It turned out I'd been there before: it's the same lady I bought the Playstation 2 from about a month ago. All three games are in great shape, and I believe complete, so I'm pretty happy.

I had to work shortly after picking them up, but Duncan spent a good amount of time thoroughly enjoying Skate 3 that I dare say he's got our money's worth out of it already.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry

Drive-in, again!

I didn't write about the last one, but this would be our third year attending the drive-in movie at the Horsham Showgrounds. The first year was in May, then last year I believe was closer to October (we saw Zootopia), and now tonight we saw Despicable Me 3. Each time the drive-in comes around it's to support some sort of cause, what the others were escapes me but tonight was Duncan's primary school.

We opted to, as usual, buy dinner then arrive early to ensure a good spot. This almost worked too well, as this time we were right in front of the screen (off from the center by one car), but this meant (or perhaps the owners of the movie company saw my previous complaint about the screen being too low and raised it) that the screen was too high unless I laid my seat well back, and certainly Duncan couldn't see from the back seat, but he sat on Sabriena's lap anyway.

We also bought popcorn, and I bought a sausage in bread because it was a buck and had onions. We forgot to bring water, so we bought a couple of those as well, but it's all for fundraising and we spent less than $40 total for the entire night out, so compared to what a trip to the theatre costs, I can't really complain.

Horsham, VIC, Australia fwaggle

Published:


Modified:

Never

Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry