Web

Thoroughly Random Blogging


More than usual, I mean. I’ve been playing with the static site generator Hugo as a way to move this blog and its comments out of Movable Type.

After clearing the initial hurdle of incomplete and inconsistent Open Source documentation (pro tip: if a project starts numbering versions from 0.1 instead of 1.0, it’s safe to assume that there’s no tech writer on the team), the next step is adding a theme to render your site. There’s no default theme, and half a dozen different recommended ones of varying complexity and compatibility. Short version: I’m not sure Hugo currently has layout functionality equivalent to Movable Type 2.x from 2003, much less any of the modern tools; it might, it’s just that hard to find out.

There’s some support for basic pagination, something that’s always been missing here (and which is partially responsible for the long delay when adding comments), but the built-in paginator includes a link for every page, which is pretty painful when you have 200+ pages. If I get the time, I’ll have to dust off my Go and send them a patch to make it behave sensibly with large numbers.

Rendering all ~3,800 entries (counting quotes and sidebar microblogs) and ~3,500 comments takes about 12 seconds on my laptop, but that’s still too long for iterative testing, and the OS open-file limit makes it impossible to test with the live-rebuild feature of the built-in web server.

So I wrote a quick Bash script to retrieve N random articles from Wikipedia and format them the way Hugo expects, as Markdown with TOML metadata. Why Bash? Because the official Wikipedia API for efficiently retrieving articles and their metadata using generators and continues is either broken or incomprehensible to me, since I spent two hours at it and got a never-ending list of complete and partial articles. So I just looped over the “https://en.wikipedia.org/wiki/Special:Random" URL and piped the output through Pandoc. Rather than pulling in the real metadata, I just generate dates and categories in Bash. Now I can quickly generate a small site with multiple sections and simple categorization, and it’s trivial to add more features like series, tags, authors, etc. [in fact, I did!]

(relevant only to Hugo users after the jump…)

more...

“It’s not a cloud…”


“​…it’s just someone else’s computer.”

In case you were wondering where my site’s been all morning, Amazon S3 flaked out all over the US, and I host all the images and a few key bits of Javascript there.

I’ve moved the Javascript temporarily, so at least the page loads, but pictures won’t show up until S3 is back online.

[Update: it’s back for read access, so my pictures are online again, but apparently they’re still working on the write functionality, which must be painful for the many services that rely on S3. I don’t need writes unless I’m uploading new pictures, so I’m good. Amusingly, one key item that was broken all morning was Amazon’s service status page. Because it’s hosted on S3. Someone had to make some manual edits just to provide basic info about the problem.]

Dear Morgan Stanley,


This is a terrible list of possible security questions.

Insecurity questions

How many of these questions are trivial to answer for anyone with even a small social-media presence? How many of the rest are things that people over 30 probably don’t even remember? And seriously, zip code? Date of birth? Last four digits of SSN? To stop someone from trying to break into my brokerage account?!?

How about these, instead?

  • Who do you most regret voting for?
  • Who would you go to jail for sex with?
  • What's the ugliest car you've ever seen?
  • What pistol do you keep by the bed?
  • What's the name of the first person you begged for sex?
  • Did it work?
  • What do you only wear when no one else is around?
  • Lid up, lid down, seat down, or "Asian squat toilet"?
  • What's the most ridiculous food fad?
  • What do you keep losing?
  • What does cilantro taste like to you?
  • What was the first thing you had surgically removed?
  • Where do you usually masturbate?
  • What foreign country would you never visit?
  • What historical figure would you travel back in time to kill?
  • What's your favorite smell?
  • What part of your body was involved in your first emergency room visit?
  • What celebrity would you clone?
  • What's your favorite food you can't find any more?
  • What's the worst injury you ever caused by accident?
  • Who would you lock up and throw away the key?
  • What superpower would you abuse the most?

Don’t answer in the comments, or I’ll steal your identity…

Testing: looped mp4 instead of animated gif


I hacked Gifify to generate MP4 files instead of animated GIFs. Let’s see how this embeds:

This is 256 KB. 5.5 MB GIF version, created with the exact same parameters, below the fold.

more...

Hey Google, wakaru kai?


Google just announced that their new translation engine now handles Japanese. Let’s see what it does with the exact same text I fed to Office 2007 about seven years ago, the first scene of Kyōtarō Nishimura’s murder mystery, Ame no naka ni shinu. TLDR: it’s quite a bit better, although the pronouns are all over the place, and the “embroidered sleeves” bit is hilarious:

