Wrap MP3 files with HTML for Facebook Preview Images

On this very web server I have a number of MP3 files, which I make using Audacity or Protools and then dump onto the server with an SSH one-liner.

I wrote this yesterday so that, when someone shares a link to one of these MP3s on Facebook, Facebook will show a preview image and a title.

This is apache/CGI+Perl

Here’s the perl script; note this version doesn’t use Taint checking.


use strict;
use warnings;

my $q = new CGI();
my $filename = shift or die q(no filename); #, Dumper( $q);
$filename =~ m(([^/]+$)) or die qq(not a filename);
my $url = $1 or die qq(invalid);
die qq(bad name $url) unless $url and $url =~ /\.mp3$/; #and $url !~ m</> and $url != '.mp3';
die qq(bad file $url) unless -r $url;
print <<EOT;
Content-type: text/html

<html prefix="og: http://ogp.me/ns#">
  <meta name="viewport" content="width=device-width">
  <meta property="og:title" content="$url" />
  <meta property="og:image" content="MP3_logo.png" />
  <meta property="og:url" content="http://www.mpls.cx/mp3wrap.cgi?$url" />
  <meta property="og:type" content="music" />
  <video controls="" autoplay="" name="media">
    <source src="$url" type="audio/mpeg">

A couple of samples:

Use Visual Mnemonics to Help Remember Passwords

