Archive for the ‘General Technology’ Category

Tech Tip: Resolving screen flicker when a DOM element is updated asynchronously

This tech tip is useful enough to warrant its own post.

If you are updating a DOM element via javascript, for example replacing the content or changing the style, you may notice screen flicker during the update.  Screen flicker on any div update is usually the result of a collision of heights of the elements that are changing.

Be sure that there’s adequate space (or at least no overlap) between the div you are updating and any adjacent divs. The flicker is caused when the DOM renders the new placement & has to ‘adjust’ the overlap.

Popularity: 1% [?]

Themes, themes, themes…

You may have noticed that I’ve been changing the theme of the site today.

I’ll settle on one I like soon, but this exercise – which I undertake every 3 – 6 months – made me consider why I do this.  It would be easy to say that I simply bore quickly with any given theme & want to try others, but the real reason is more subtle… and vastly more interesting.

I believe that visual cues are a huge part of effective communication.  Experimenting with different themes allows me to see, for myself, the results of these changes. 

Popularity: 1% [?]

Video of Greenpeace climbers on Mt. Rushmore

No matter your opinion of the political statement these activists were making, you have to respect someone who can literally get blown off the side of a mountain & not lose sight of the objective of the climb.  Pretty amazing stuff.

Tags: , ,

Popularity: 4% [?]

Tech Tip: Multi-line Perl regex pattern match

Yesterday, I encountered an analysis issue that appeared to be resolvable with a simple pattern replacement technique. 
(more…)

Popularity: 35% [?]

Quick file & directory cleanup tools

Every sys admin needs to quickly free up disk space from time to time, and here are two well-tested scripts I use for exactly this purpose.

The first is a simple command-line use of exec that uses find to construct of list of matching file names, in this case all gzipped tarballs, and then runs the rm command on them.  The curly braces "{}" act as a holder for each file name from the list, and the trailing "\" is used to escape the ";", so that it is passed to find as a literal command terminator.

#find . -name *.tar.gz -exec rm {} \;

You may find (pun intended) that you need a slightly more sophisticated way to construct the list of things to remove.  For example,  to recursively delete all files & directories from an arbitrary depth in the file-system, except for special files or directories.  To accomplish this, I use a small Perl utility I wrote that uses the File::Find module. 

Here is the actual script I use generalized out with a fake $top and /some-pattern-to-exclude/. This script will crawl down (actually the direction that finddepth goes is up) a list of files & directories, and unless the pattern is matched, each file in the directory & then the directory itself is deleted.

How does this work?  Pretty simple – the File::Find module loads some routines, one of which is finddepth. The first argument it expects is a routine to run against all files & directories found, starting at the location named in the second argument.  The wanted routine is run on each element in finddepth’s list & you can use  finddepth’s variables to make your wanted routine smarter.

Tags: , ,

Popularity: 4% [?]

Freepository at 10

Freepository is 10 years old in May & a new site design has been released to correspond with the anniversary.

Perhaps the biggest change in this release is that of no more new CVS accounts. While this saddens me a bit (we were the first to offer hosted CVS accounts way back in our alpha in May 1999), we’re confident we’re offering what the majority of our visitors want – hosted Subversion. And existing CVS accounts aren’t going anywhere – they’re exactly where they were last week and you can access them exactly the same way today.

Popularity: 3% [?]

Ajax Logfile Viewer – revisited

Almost two years ago, I wrote a log file viewer that asynchronously tails a log file & updates a <div> inside a a page.  As a courtesy to other engineers, I posted about it.

The funny thing about that is, although it is one of my most widely *viewed* posts, there are only a few comments.  This leads me to conclude that the highly technical software engineers who’ve arrived at the post via a search are very interested in learning how I’ve done it (check here for the post & you’ll see an explanation, the source code & a working example), but they aren’t interested in having a conversation. 

Someone else1 pointed out that Google searches dropped off dramatically during Obama’s Inauguration, while both Twitter & Facebook usage skyrocketed.  This elicits the position that search is not a social application; it is performed as & when needed purely for information.  I’m fascinated by the very real anecdotal evidence of this in my own server logs.

1 Sarah Lacey http://www.sarahlacy.com/sarahlacy/2009/01/google-dethroned.html

Tags: , ,

Popularity: 36% [?]

A very systemsy day

I’ve done more systems work today than is typical.

The mail server, after a brutal spam thrashing that began 24 hours ago (see below), has been turned back on with updated Spamassassin rules, enhanced by the always awesome Mailscanner interface.  I’ve also completed the earlier-mentioned theme update.

And, moments ago, I reenabled twitterfeed.  I’m feeling like I’m getting close to convergence of my online presence.  If I could eliminate email… that’d be nice.

Tags: , , , ,

Popularity: 1% [?]

Upgraded to WP 2.7

Earlier today, I upgraded this blog to Wordpress 2.7. Using the Wordpress Automatic Upgrade plugin, this was quick, painless & error-free.

Two thumbs up so far on the new dashboard; I really like it. You may have noticed that I also changed the theme today – carrington by my friend Alex King (thanks Alex.)

Popularity: 1% [?]

Macbook Pro Expresscard Latch – Quick Fix

I travel a lot.  On the road, I depend upon wireless connectivity everywhere I go.  Recently, I got fed up with the lack of dependable Wifi service (it is horrible at ATL for example), so I purchased a Laptop Connect card. EVDO, 2xG, 3G… if there’s service, this card will pick it up.

This story has four parts: The Card Problem, The Apple Store Experience, the Analysis and The Latch Fix.  If you are only interested in the fix, skip down to that part.

(more…)

Popularity: 12% [?]