It was raining.

It is cold winter rain. It was close to the sleeves.

Even if it enters at night, there is no sign of stopping. Because of that, if it passed ten o’clock, the embroidery figures rapidly decreased.

Even when that man pressed his belly with one hand and came out from behind the alley, there was no sign of a person in the rain.

He was a middle-aged man. The tired suit was wet with rain and was dark.

The man gripped by the utility pole with one hand. However, as if suddenly bravely fumbled, it crumbled and broke into a wet pavement.

From around the man’s belly, red blood is blowing out. The blood is raining.

“help me”

Said the man. However, the low screams have been erased by the sound of rain.

With a splash of water, a taxi passed by. The driver took a look at the man who fell over and down, but he thought he was drunk. Just dropping the speed a bit, I passed by.

The man lifted his face and looked around. There are no figures of people anywhere. I opened my mouth, but it seemed that no voice cried for help.

Blood still continues to flow. The face of a man gradually lost his blood and went.

The man tried to write something on the pavement with a fingertip stained in blood. However, the raining lasting will erase it.

Despair seemed to have caught him.

The man wants to let you know something. However, there are no signs of people, and letters written on pavement are erased by rain.

Also, the taxi passed by. However, for men, there was no power left to raise their hands.

The man looked at his palm stained with blood with a blank eye. The fingertips were stiff.

The man slowly folded the little finger of his left hand. On top of that, my thumb was broken and piled up. The index finger, middle finger, ring finger stretched out.

“three”

, The man muttered with a small voice. But it was not almost a voice. The man fired off his last power and stretched his left hand. Just say that you would like someone to see.

But no one had seen it.

There was the darkness of the night, only the rain continued.

Not-so-mechanical Turk(ish)


Amazon.com surprised me a bit today:

Google tells me it’s Turkish meaning “suggested for you”, and after several hours, it’s still there in a fresh browser session, despite the rest of the UI still being in English.

[Update: still there a day later, for several of my friends as well. I don’t see an easy way to contact Amazon to find out if they know.]

Dynamic pricing and demand


The almost-ready Shapeoko 3 CNC mill will come with mounts appropriate for the DeWalt DWP611 compact router ($119 on Amazon). Often discussed in the forums is the fact that you only actually need the motor, which is available separately as the DNP611 ($79).

The DNP611 sold out at that price, came back into stock at $99, sold out at that price, came back into stock at $109, sold out at that price, and is now back in stock at $129. So it’s now cheaper to buy the standard router package and throw away everything but the motor.

(I haven’t bought one yet, since I’m waiting for a confirmed ship date before I buy router, bits, etc)

[Update! Today the circle is complete, as the full kit is now $99, a full $30 cheaper than the motor-only SKU. Perhaps I’ll buy mine now…]

[Update: speaking of almost-ready, today’s email says “Batch #1 will begin shipping in a few weeks!”, and I’m in batch 1. A quiet “woo-hoo” is in order, I think.]

An amusing scam from safewise.com


[Update: he tried again, and when I asked if the scam actually worked on anyone, he responded with a butthurt message insisting he was a real person offering honest assistance, and calling this post “cyber-bullying”. Best laugh I’ve had all week.]

Obviously machine-generated spam based on scraping search engines, since the suggested replacement has absolutely nothing to do with the original link. Never mind the fact that it was sent from a site hosted in Amazon’s cloud (rickgrimes.asoshared.com, which identified itself as www.buzzstream.com to the next hop), or that it was sent with JavaMail and includes a List-Unsubscribe header. Those just ice the spam-cake.

To: jgreely+temp201501@dotclue.org
Subject: Found an error to fix on your website
Date: Wed, 28 Jan 2015 14:55:14 -0800 (PST)
 
Good Afternoon,
 
I'm a criminal justice student and I recently visited your site while
researching for a paper I'm working on... This is a note for your
webmaster, as I found a dead resource link on your site that visitors
like me might be trying to access.
 
It's on this page: 
 
dotclue.org/archives/001527.html
 
I got an error message when I tried to click on the link to this site: 
 
atf.treas.gov
 
It looks like that website no longer exists... anyhow, I found another
link that might be useful in its place so your visitors can still find
some helpful information:
 
http://www.safewise.com/resources/guns-at-home
 
Thanks for your help and for providing great information!

“Need a clue, take a clue,
 got a clue, leave a clue”