Posts Tagged ‘editing’

Covering all your bases

Tuesday, May 5th, 2009

No, this isn’t a pre-baseball game pep-talk. If you use configuration management (and you really, really should) then you will understand the need to manage configuration files. That may seem like a ridiculous statement but configuration files come in many shapes and sizes. What may be simple and consistent to one application author may be strange and erroneous to another.

Thus the lowly sysadmin has the unenviable task of herding this heterogenous group of files into some semblance of order. With Puppet (a great configuration management application that Anchor uses) you have several options:

  • roll out complete static files
  • roll out templates which are filled in with common or possible per-host settings
  • make file edits

The last option is admittedly much more painful than the first two. Even here you have a few options – perform edits with shell commands such as sed, perl, awk etc or create your own custom types to deal with the specific configuration file format in question.

A better alternative is Augeas. This is (depending on how you want to use it) a shell command, or native binding in a number of common languages and allows you (through the various “lenses”) to edit configuration files in a consistent manner no matter what the format of that file is. Since version 0.24.7, Puppet has had support for the Augeas resource type so you can conveniently edit files using Augeas through your existing Puppet manifests.

Line-editing configuration files is not going away anytime soon sadly, so Augeas is a great tool to bridge the gap when complete file roll-outs and templates just can’t do the job you want.

A fix for the browser crashing blues

Thursday, December 11th, 2008

Ever been constructing a verbose and complex reply to an email on a webmail site, only to have the browser crash when you were about to hit send? Or perhaps putting the finishing touches on your Wikipedia edits to the particle physics article (I know I have) and have all of your hard work lost in the blink of eye?

Fear not, salvation is at hand! Although many Web 2.0 sites providing text-editing will save drafts and provide a reasonable text editor, nothing beats your favourite text editor of all time, Vim. Or Emacs. Or whatever you would prefer to use. Why shouldn’t you be able to use any text editor you like? It’s your computer and your time after all!

If you are using Firefox, your problems are over. Introducing It’s All Text. Install this handy plug-in to your Firefox, set the default editor to your liking and you are off and running! Now any text box on any webpage will show a small edit button on the bottom right corner allowing you to launch the editor of your choice. Edit to your heart’s content using the tools you are most familiar with, then save and exit the editor and have all your work sent back to the browser text box.

Even if the browser crashes mid-edit, your editor program will be unaffected and your work will be safe. You can save your work in the editor in addition to any swap or draft files it creates for even more safeguards.

It’sAllText works in Firefox 3.0. If you have older versions of Firefox you may wish to check out MozEX which is a similar plug-in.

Site links
Anchor
Wiki
Blog
Services
Domain names
Web hosting
VPS
Dedicated Servers
Co-location
Articles
Dedicated Server Purchasing Guide
Dedicated Server Tutorials
Developer Friendly Hosting
Useful Tools