The Internet has been aflutter recently with news of a massive attack against WordPress blogs: one good resource might be this article at Ars Technica.
The gist of the attack is that automated scripts are hammering at WordPress blogs that use the default names like “admin” for the administrator user. Since blogs which have changed their admin user name aren’t at risk, the security advice going around at the moment is to make sure you’re not using “admin” as a username (as well as making sure that you have strong passwords for all of your accounts, of course) [EDIT: Hmm. It seems you can't change a username once it's been created. I'm sure there's a plugin for that, but I haven't studied it enough to give advice one way or another. Still, at least this will let you know if you're at risk so you can go set stronger passwords to those accounts!].
But I host a lot of WordPress sites on my server (17 right now) and I don’t even have logins for all of those. So I needed a way to see what usernames each of the blogs on my server use.
So I wrote a script. This script will scan a root folder and look for wordpress blogs. It will then use the database credentials for each blog to log into mysql and look for the usernames that can log in. It will then tell you what those usernames are.
Since it seems like this script could be useful to folks other than me, I’m making it available in my public Mercurial repository. In the process, I went ahead and added a couple other scripts that I’ve written which you might find useful.
The direct link for the “Audit WordPress Blog Credentials” script is http://hg.jameswilliams.me/sysadmin_scripts/file/tip/wp_audit_blog_credentials.sh. You’ll find a link to download the “raw” version of the file on the left-hand side of the page.
I’m sure more scripts will make their way to this repository as I find things I need to automate (that aren’t particularly specific to my situation).
I hope this is useful!
I’ve recently started doing a lot of writing in Markdown: I’ve been taking notes on my iPad in Byword and syncing them through Dropbox so I could open them in Sublime Text on my Mac and Windows computers. And, at least for now, I’ve settled on pandoc as my markdown renderer of choice.
I was using the SublimePandoc plugin for a week or two when I realized that SmartMarkdown had built-in support for SublimePandoc: so there was no reason to duplicate the plugins (this also explains why my command menu had all of those pandoc duplicates…). Also, SublimePandoc hard-codes its html template in its package directory (so using a different template means changing the plugin package) and SmartMarkdown actually uses the template from your regular pandoc data directory. Huzzah. (Of course, I ended up having to edit the SmartMarkdown package directory anyway, but I’m assuming this is a bug that will be fixed one day and not a deliberate design choice.)
So tonight I wanted to dump SublimePandoc and just use SmartMarkdown. I had to fiddle a bit to make it work on my Mac, unfortunately, so I want to document those steps here in case I ever need to do it again.
The biggest problem is that I would get the error "[Errno 2] No such file or directory" whenever I’d try to use SmartMarkdown’s pandoc renderer. It took me a while to track this down (using printf debugging of the plugin: yay Python!) but this error resulted because the plugin couldn’t see my pandoc binary. I don’t really understand this because pandoc is clearly in my path (and I can run it freely from the commandline).
Unfortunately, SmartMarkdown does not currently support setting the pandoc path as a configuration option, so I just hardcoded it in the plugin (yay Python!). I used the terminal command
where pandoc
to find the full path of my pandoc binary and then opened up pandoc_render.py (in $SUBLIME_PACKAGES_DIRECTORY$/SmartMarkdown) and found the run_pandoc method. I changed the line
cmd = ['pandoc'] + args
to
cmd = ['/usr/local/bin/pandoc'] + args
which saved me from that error.
And in my user settings file for SmartMarkdown, I had to add the key
"pandoc_args": ["--standalone"]
to convince pandoc to actually use my template. After that, everything is peachy.
For completeness sake, my full settings for SmartMarkdown and my keyboard shortcuts are:
{
/* Please specify the PATH of pdflatex if you wanna generate PDF */
"tex_path": ["/usr/texbin",
"/usr/texbin"],
/* Provide your arguments here as a list e.g.: ["--latex-engine=xelatex", "--toc"]
arguments that are separated by space must be in separate slots. e.g. ["-H", "template.tex"] */
"pandoc_args": ["--standalone"],
"pandoc_args_pdf": [],
"pandoc_args_html": [],
"pandoc_args_docx": []
}
{
"keys": ["super+shift+m"],
"command": "pandoc_render",
"args": {"open_after": true, "target": "html", "save_result": false}
}
I’ve been slowly trying to catch up on podcasts since I took my commute-less holiday vacation and have finally hit Episode 120 of The Incomparable. In this episode, the geeks do sort of a preview of 2013 geeky movies by talking about the trailers for upcoming films.
One of those films was, of course, Star Trek Into Darkness. Though the producers are keeping a tight lid on most details of this film, it seems to be accepted that Benedict Cumberbatch is playing a villain who is seeking revenge (against either Jim Kirk or The Federation; I’m not sure).
I’m a big fan of Cumberbatch, so I think it will work out. But “a guy is seeking vengeance in a big action movie” is basically the plot of the last Star Trek film. Don’t get me wrong. I really like that movie. So repeating some of its major plot beats may not be a sin. It worked once after all, so it could work again.
But I think there’s room in Star Trek for more than that. Roddenberry’s world offers a big playground to explore different sorts of ideas and, through those ideas, to offer a lens on our own lives and times.
There’s little argument that The Wrath of Khan is the best of the Trek films. And though this film does feature the “madman seeking vengeance” plot, it’s not about that. Khan is about getting older and it’s about the mistakes of your past coming back to haunt you.
J. J. Abram’s first Trek film is about a bunch of attractive young people trying to stop Nero from blowing up Earth (while failing to stop him from blowing up Vulcan). I suppose it’s also about a new team gelling and I think it tries to be about leadership but largely fails at that (since ultimately, Kirk gets the gold shirt because he’s Kirk and basically had to). But I think that’s okay. I think that this was exactly the sort of movie that was needed to bring new fans into a post-Berman Star Trek franchise.
But I’m concerned that the sequel will follow that same trend and be about Chris Pine trying to stop Benedict Cumberbatch. It will undoubtedly be fun and it will make a lot of money but it won’t reach the heights that Star Trek should be capable of.
That unabashed action piece was exactly what Abram’s first Trek movie needed to be. His second will need to find something a little deeper. At least, it will need to do that in an artistic sense if not a business sense.
If Khan is the best Star Trek movie, I think Undiscovered Country is the second best. These are both about getting older (in Khan, it’s about facing up to your past; in Undiscovered Country, it’s about moving out of the way to let a newer generation take on the world unimpeded) and not so much about the actual action movie conflicts that the story appears to revolve around.
If Abrams can tell that kind of story in Into Darkness, he will probably cement his legacy as the rebirth of the Great Bird of the Galaxy. If not, we’re in for a long run of profitable sci-fi popcorn movies while we cling to our Deep Space Nine DVDs for the sort of thoughtful stories that have always drawn us into this universe. I have hopes that soar above my expectations. I think Abrams can absolutely do that sort of film-making. I just don’t know if it ever occurred to him to try.
For fun, I’ve created a table listing the primary antongists in each Star Trek film. The first signs of a worrisome trend can be seen at the bottom of this table.
| Film | Antagonist |
|---|---|
| Star Trek The Motion Picture | Giant, unknowable entity searching for its origins |
| Star Trek II: The Wrath of Khan | Individual madman seeking vengeance |
| Star Trek III: The Search For Spock | Individual seeking political and military power |
| Star Trek IV: The Voyage Home | Giant, unknowable entity searching for its friends |
| Star Trek V: The Final Frontier | Individual madman, seeking religious experience. Also, God. |
| Star Trek VI: The Undiscovered Country | Political enemies working together to maintain the status quo. Also, Communism. |
| Star Trek: Generations | Individual madman seeking paradise |
| Star Trek: First Contact | Giant, unknowable hivemind seeking the destruction or assimilation of everything else |
| Star Trek: Insurrection | I don’t know. Old age? The West’s unbridled capitalism and exploitation of the planet? Looten Plunder? |
| Star Trek: Nemesis | Rick Berman |
| Star Trek (2009) | Individual madman seeking vengeance |
| Star Trek Into Darkness | Individual madman seeking vengeance (allegedly) |
In the United States, we are used to our anthropomorphized computers being in the form of John Hodgman and Justin Long; but in the United Kingdom, these parts were played by comedy masters David Mitchell and Robert Webb.
I think I saw some of these back when the ads were airing, but I’d forgotten about it until I saw a reminder on tumblr. I’ve taken the liberty of rounding up all of the ones I could find on YouTube.
In our house, our biggest holiday tradition is watching a Christmas-themed movie or television show every day. Each year, I prepare a schedule which leads up to the new Doctor Who Christmas Special. This year, I’m publishing our schedule on this very website.