A while back Jon Singler suggested using Mnemonics to remember passwords.  Here’s a process I’ve been using to do that, including creating visual element (which you don’t really need to try to draw, as long as you are going to remember why it is whatever it is.

This Is How I Remember Passwords Now

This Is How I Remember Passwords Now

A couple of caveats: this slows down creating a new passwords somewhat – (quite a lot, compared to using something like Password Safe).  If a random password generation and lookup system can work for you, it should be obvious that will provide at least as secure a password as what I might come up with.

  1. Considering your context (where the password will be used), think of a story
  2. Condense the story down to two or three words that bring it to mind memorably in the appropriate context.
  3. Cypher the story, by mixing letter case and replacing letters with numbers and symbols. This should be done with some consideration so that –if asked– you could explain why particular replacement symbols were selected to go where they go.
  4. Create an image in your mind that melds these concepts together.  I like to pick an object, usually either a sculpture, or something else that has a highly varying shape or which might memorably have an image on.
  5. Once details of your object are fixed in your mind, type your password twice, slowly, keeping your image in mind.

If you have trouble remembering the passwords you create this way, here are a few suggestions:

  • Sketch your image – Unless you labeling them (PASSWORD FOR GOOGLE, Oils) your password protection scheme is no less secure.   (Don’t label them.)
  • Skip Step #4
  • Experiment with picking shorter and longer, simpler and more complex and more and less important to you stories, to start with.

Have other great tips for managing (and especially for remember) passwords?  I’d love to here from you.

Honor and Principle

Thank you to those who work is public service, and to those families who have offered up their cherished for the ideal of a common good.

When I was very little I was fascinated by the military (and also flags.) I used to look at pictures in the encyclopedia to memorize and draw ranks and insignia (and flags. Flags are cool).  I found the idea of a career military very romantic. In a few years, this would transition to interests in engineering and in teaching — and which have lasted, so far– but I can still tap vivid pride I felt I thinking about having two Grandfathers who’d been officers in “The Big One”, and also of the confusion I felt as I would sense their respective discomfort when I would bring up to topic.

Bill Brust, my father’s father and a officer with military intelligence in the European theatre, volunteered in lieu of a deferment based on his status as a Professor (Carlton College, Northfield MN). He didn’t seem to like to talk about his experiences in the war. The only story I can remember was that he picked up a pistol from the body of a German officer, and that he’d kept it. No other details nor did he show it, that I recall.

I found his having volunteered especially puzzling. He was unequivocal in his condemnation of armed conflict as tool for governments to resolve disputes, and I didn’t understand why he’d volunteered to forsake his own core value. Isn’t teaching people noble too?

Easier to relate to was Bill Kostamo. While he also volunteered, he was the classic case. He was young, able bodied and unmarried and enlisted as soon as he could.  He too would rarely talk about the war, but his reasons were clear: it had been awful.

Despite this, especially when I was younger, he would sometimes enjoy my enthusiasm for talking about war, and it’s trappings.

Once enlisted, he soon entered the Army Corps of Engineers, and eventually to commanding a mapping base in Morocco tasked with mapping Axis activity in Southern Europe and North Africa. Late in the fall of 1944, Grampa was finally able to assemble a complete map from the aerial intelligence the pilots had been collecting; he was told to bring it to France for hand delivery to General George Patton commanding the U.S. Third Army.

He flew spent that night in an open air two seater, about 500 feet over the water to avoid radar and clutching his valise tightly to his chest. Later, running up the steps he met another officer coming down and stole the hat off his head in passing. He hadn’t had a hand for his, and one does NOT report to General Patton without his hat, whatever intelligence he may be carrying.

Later he would lead a group into Ohrdruf, receiving a medical discharge on mental health grounds not long after.  He didn’t destroy the copies he kept of the photo he took at the concentration camp until years later when my mom found them as a young girl..

Through their service as and especially how they approached talking to a young me about war, they both immensely helped me learn to process situations where honor conflicts with principle.

Availability for 2014/2015

I’ve concluded separation from Hollander/HollanderParts/Solera/etc where I’ve been working since September of last year.

This was an amazing group of talent with some incredible products which together comprised a very nice place to work.   In addition to design and implementation of a SQL Server to Cassandra (No-SQL) pipeline using Change Data Capture and ETL, I also got to work extensively with SSIS (which I like) the .NET reactive classes (which I love) and increase my depth with core and non-core foundations like MVC, EF, Windows Services and nunit.   Some really sharp cookies at this shop- I learned a ton and had a wonderful time sharing my own knowledge.

You can always find the most current copy of my resume at aboutcorwin.com

The Minnesota Fantasy Award

Last night I had the privlage and pleasure of Accepting the Minnesota Fantasy Award on behalf of my father, Steven Brust, at Arcana 44. Below is the text from my planned remarks; I have some some pictures and video also which may turn into something, which case I’ll add that.

At age 19, while on a convention tour, Dad took me to see the Grateful Dead at what would turn out to be their final Mardis Gras concert with Jerry Garcia. Late in the first night of the show, right at a dramatic moment, a decrescendo, he leaned over and whispered to me a few words that have stuck with me since, just as he intended, I’m sure. He said: “How far do I have to go, and what do I have to do, to have this happen to me again?”

I have to say, that’s rather the feeling I get when I reach the end of one of his stories.

To say I was exposed to the works of Steven Brust at an early age, would be putting it mildly. I can still recall Mom’s intonation as she would read early passages from Jhereg as bed-time stories. It was in middle-school, perhaps age 13 or so that I fell in love with Dragaera, the Houses, the various competing systems of magic, and with Vlad Taltos and his many friends and allies. And I have been either waiting with bated breath or actively devouring each subsequent novel, whether of the Dragearen, or not- since. I’m a voracious re-reader.

Usually, when I offer someone “My Dad’s book” to read, I give one of the one-off novels; some unordered favorites being To Reign In Hell, The Sun The Moon and The Stars, The Gypsy and Agyar. Now that I have two complete loaner sets of the Vladian, those are the first to go, when they are around. A few days ago, on a smoke break at work, I bumped into a colleague who currently has such a set from us.

I most often see her in her car with her e-virtual-vaporizer thing in one hand, and her Kindle in the other. Talking with her, she reads all the time, as does her husband. When I gave her the big paper sack full mostly of paperbacks she reciprocated with a book for us to borrow, and also by admitting that her husband reads more fantasy than she these days. She’d let let me know what he thought. When he got to them.

She was much more excited to talk about the first of the “Jedi Academy” series by Jeffrey Brown she had brought us, for consideration by our seven year old son Miklos, and especially the admiration in which their daughter holds those. (Miko loves this, by the way. Right buddy?) When I found her the next Thursday to give her one of the copies of _Hawk_ that had shown up for the loaner set, she still hadn’t touched them.

That did it, I think. She brought home the first few books that weekend and by Tuesday had the rest of the bag at home. And she was hunting me down to talk. I love it when a middle age woman gets bouncy while talking about shoulder dragons.

“He’s an Assassin – with a shoulder dragon! What’s not to love?”

Lifetime Achievement.
Indeed, it has been rather a fine week to be president of the fan club. Here are a few random quotes I pulled off the internet this week:
Some books are entertaining. Some are thought provoking, and once in a while, a book transports you to a place for a full on vacation.Steven Brust’s works are a guaranteed backpack adventure into a different dimension. Every single time.
I’ve never met your father, but would love to shake his hand some day ,buy him a pint, and thank him for the many, many wonderful stories.
many congratulations to you both. :) p.s. Still rereading Hawk, on my 6th or 7th go. Please thank him for me.

