JS;DR

An idea whose time has come. I have nothing against using Javascript to provide enhanced navigation and things like menus but if the site won't render without it, there's a problem.

Posted in General | 1 Comment

Tips on Everyday Emacs Use

Daniel Ehrman has a nice post on 11 tips for solving everyday editing problems with Emacs. The list is a must-read for Emacs n00bs but even experienced Emacsers might benefit by being reminded of a few of the tips.

I like posts like this because I often learn something but also because it's interesting to see what others think are important techniques for Emacs use. They often suggest new workflows, something that I'm always on the lookout for. It's a reasonably short post and well worth a look.

Posted in General | Tagged | Leave a comment

Literate DevOps

As regular readers know, I'm a big fan of reproducible research. It makes it possible for anyone—even yourself—to reproduce all the steps of your research exactly as you performed it. A related concept, termed Literate DevOps by Howard Abrams, does the same thing for the building of deployment images.

The idea is that you can set up your system on a virtual machine and build the final system there. If you capture your steps as you go, you can then recreate the environment on the production server and perhaps recreate it on a virtual machine again to troubleshoot problems that come up during production.

There are tools such as puppet or chef that automate the deployment of systems and Abrams' idea is that you use literate devops to build the recipes used by those tools. Abrams shows how to capture your steps, including the code, in an Org mode file. It's possible to build the VM and then log into it from an Org mode code block. He shows how to you can arrange things so that the code blocks will be executed in the VM (or other external machine) right from an Org mode file on your local workstation. There's a ton of interesting ideas in his post and it's well worth a read.

Over at analogpixel there's another nice post on the same subject that takes a slightly different approach. Rather than execute the code directly from Org mode, he uses the Org tangle command to export the code to files that can be executed later.

That post shows how to integrate the results into a puppet configuration so it's worth reading as well. It's an excellent alternate take on Abrams workflow.

Although these workflows aren't really reproducible research, they share many of the same traits and can be used for the same purposes. Both authors mention that they can send the Org file (either natively or in an exported format) to colleagues to allow them to reproduce an environment or even to act as a go by for setting up other environments. If you're doing DevOps type work, you should definitely take a look at these two posts.

Posted in General | Tagged , | Leave a comment

An Apropos Hydra

Abo-abo is still blogging up a storm. I haven't commented on every post because if I did I wouldn't have time for writing about anything else. His latest post is about a hydra for apropos. My first reaction was, “Meh, just do 【Ctrl+h a】 and be done with it.” But abo-abo's post reminded me that there's more to apropos than the single command apropos. There's also apropos-documentaiton, apropos-variable, apropos-command, apropos-library, apropos-user-option, and apropos-value.

Most of these either have no binding or are bound to a menu so I never think about them. I realized that by having an easy-to-invoke hydra I could make better use of the apropos system. A clear win. Take a look at abo-abo's post and see if you don't agree.

Posted in General | Tagged | 1 Comment

The Difference Between Malware and Adware

Infosec Taylor Swift has a clarification for Lenovo, other computer manufacturers, and the journalists who report on them:

Posted in General | Tagged | Leave a comment

Editing Files as Root

How many times have you brought up a file to edit and discovered that you don't have write permissions? Usually they're system files but sometimes you're tying to help a colleague and don't have the proper permissions. You can always kill the buffer and start over but that's sort of a pain.

Bozhidar Batsov over at Emacs Redux has a nice solution; actually 3 nice solutions. He provides the sudo-edit function that reopens the file as root. All you have to do is call it and the problem is solved. Batsov suggests binding it to 【Ctrl+x Ctrl+r】 which has a nice symmetry with 【Ctrl+x Ctrl+f】 so it's easy to remember but, of course, you can use whatever makes sense in your environment.

After using that setup for a few years, Batsov decided that even calling sudo-edit was inconvenient so he advised ido-find-file (or find-file if you're not using ido) to check the permissions and automatically reopen the file as root if required. That's nice because you just open the file as usual and Emacs automatically does the right thing.

He also has a solution for emacsclient that I'll let you explore on your own. Like the others, it's a nice solution.

Batsov's post was from a couple of years ago but I somehow missed it. It is most definitely worth your time if you ever have to edit files you don't have write permissions to.

Posted in General | Tagged | Leave a comment

And Make the Coffee

So much more than a Swiss Army Knife:

Posted in General | Tagged | Leave a comment

The CIA and Apple

Just when you thought it couldn't get much worse, The//Intercept is reporting that the CIA has been conducting a sustained multi-year effort to exploit Apple's iPhone and iPad. The idea was to defeat Apple's efforts to provide their users with unbreakable encryption. They also sought to break into the devices' firmware so that they could insert malware.

In theory Americans needn't worry because the CIA is prohibited from operating in the U.S. I'm confident that no American Irreal readers are sanguine about their safety. The CIA, I'm also sure, feels entirely justified in targeting foreigners even if they happen to be, say, the head of state of an ally.

This really is outlaw behavior; behavior that the U.S. government would raise to a major diplomatic issue if they discovered a foreign government were doing it to them. As for the targeting of Americans, it's hard to see how it's not illegal unless they have a warrant. That holds even if they pass off American operations to the FBI or NSA.

Posted in General | Tagged | Leave a comment

Excession and Video Games

Over at Tor.com, Peter Tieryas has a very nice post on the connection between Iain M. Banks' Excession and a video game. Regular readers—or the merely observant—know that I'm a big fan of Banks' Culture Novels and of Excession in particular.

What I didn't know is that Excession was, in part, inspired by the video game Civilization. It turns out that Banks was addicted to the game to the point that once he started writing Excession he had to delete it from his hard drive. Tieryas' take on and appreciation of Excession pretty much mirrors mine.

We both really liked the idea of metamathics or, as the Minds called it, the Irreal. Tieryas explores the connection between Excession and Civilization as he interpreted it. His interpretation may or may not be the same as Banks' but it tracks well for me.

If you're a fan of Banks' Culture novels, especially if you're a fan of Excession, you should definitely take a look at Tieryas' post. It's almost as enjoyable as Excession itself. If you're not a Banks fan or haven't read Excession, you should read them both.

Posted in General | Leave a comment

Working with Key Sequences

Howard Abrams has a nice post on working with key sequences. He shows how to set up personal key maps with a common prefix. Abrams likes to use 【F9】 as a prefix to several maps. For example, 【F9 m】 is for his music listening. A third character chooses a channel to listen to or, with 【s】, stop the playback.

Next, he considers how to set these key maps from a list of keys and music channels. Nothing too surprising in any of this but then he asks if he can have a single routine to set the keys for all his personal maps based on an input list. To do that you need a macro and Abrams provides one that takes a list containing information about all his personal maps and initializes them.

Finally, Abrams mentions hydra and notes that it's what you need if you want to be able to repeat a key. For example, you might want a control that adjusts the volume up or down with 【u】 or 【d】. In a case like that, it's convenient to be able to repeat one of the keys until the volume is at the desired level.

Posted in General | Tagged | Leave a comment