Wednesday, September 19, 2012

Sub-Context of a Dream

Upon awakening this morning I recalled having been dreaming of a conversation near a sunny window. For reasons which make best sense to an unconscious mind, I was attempting to explain the Nordic etymology of Gandalf’s Dwarven name to my wife and a cutout. (I commonly dream with “cutout” or “place holder” characters, who remain cloaked in faceless anonymity unless they interact) The focus of my dream was the frustration that neither was much listening to my clever linguistic analysis; Lysa’s excuse was an urgent need to empty her bladder—which seemingly vanished the moment she glimpsed a cherry tree in full blossom, just outside the sunny window. (The dream-imagery here was clearly plagiarized from Android live wallpaper)
android screenshot
Sakura Live Wallpaper

Of more interest to my waking self is the etymology therein, as I am always amused whenever I can recall the specific technical details of a dream. In this case, I had invented an (alternative) etymology for “Gandalf’s Dwarven name”. Note that I’m calling this a Nordic etymology because I am largely unfamiliar with Tolkien’s languages, nor do I actually recall the Dwarven name for Mithrandir/Gandalf. An quick check of Wikipedia reveals the truth of this, to wit: in the Khuzdul language of Tolkien’s Dwarves, the Grey Pilgrim is called “Tharkûn”; however, the “representation in English (anglicised from Old Norse)” is “Gandalf”. I suspect I was thinking of the former since I am aware of the actual Norse meaning which is “wand elf”.

The precise name wasn’t included in my dream, but I was giving the analysis as a tripartite Nordic compound meaning “(makes love) where ([he] works)”. My assumption is that I have some deep seated notion that old Gandalf had a thing for the bearded ladies.

Wednesday, March 30, 2011

Subversion Is An Old Man's Tool.

As Joel Spolsky put it: "Distributed Version Control is here to stay, baby”. If you've read Joel's stuff, you know he has a way of making sense — a quality of writing which can be tough to find on the Internet. As a Git user, I can't say Joel converted me, but he did get me thinking about why I too hung on to familiar ol' Subversion long after it's obsolescence. Rather than boring you with that, herein lies a minimalist guide to getting started with distributed version control.

If you are wondering about the Git vs Mercurial (Hg) debate, don't bother. Both work well and can even be used in tandem. The focus here will be on Git because it has alphabetical priority, and Joel has already written Hg Init: a Mercurial tutorial.

For experienced developers, the hardest part about learning Git is unlearning Subversion or other legacy VCS. Here are a few things to keep in mind (if you get bored, just substitute "jedi" for "repository"):

  • Any repository can be cloned.

  • Any repository can be a master.

  • Distributed VCS doesn't mandate distribution.

  • Local changes: checkout, commit

  • Remote changes: pull, push

A New Repository


Don't be put off the 'distributed' bit, git is perfectly happy to have just one folder — repository and working copy all rolled into one:
mkdir /srv/git/foo
cd /srv/git/foo
git init
# add some files
git add .
git commit -m'initial checkin'

So Git scales down nicely, but with shared repositories it is important to know that Git will grouse if asked to push changes to a destination where files are checked out. This problem is easily avoided with a bare repository, essentially a repository which cannot have files checked out locally:
mkdir /srv/git/foo
cd /srv/git/foo
git --bare init

Send in the Clones


Where git repositories already exist, new ones can be cloned; optionally, the new clone can be --bare:
# new working copy:
git clone ssh://user@gitserver/srv/git/foo
git pull

# bare clone:
git clone --bare ssh://user@gitserver/srv/git/foo
git pull

Go with the Workflow


Much of the Git workflow is straightforward, especially if your working copy was cloned from a (bare) master repository:
# get the latest changes
git pull

# make some changes
find . -type f -exec dd if=/dev/zero of={} count=1 \;

# oh crap! I just (sort of) Zeroed all my files
# no worries, just abandon the changes

git checkout .

# double check
git status

# make changes worth keeping
# ... then commit
git commit -a

# need to amend the last check-in message?
git commit --amend

# push local changes to master
git push


There's enough to jump in and get into trouble with git; to find out more, try the following resources:

Tuesday, February 15, 2011

Linux Security: Denyhosts

If you've read my Open SSH series, perhaps even if you haven't, you are probably aware of the power SSH offers to those who know how to use it. Command line bits. There are many ways to protect the service from unauthorized usage, focusing on self-contained or single host solutions, one finds two common flavors: those which make use of the Linux kernel's packet filtering tools (netfilter and iptables), and those which rely on Wietse Venema's TCP Wrappers. Netfilter certainly offers power and flexibility, but this may be at the cost of simplicity and management ease. While no security measure ought to be implemented blindly, there is an undeniable benefit to simple measures which can be configured quickly and with little fuss — in this arena, TCP Wrappers stands tall.

Tuesday, January 11, 2011

Cloud Life: Kernel Upgrades

One thing not mentioned in EC2StartersGuide is how to apply kernel patches. Technically, this isn't currently possible in the Amazon cloud, which is to say that the boot loader (e.g. grub) within an EC2 instance cannot load an arbitrary kernel; nonetheless, official kernel updates are available via package updates, though cloud servers won't automatically load the latest installed kernel when booted.

Tuesday, January 4, 2011

Managing MySQL

Database management is one of those tasks where GUI tools can often be handy and occasionally critical. The history of Linux point-and-click tools for MySQL is a bit checkered, and prominently features MySQL Query Browser and MySQL Administrator, official tools formerly supported by MySQL. Early releases were buggy and crash-prone, but had progressed to merely flaky by late 2009, when MySQL announced they would pull the trigger on them in favor of MySQL Workbench. MySQL support for the GUI Tools Bundle officially ended in June 2010, but the tools are still available in Debian and Ubuntu repositories, while MySQL Workbench is conspicuously absent. While this may deter many users from test driving Workbench, they are missing out on a powerful tool for database management. Fortunately, MySQL publishes MySQL Workbench binaries.

Sunday, September 19, 2010

Transatlantic Text Editing

Philip has posted a brief follow up to Managing Line Endings over at Armadillo. He's also got some articles which may be useful for anyone forced to use SSH on Windows.

Wednesday, May 19, 2010

3 Easy Steps to SSL Client Authentication

There are many resources on the Internet for correctly securing apache web sites with X.509 client certificate authentication. This isn't one of them. What follows is a three step guide to the fastest, easiest method for setting up self-signed server and client certificates. You are advised not to run any of the commands below in a production environment, they are presented only as an aid for those who learn kinesthetically.
“A good solution applied with vigor now is better than a perfect solution applied ten minutes later.”
- General George Smith Patton III (source)