The rules for combining things with Bourne shell 'here documents'
Shell here documents are relatively simple to use on their own, butit's usually head-scratching to combine them with other things(redirections, pipelines, or conditionals). To save me having to dothe experimentation and manpage reading the next time, here's thesimple version of the rules: here documents always start at thenext line .
So you can write any number of other things on the same lineas the command with a here document:
cat <
On (not) putting IP addresses in registration email
If you are creating some sort of system that sends email to people inresponse to web-based requests , it is tempting tothink that you should put in the IP address (and the timestamp) that therequest came from, in case your services are abused. In practice this isuseless, for a number of reasons.
The first one is that almost no one sends abuse complaints about spamany more, because people have long since worked out that doing so isalmost always a waste of (their) time
A little habit: cat >/dev/null
If you were to haunt me, every so often you would see me open up a new terminal window , run'
cat >/dev/null', and paste or type something there.What I am doing with this peculiar behavior is simple: I'm arrangingfor a slightly more persistent text storage than my X selection . I park any number of things dependingon what I'm doing; snippets of text from fishing back in editorundo , commands that I'm temporarilyre-running, and
Two ends of hardware acceleration
One of the ways that you can categorize hardware acceleration is to saythat there is a continuum between two sorts of hardware acceleration:doing something instead of having the CPU do it, and doing somethingthat the CPU can't even come close to doing fast enough.
If you have a choice, you obviously want to be on the latter end of thescale. Ideally you'll have a fairly solid proof that the best softwareimplementation on a general CPU can't possibly be fast enough becauseit requires very
What I think about why graphics cards keep being successful
Graphics cards are the single most pervasive and successful sortof hardware accelerator in the computer world; they are a shiningexception to how hardware acceleration has generally been bad . Given my views, I'm interested in figuringout why graphics cards are such an exception.
Here's my current thinking on why graphics cards work, in point form(and in no particular order):
- avid users (ie, gamers) are CPU constrained during operation aswell as graphics constrained.
- avid users will pay significant amounts of money
Why you can no longer have an 'invite-your-friends' feature
Marketing people absolutely love having an 'invite your friends' featureon your website, where your existing users can stick in the emailaddresses of their friends to have you send invitations to your serviceto them. Unfortunately, there are a number of problems with it that meanyou can't have one any more.
First, if you provide any way to have user-entered text (even inthe form of the sending user's nominal real name), spammerswill exploit it . Second, even with no
Some suggestions for registration confirmation emails
As a practical matter, I think that registration confirmation emailshould have at least three characteristics:
- it should always be initiated by that user; there should be none ofthe invite-your-friends features that are beloved by marketers.
( Yes, I'm completely serious about this .)
- it should not have any user-entered text whatsoever. Any userentered text will be exploited by spammers ,and you don't have any need for it anyways.
- it should be devoid of marketing material in general.
How our 'plug in and go' laptop network DHCP portal works
As I mentioned in the last entry , wehave an internal subnet for laptops and other generic user machines.For various reasons, we require machines on this subnet to be registeredso that we can identify who is (theoretically) responsible for them.One of the ways that people can do this is with a 'plug in and go'registration portal; you plug in, try to go somewhere, and you windup on a simple registration web page instead.
Behind the scenes, it works like this:
- our
How our DHCP registration portal redirections work
Like other places, we have an automatic DHCP registration portal (to usethe term I've heard). In the abstract, you plug your new laptop intoour laptop network, try to visit some website, and instead wind up ona registration web page. You supply your local login and password, themachine you're using is registered as yours, and then you can go on toget Internet access.
(Some registration portals will automatically send you on to whateverwebsite you were trying to visit.
SSL certificates require proper domain names
Here's one of those little petty irritations with SSL: if you wantto get a SSL certificate out of a CA without at least a lot of slowdiscussion, the hostname needs to be in one of your official domains.(It wouldn't surprise me if there were CAs that required the name toexist in your public DNS.)
This may be a local peculiarity, but we prefer to put machines that areon private networks into a set of local private domain names under atop level domain that
Menu
![]()