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

Did You Know

There are only 3 animals that don’t reproduce until they die? I didn’t. One of them is humans, of course, but what about the other two? And why are there only three? See the National Geographic article linked above for the answers. As Spock would say, “Fascinating!”

Posted in General | Tagged | Leave a comment

Sacha on the Power of Plain Text

Sacha Chua has a nice post on the power of plain text. There are, she says, three main ways of storing text1:

  • The Heavy Weight Methods
    This is mainly database systems. Chua says she uses these tools mainly when she’s building software for someone else.
  • The Medium Weight Methods
    Chua mentions spreadsheets specifically but I suppose it could also include word processors or various note taking or GTD tools.
  • Plain Text
    This is her preferred method when she’s building tools for herself. Chua says that as she learns more about Org mode and Org tables, she is using this method more and more.

I’ve written before that I use plain text and Org mode almost exclusively for my data storage and processing needs. As Chua says it’s easy to work with—you can manipulate it using standard tools such as grep, diff, awk, perl or even Emacs. If you need more specialized processing, you can almost always get the job done with a bit of Elisp. In any event, it’s sure to be easier than dealing with a proprietary format even you have documentation on that format.

One of the nice things about Org mode is that it has several functions that make it easier to work with the data in an Org file. Although she’d doubtlessly demur, Chua has at least a journeyman’a knowledge of that. I’ve written a few times about her use of Elisp to process data she’s holding in Org files. You can learn a lot by reading those posts.

Chua mentions some of these Org functions in this latest post and that’s reason enough to give it a read. She hints that she’ll be using and, presumably, writing about Org mode more in the future. That’s good news because I always learn something interesting when she does.

Footnotes:

1

The heavy weight and medium weight designations are mine—don’t blame Chua.

Posted in General | Tagged , | Leave a comment

Link to a Specific Line in a File from Org

A nice tip from Robin Green:

Posted in General | Tagged , | Leave a comment

The Magic Story

Years ago, I had a printed copy of The Jargon File and spent many happy hours reading through it. If you haven’t browsed through the file, you should. It’s full of screamingly funny tidbits about our Hacker Culture and Language.

My favorite entry, by far, is A Story About Magic that tells the tale of a seemingly magic switch glued to the frame of a PDP-10 in the MIT AI Lab. One day, Guy Steele happened upon the switch that had its two positions labeled “magic” and “more magic.” The switch was in the more magic position but had only one wire attached to it and was therefore electrically non-functional.

Go read the story to find out what happens when Steele flips the switch. To this day it’s still not definitely known how it worked.

Posted in General | Tagged | Leave a comment