Blog Tags: 

13 simple writing tips

I love reading, I love books, and my friends say I have an overactive imagination. So it may not be terribly surprising that back in my teens one of my dreams was to one day become an author. A world famous author of course. Writing good old fashioned books. Which would be published with my name on them and which people would line up in book stores to buy. New books with that new book smell. I'd sign them and impress the ladies with my wit and prose.

Blog Tags: 

CDPATH

I used bash for a decade or so before I discovered this little highly useful gem a few years back. Nowadays I can't remember what I used to do without it.

From the bash manual page:

CDPATH

The search path for the cd command.  This is  a  colon-separated
list of directories in which the shell looks for destination
directories specified by the cd command.

A sample value is ".:~:/usr".

I've added the following to my .bashrc:

CDPATH=.:/turnkey:/turnkey/projects:/turnkey/appliances

Now this works:

Blog Tags: 

Trouble writing? You probably aren't scaffolding enough

Having trouble writing? It may be just that you are having trouble doing two things at the same time:

  1. decide what the prose should say (substance)
  2. write the prose (form)

They are intimately interconnected. If you don't REALLY know what you want to say, you are going to have a hell of a time saying it. And then instead of actually writing sentences, you play with grammer and use alot of syntatic sugar until your sentence seems to have filled a respectable space (form over substance) and you can move on to the next one.

Blog Tags: 

Git tip: how to merge multiple projects into one big repository

A while back I decided it would be a good idea to combine a loose collection of related Git repositories into one big Git repository.

The rational for this was that I noticed that often the same logical change had to be broken up into multiple commits across these previously separate repositories in a way that made it difficult to track which changes were part of the same change. In other words it artificially fragmented the commits and made revisions harder to track.

Blog Tags: 

How to upgrade a Debian package to a newer upstream version

Duplicity issued a new stable version with a few bugfixes. I didn't want to wait for the Debian sid package to update so I updated it myself.

This was very simple as the Debian duplicity package uses dpatch to manage all the patches to the original source code. The patches go to debian/patches.

When the package is built debian/rules applies these patches:

dpatch apply-all

Creating a new dpatch is also automated::

# 1. create a new patch: invokes a new shell. Edit files and exit # when you're done dpatch-edit-patch <patch_name>

Blog Tags: 

Invalidating the disk cache on Linux

Here's a super easy way to invalidate the disk cache, which is useful for testing IO performance in the real world, where you can't rely on all of your reads being served up from a super-fast RAM cache rather than a vastly slower physical disk drive.

This will free up everything in the disk cache:

echo 3 > /proc/sys/vm/drop_caches

Or if you want more control over exactly what is being freed...

  1. This frees up the pagecache (e.g., cache of contents of files):

Blog Tags: 

Drupal Rules in a nutshell

In a nutshell, Rules is a visual programming tool. Instead of writing code as a block of text, you configure the desired behavior via a GUI that guides you through the setup of "rule sets" which are basically stored procedures that define conditionals and actions to execute, and triggering those rulesets from various canned events.

Rules sets can can call each other immediately (watch out for infinite loops), schedule each other (or themselves) to be called later, etc.

Blog Tags: 

Negotiating payment as a contractor (issues, tips)

Last week I shared the advice I gave to a friend who was quitting his day job and wanted to do more freelance/contract work. This week I'll share a bit of practical wisdom on negotiating payment that I figured might be useful those of you who are just getting into contracting.

The problem: contracting clients will often ask you to quote fixed bids for contracts.

Potential issues:

Blog Tags: 

Advice on breaking into freelance consulting, contract work, standard rates, wages and billing practices

Not too long ago, a friend told me he was quiting his day job to try going out on his own as a freelance consultant/contractor and asked for some friendly advice regarding wages and billing practices.

I may not have been the ideal person to ask, as I had never worked in the exact market my friend was going into. On the other hand, in my twenties, a few years back I did work as a computer security consultant.

Blog Tags: 

Three strikes - time to automate!

I caught myself today repeating a few basic operations by hand what seemed like a zillion times. Over and over again. I didn't really notice it at the time but it was really slowing me down.

For example, after committing to tklbam I would create a tklbam testing package, copy the package to one of my test machines, install it and remove the archive.

Pages