Page 21 of 28
Year 2000 Problem
It’s been a while since I’ve seen evidence of a Year 2000 problem, but Amazon insists on this search page that an XML book was published in 1901.
tar Over SSH
scp
is great for ease of use, but if you’re transferring numerous files, small ones in particular, it isn’t the fastest method. tar
, however, is very well suited to gathering small files into a single unit, but tar
ing the files, scp
ing the tarball and then un-tar
ing on the other end is inefficient; we have pipes in unix for a reason. Like all good command line utilities, tar can dish out and accept input from a pipe, so this is really quite straightforward:
tar cf - sourcedir/ | ssh user@dest_host tar xf - -C /destination/path
Make note of those naked dashes - they are the secret to this whole operation. First we call the tar
command with the options to create a tarball and that the filename to output immediately follows the options; in this case, we tell it to pipe the output to stdout
. Finally, we give the first tar
command the list of files (a directory in this example) that we want sent. The output of that tar command (the tarball itself, since we directed output to stdout
) gets piped to ssh
which is invoked like you normally would, except with a command to run tacked on the end. As soon as ssh
connects to the destination host, it simply runs tar
, which listens for an input file coming from stdin
that it will unpack into the directory given by -C
.
Setting Up Ubuntu for Building Kernel Modules
When you build kernel modules or other programs that depend upon the kernel you need to have the kernel source configured per the currently running kernel. To see what kernel your machine is running, simply run uname -a
. To setup your machine to allow things to build against the kernel, you first need the source for your currently running kernel:
export KERNEL_VERSION=`uname -r|cut -d '-' -f 1` sudo aptitude install linux-source-$KERNEL_VERSION cd /usr/src/ sudo tar jxf linux-source-$KERNEL_VERSION.tar.bz2 sudo ln -s linux-source-$KERNEL_VERSION linux ln -s /usr/src/linux /lib/modules/`uname -r`/build
First, in order to get things to build against the kernel you have to alter a single file to match the kernel you’re running. Run uname -r
and note everything following the first three decimal-separated numbers:
$ uname -r 2.6.17-10-386
Just use a text editor (vi!) and edit /usr/src/linux/Makefile
, changing the EXTRAVERSION
variable to match yours from above:
VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 17 #EXTRAVERSION = .14-ubuntu1 EXTRAVERSION = -10-386 NAME=Crazed Snow-Weasel
Next, you need to get the .config for the running kernel and setup the kernel source:
sudo cp /boot/config-`uname -r` /usr/src/linux/.config cd /usr/src/linux make oldconfig make prepare0 make scripts
That’s it. Now you should be able to build things, like kernel modules, against the kernel source.
Who Uses Backslashes?
My local NPR station, WAMU has been running an advertisement for IBM federal services and they mention the URL, which is spoken as “ibm.com backslash foo backslash bar,” which won’t work if you type it into your interweb browser. Really, no one uses the Windows command line for anything real, who still thinks with backslashes?
The Bible Does Math
I just finish reading Sam Harris’ Letter to a Christian Nation, which is a very good book. At one point he notes that the bible stipulates Pi is exactly 3. I wondered how such a book would lay out mathematical constants, but it’s pretty straightforward:
The sea was then cast; it was made with a circular rim, and measured ten cubits across, five in height, and thirty in circumference. Under the brim, gourds encircled it, ten to the cubit all the way around; the gourds were in two rows and were cast in one mold with the sea.
Kings 7:23-24
He also made the molten sea. It was perfectly round, ten cubits in diameter, five in depth, and thirty in circumference
II Chronicles 4:2
I must say that it’s a weak argument, because they could be simply approximations by an observer, but it’s funny nonetheless.
Time to Start Collecting Pennies
The debate over whether to get rid of the worth-more-as-metal-than-currency penny has gone on for a number of years as inflation has marginalized the coin’s usefulness. In the February Chicago Fed Letter a senior economist at the Federal Reserve Bank of Chicago, François R. Velde, outlined a plan to rid the country of the 1 cent penny entirely. He does not advocate debasing pennies, making them out of cheaper materials than the current mix of Copper plating around a Zinc core, which has been done previously (think steel pennies). Rather, Verde proposes changing the value of the penny from one to five cents. As the New York Times article explains, there won’t really be any financial wizardry involved; the penny you hold would immediately increase in value five fold. That’s the best rate you can get short of winning the lottery and it’s enough to make me want to gather up thousands of pennies to store under my mattress.
My only thought is, when if it’s decided that The Fed will change the value of the penny, wouldn’t there be a mad rush to acquire pennies before the switch? You’d definitely see me in line at the bank.
The Plan for Iraq
NPR’s All Things Considered had a story about a Minnesota National Guard unit that has been told that their stay in Iraq will be extended, like many other of our deployed forces in the world. One of the soldiers in the unit was given the opportunity to pose a question to President Bush during his interview with NPR’s Juan Williams. The soldier asked whether the President had a plan for Iraq if the troop surge didn’t have the intended effect, to which Bush responded,
Well, I would say to Ryan, I put it in place on the advice of a lot of smart people, particularly the military people who think it will work, and let us go into this aspect of the Iraqi strategy feeling it will work. But I will also assure Ryan that we’re constantly adjusting to conditions on the ground.
Wow. That plays right along with Bush’s idea that everything he does will be successful and that there is no need for backup plans. Thanks for answering that question, next time you can just say “no.” Thankfully, the soldier understood the true meaning of Bush’s response and had this to say upon hearing it:
No, it did not answer my question. I would have liked to know more so that there will be a plan if this does not work. For some of us that are over here, particularly me, my unit, we all feel, what’s the point of us being extended if your initial plan to send more troops over here does not work? What are you going to do, Mr. President?
Will Bush get the troop surge? There really is a good chance (I’d say it’s a forgone conclusion) that the troop surge won’t fix anything. What will happen then?
Richard Dawkins - The God Delusion
I just picked up The God Delusion by Richard Dawkins, a book which I’m sure contains numerous interesting quotes. The first chapter focuses on the undue respect afforded to religious beliefs. Dawkins makes the point that, though people can openly argue about politics, economics and warfare, religion gets a pass. Arguing about religion is a way to bring up undue hatred from anyone whose views differ. In concluding the chapter he quotes H. L. Mencken who said, “We must respect the other fellow’s religion, but only in the sense and to the extent that we respect his theory that his wife is beautiful and his children smart.” A fitting summarization.
Pain Scales
While reading about capsaicin and the Scoville scale on my favorite website, I noticed the Shmidt Sting Pain Index was listed. Like so often happens when browsing Wikipedia, this led me to read about other pain indices. Other than the Wong-Baker scale shown at the top of the page, I didn’t know that there were such defined scales.
Bush's New Health Care Plan
In the State of the Union last night, Bush proposed a way to the way health care is taxed. This announcement was something of a surprise – the first I heard of it was Monday morning. It sounds sort of complicated, but once all laid out, it’s fairly straightforward. Currently, if you get health insurance from your employer you don’t pay any tax on the cost of the plan. Similarly, those who are self-employed can deduct the cost of their health insurance from their taxable income. Anyone who pays their own health insurance outright, either because their employer doesn’t offer it or they can’t qualify for the plans that their employer offers, pay that expense after tax.
Under Bush’s new plan, that last group would be allowed to deduct their health insurance cost. The loss in tax revenue would come from a change to the taxation of those in the employer-paid insurance group; their insurance payments would be taxed if they exceed $15,000 for a family or $7,500 for an individual. If your annual healthcare premiums are less than those limits, you would see no change and it would still be tax free. The idea here is that this change covers the lost tax revenue while at the same time discouraging employers from offering overly-generous healthcare coverage and encourage the creation of low-cost plans that don’t currently exist.