Hair Today

According to experts, apparently long hair can get trapped in pipes leading to a less than optimal drainage situation.

The solution here, according to the same experts, is to pour a liquid called “Mudin” down the drains twice a year.  Or, as the experts said,  “or, for you, every three months”.

I’m just reporting what the experts said.  I take no responsibility for any negative effect this advice may or not may have for you.

They left me a bottle.

Computers Can Remember Things

One feature that I’ve been missing from mplayer for years and years is the ability to remember how far you’ve watched a movie.  Like, if I’ve been watching a movie, but then I stop the movie because I want to watch a TV show, then mplayer doesn’t helpfully remember where you left off.

So I’ve added a totally trivial fix to mplayer that just records all the shows you’ve watched (and how far into the file you’ve watched them) to the ~/.mplayer.positions file.

I’ve put the result (along with the previous hacks) on github.  And, of course, I’ve amended movie.el to use this data to start off the movie at the correct spot.

This will save me several seconds per week, I bet.

The changes are probably not that useful as is, but if somebody wants to take this idea an add it to mplayer proper, then … that would be nice.  Perhaps.

Plastic Bags Considered Arty

The Floor

What is that lovely expressionistic piece of art on the right, you say?

Let me tell you a story.

I went shopping for groceries at ICA today.  I left the bags on the floor in the kitchen.

The kitchen floor has heating cables.  The cables switched themselves on.

The red text on the plastic bags melted.

The Bag

No, the the floor does not get toasty warm.  It just gets pleasantly warm.  But obviously ICA is using plastic that melts at very low temperatures.

I should sow them for a million megabucks!

Or I could just get the floor repainted, which I was kinda planning on doing, anyway…

(The picture on the top right was taken after scrubbing at the redness with White Spirit for ten minutes.  It didn’t help much.)

So much drama!

Compositing Text Over Images

8 Inch USB Screen With Composited Text

I have a number of small USB-powered screens scattered across the apartment that displays various stuff that I find myself wanting to know.  In particular, I always want to know what music is playing. And I sometimes want to know what temperature it is outside.  (And I can tap the screens to pause the music.)

So I want to display the sleeve of the currently playing album, and I want to display the group/album/track name.  And on the screen in the “office”, I want to display the temperature in the room and the temperature outside.  Because I want to know how many layers of wool I have to put on before going outside.

“This should be easy enough to script up with ImageMagick”, you’re probably thinking.  But I want the font be Futura, and I want the text to have a “shadow” around it so that it can be read no matter what the background (i.e. the sleeve) looks like.

My go-to tool for all text-based things is LaTeX.  (Yes, I know.)  And after fiddling around a bit with LaTex and netpbm, I got the look I wanted.  (“A bit” is a euphemism for “a few minutes every day for a couple of weeks until it didn’t look hideous”.  (And “a few” is a euphemism for “a lot of”.))

This Is A Button

The solution I settled on was to take the output from LaTeX, convert it into pnm, and then blur the outlines for a number of times.  Then I used this blurred image as the alpha channel on a black image.  By then compositing all these images over each other (the background image first, then the black image with the alpha channel giving the outlines of the text, and then the text itself on the top), I got the result you can see on the image at the top.

Probably not usable for anybody else as is, but I’ve put the scripts up on GitHub anyway.  Somebody out there may want to do something similar some day, and perhaps this will help in some way.

And publishing code like this always helps.  It’s been through so many iterations that the code was just a total nightmare, and cleaning it up (as one does) before publication makes the code more maintainable for my personal use, too.