Link:
https://dannyman.toldme.com/2005/06/11/perl-convert-celsius-and-fahrenheit/
I recently had a need for two quick temperature conversion algorithms in a Perl script. I asked Google, but did not immediately get a great answer, so here’s my answer:
# Two quick helper functions: CtoF and FtoC
sub CtoF { my $c = shift; $c =~ s/[^\d\.]//g; return (9/5)*($c+32); }
sub FtoC { my $f = shift; $f =~ s/[^\d\.]//g; return (5/9)*($f-32); }
The regex is to untaint the input datum, and could be eliminated if you know that your variable is clean. This code has been incorporated into a systems health and data trend monitoring script for FreeBSD. For the vaguely interested, here’s today’s perldoc: (more…)
5 Comments
Link:
https://dannyman.toldme.com/2005/06/10/my-gay-fantasy/
So, I was reading, yet again, of the Army’s difficulty in signing up soldiers to serve in Afghanistan and Iraq, among other places. The article wound down with the reminder that this could be alleviated somewhat, by allowing openly gay people to serve. And I started to concoct this little fantasy where somebody in San Francisco started signing up gay men, who pledge that they would serve in the military if allowed to do so. The thing catches on to other places and before you know it, you’ve got thousands of gay men who have pledged to serve.
But that’s not enough, right? So, they form companies (in the military sense) and start to drill on weekends as if they were the National Guard. Once they’ve gotten good, they organize a march on Washington, and suddenly the Mall is filled with the Pink Triangle Battalion. Squads of big beefy gay dudes are drilling in formation, on the mall, marching around the White House, the Capitol, and over to the Pentagon and back. “The military needs men, and we are ready.” The ranks could be filled out with fully uniformed veterans, who may be either gay, or simply “straight but not narrow minded.”
Or, if they really wanted to make a point, some of them could bivouac (Army camping) in some of the more far flung, shitty desert places of Texas, known for rabid conservatism. You get a company of armed, uniformed soldiers with pink triangles marching through your remote Texas town and first you’re like, “Hey! A military parade!” and then “Pink triangles … these are faggots!?” and then “Are those real guns?” and then “What are they doing here in Texas scaring the shit out of me, they should go to Iraq!”
1 Comment
Link:
https://dannyman.toldme.com/2005/06/09/typing-names/
As recently observed at work:
(16:19:06) taras: for centuries, my clan has insisted on only naming their children with names that can be typed exclusively with the left hand, b/c we knew that one day we might be working with a left-hand-typing-only system administrator
For those who have never seen me type, let me tell you that the above is an apt description of yours truly.
(16:35:04) sara: dman: note that ‘sara’ can also be typed only w/ your left hand
(16:35:22) ***sara sucks up to the sysadmin
It’s good to be root.
2 Comments
Link:
https://dannyman.toldme.com/2005/06/03/biked-to-work/
I bicycled in to work this morning.
Finally!
It is a very nice ride. Flat and scenic along a regional trail that on many maps still claims to the the Southern Pacific Railroad. In fact, when I got to Danville there was a beautiful train station with a Southern Pacific caboose sitting out next to it. Museum of the San Ramon Valley, it said.
The trip, one way, if I were in slightly better shape, would be nearly an hour. I got out the door late so it was more like an hour and thirty minutes.
I am no Joe Gross, but then he’s not dannyman, so I figure all is fair.
1 Comment
Link:
https://dannyman.toldme.com/2005/06/01/2001/
Yayoi and I finished watching _2001_ last night.
“So he was kidnapped by black pillar.”
That’s as good an explanation of that movie as any other I have heard.
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/05/30/memorial-day/
Every holiday
Punctuates the paragraphs
Of life’s narrative
Memorial Day,
Indentation, for summer’s
Long hot sentences.
Pause, and gather breath,
Reverence for those stories
Concluded early.
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/05/27/heat/
NoCal has different summer heat than the Midwest. Here, we have a limp, dry heat. It’s just heat. No drama, just hot. (more…)
1 Comment
Link:
https://dannyman.toldme.com/2005/05/25/taurus-eschewed/
I get spam from Atlas, a maker of model train tracks, rolling stock, and other fun bits. Usually I chuck it in the SPAM folder but today I took a peek:
NOTICE! HO & N FORD TAURUS
We are sorry to inform you that the HO and N Ford Taurus models offered in the April mini-catalogs have been canceled due to insufficient orders to meet production minimums. All back orders will be canceled.
The Taurus has a reputation for being unappealing, but when even the model train enthusiasts turn their noses up, well, I have to chuckle.
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/05/24/cowards/
This weekend I started thinking that when the Republicans get around to the brazen cheating required to remove the filibuster, that the Democrats had damn well have somebody on the floor flibustering who, when told that they aren’t recognized to speak, answers back that the chair isn’t recognized to change the cloture rules as they just did, and they will keep speaking, because if you check your history book, you’ll see that Senators have been filibustering for two hundred years, and they aren’t about to stop simply because Bill Frist tells them to. I was hoping that maybe just maybe the Democrats would manage to get an image on television of the Capitol Police escorting a speaking senator off of the floor of the Senate. Something that would look very much like a Coup d’Etat, or at least something where the Democrats, outnumbered and outgunned, were seen to stick passionately to principles of national consensus, while Republicans ruthlessly took advantage of their power to push forward their own agenda.
Or, maybe when it came to a vote, enough Republicans would want to maintain the spirit of the Senate and not vote to start screwing with the filibuster. They’d be seen as reasonable people, willing to put the national interest before their party agenda.
Maybe not. This morning I woke up to the news that John McCain brokered a compromise on the filibuster, in that the Democrats will agree not to filibuster, thus preserving their right to filibuster.
Maybe instead of Red States and Blue States it should be Red States and Green States. The Red States eat red mad cow meat, drive pickup trucks, and believe that it is their way or no way. The Green States sip soy-cream lattes and prance around in their SUVs effeminately crying over how bad it is that the whole place is run by Reds and when the meat-eating Red Staters bark ever viler commands the Green Staters flutter their wrists and collapse on the ground in a cowardly heap and cry about the sad fact that life is hard and we’re just oh so misundertood. If only more people listened to Garrison Keillor . . .
Cowardly Democrats. No wonder I voted for Nader in 2000.
2 Comments
Link:
https://dannyman.toldme.com/2005/05/20/catholicism/
The words of Cardinal Joseph Bernadin, of Chicago:
“If one contends, as we do, that the right of every fetus to be born should be protected by civil consensus, then our moral, political, and economic responsibilities do not stop at the moment of birth. Those who defend the right to life of the weakest among us must be equally visible in support of the quality of life of the powerless among us: the old and the young, the hungry and the homeless, the undocumented immigrant and the unemployed worker. Such a quality-of-life posture translates into specific political and economic positions on tax policy, employment generation, welfare policy, nutrition and feeding programs, and health care. Consistency means we cannot have it both ways. We cannot urge a compassionate society and vigorous public policy to protect the rights of the unborn and then argue that compassion and significant public programs on behalf of the needy undermine the moral fibre of the society or are beyond the proper scope of governmental responsibility.”
(more…)
1 Comment
Link:
https://dannyman.toldme.com/2005/05/19/heartland/
Travelling is my time to do things I wouldn’t normally do, like drink a lot of soda, or today, watch some Fox News, to hear what’s going on in the mind of “Red America.” What is going on, apparently, is a whole lot of whining. They are running the country, the economy is doing well, and Iraq seems like it just might work out, and they are whining in outrage about the evils of the world. (more…)
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/05/18/george-galloway-american-patriot/
If you’re frustrated with the American government, then you may enjoy reading, hearing, or seeing George Galloway, a British MP falsely accused of oil profiteering, call our government for what it is, a pack of fabricating, war-lusting, profiteering liars: (more…)
1 Comment
Link:
https://dannyman.toldme.com/2005/05/17/hotdog/
Good news from Chicago:
On May 17, 2005, at 11:45 a.m., the presidents of S. Rosen’s, produced by Alpha Baking Co. and Vienna Beef, will convene at the James R. Thompson Center at 100 W. Randolph St. in Chicago, for the formal signing of a “piece” treaty promising to forever more package their hot dogs and buns in the same quantity: eight!
Man, ever since we moved to California we’ve been eating fewer hotdogs and more Asian food. It is good to hear of progress being made in the encased meats industry of my homeland. Can anyone recommend a vendor in the Bay Area who sells Vienna Beef hotdogs?
(I guess I can give the Stadium Pub another try sometime. They are only a few blocks from my house . . .)
(Thanks for the tip, Dave, and bon appetit.)
3 Comments
Link:
https://dannyman.toldme.com/2005/05/10/cisco-sucks-zebra-rules/
So . . . this is an old rant.
I was working on a project to multi-home our upstream Internet connectivity. When I started, I was inheriting something where the telco providing us with the new circuit would also give us a router, and configure it, and take care of all the BGP configuration, and we wouldn’t have to renumber. (more…)
1 Comment
Link:
https://dannyman.toldme.com/2005/05/09/baseball-bicycle-bastards/
On Saturday we went to see the San Francisco Giants play at SBC Park. The Muni disrupted itself so we walked from the BART Embarcadero station. I am not a baseball fan, you could say, so I brought some books along. But we had some suprisingly nice seats where you could actually see what was going on, and when we got there, in the third inning, the score was 0-0 and the Nationals were walking Giants to fill the bases. Then J.T. Snow and Moises ALOU
, whom I know primarily as a popular filler in crossword puzzles, went and scored a bunch of runs. (more…)
1 Comment
« Newer Stuff . . . Older Stuff »
Site Archive