Sorry. Let me walk that back just a tiny bit — when I say “random” and “this week”, naturally, I mean these were said to me specifically, and this morning when I posted to Facebook and Twitter I’d be here tonight.

To all that then, I add this: Dad writes fantasy that stays interesting and current to us as we get older.
Of course, you’d expect me to say that.

With great pleasure, and equal humility, it’s my honor this year at Aracana 44 to accept The Minnesota Fantasy Award on behalf of my father, Steven Brust. Personally, and on behalf of Steven and our entire family, thank you.

Favorite Hawk Links

Given that lots of people may be reading Hawk now, and soon, here’s a collection of links:

  1. Prologue and Chapter 1 have been released by Tor:
  2. Dad read us Chapter 2 last Sunday

Cory Doctorow reviewed Hawk this morning:

John Scalzi said this today:

Scali mentioned Hawk on Twitter, this morning.

I reviewed Hawk awhile back, after Dad gifted me the rare treat of reading the pre-scribbles” MS.

I’m Not As Good As My Words

My words are so much better than me. If I were a tenth part as my words would have me, I would be a giant in my estimation.

When Meridel was around eighteen months old, making Miklos about three, there came a night when they would not go to bed and we were too tired to keep standing there telling them to do so.

At the time we lived in a 1 1/2 story house on St. Paul’s West Side- it wasn’t very large.  Our bed was in the bedroom on the first level –that is not up the stairs to the half-level– and was routinely featuring 2-3 sleeping children by the conclusion to an evening.

On this particular night, Meridel had been having a hard time of it mostly centered around us wanting her to try to use the potty before laying down. Miklos who had been sleepy when we got home, was reengaged, trying to sooth Meridel.  After an hour or so of this we eventually retreated to the bed too tired to cuddle while Miklos tried to entertain Meridel, alternating between fits and giggles.   We had been lying wondering if we were good parents for some time when Meridel, finally reaching out for consultation said “Miko, hold me”.  There are grunting sounds for a few moments, after which Miklos replies: “I want to, but I’m not enough”.


Work With Friends, Stay Friends, Get Paid

East Asian Friends via WikiPedia, photo by https://www.flickr.com/photos/fernando/ CC CC BY-SA 2.0

Here then, my living, breathing

Tips for Working With Friends, Staying Friends, and Still Getting Paid.

  1. Work with friends whenever possible.
  2. Share credit liberally, everything else too.
  3. Always pay professionals who will be assisting within their areas of competence.
  4. Always pay for training; be personally involved.
  5. Aim for projects where 80% of those involved have a creative stake, but 80% of the creative stake is owned by one person/subject/etc.

    While a project remains entirely self-financed, the 80% creative shareholder should expect 80% of the net (gross – investor recoup – (cap-ex + regular pay + expenses)) in the case of a successful project, or 20% of the gross after  deducting only regular pay and expense on a failed project (e.g. one where investors do no make back their complete investments.)

  6. Establish and maintain clear records reflecting ownership, credit, compensation & liability for each project as well as the disposition of rights and obligations such as may be specifically attached to materials.

    Sometimes it’s important to delete or destroy various materials or work product at different projects in a work flow, in order to meet obligations to creative or financial contributors.  This isn’t actually difficult but it takes good book keeping.

  7. If you really stretch, you are going have people limping pretty soon.  Not everyone can deal with being carried.


Photo Credit:  https://www.flickr.com/photos/fernando/345125130/ CC BY-SA 2.0