blogs tagged "hack"

Stupid wrench ingenuity

Sun Dec 23 2018 16:59:26 GMT-0800 (Pacific Standard Time)

tags: hack tools wrench ingenuity stupidity

A couple of weeks ago the piston in my stupid home office chair gave out. It would still raise up, but it would slowly lose height after just a few sits... and before I knew it I'd be sitting at the computer typing with my hands up around my neck.

Sure enough, youtube gave some repair tips and I discovered that you could buy replacement cylinders online pretty inexpensively. As with every single repair video online -- it looks easy...right?

Well yeah, in concept, the repair is simple. Turn the chair over, knock the feet/base off the cylinder with a mallet and then wrench out the cylinder from the seat. Easy enough. Here in reality, though, it required pounding the living shit out of the cylinder bottom with a mini sledgehammer to free it from the bottom/feet. Once that as accomplished, the next step was to wrench the cylinder free from the chair seat. Most tutorials call for a pipe wrench, which I apparently do not own. Next up...the large channel locks.

I tried and tried and wrenched and pried. Nothing. Not a budge. It was made worse by the fact that the back of the chair (when laying flat on cement) has two curved supports that rock back and forth. I gave it my all, probably hurt myself in the process, but nothing worked.

It was almost 9pm, so very little chance of easily getting/borrowing a pipe wrench.

Time to get creative. Normally a plumber might use a cheater bar to add some length to the wrench handle to get some bonus leverage. In my case with the channel locks, though, I had two stupid handles to deal with. I searched through the shop and came up with two scrap pieces of steel electrical conduit, slid them over the grips of the channel locks, and made something that looked like this:

20181223-stupid_wrench_ingenuity_1024.jpg

(each handle is about 4 feet long)

I had to steady the two curved chair supports, so I put a 2x4 across it, stood/balanced on it, and started cranking as hard as I possibly could on this stupid but maybe stupidly clever monstrosity that I had created. On the 3rd or 4th attempt it actually worked! Once the old cylinder budged a little, it was pretty easy to remove.

The new cylinder was pressure fit into place and the chair works almost like new.

I don't recommend this -- you should always try and use the right tool for the job. But if you don't have the tool or, in some cases, the tool doesn't exist yet...it helps to be creative. And stupid.

Quickie perl hack to fix up image timestamps with Exif data

Tue Oct 21 2008 22:34:36 GMT-0700 (Pacific Daylight Time)

tags: perl hack exif image timestamp

canon

Ooops! I've been organizing image files recently from my camera and realized that I was losing timestamps when moving them to a remote Samba share. Fortunately, image formats and cameras these days are smart enough to embed the original timestamp inside the image itself (assuming you have a moderately recent camera and assuming you've gone thru the process of configuring the date/time).

I hacked up the almost trivial perl script below to touch each file with the data from the exif data.


`#!/usr/bin/perl

Touch files with Exim timestamps

use strict;
foreach my $f (@ARGV){
my $d = jhead $f | grep 'Date/Time';
chomp $d;
$d =~ s/^Date/Time.*: (d+):(d+):(d+) (d+):(d+):(d+)/$1$2$3$4$5.$6/;
touch -t "$d" "$f";

}`

The script depends on the jhead tool to get the data from the image, but the rest is dead simple.