Featured, News and Reaction, Politics, Technology

California to Manufacture Electric Cars!

Link: https://dannyman.toldme.com/2008/07/01/tesla-san-carlos/

Ed tipped me off that the North American factory for the new electric sports car, the Tesla Model S, will be in the San Francisco Bay Area. San Carlos is about half way between San Francisco and San Jose. It was thought the factory would be opened in Mexico, which offered government incentives. California offered its own incentives, and The Governator owns a Tesla Roadster. (And a Hummer.)

Gay marriage and electric sports cars! What awesome new stuff will we embrace next?

Feedback Welcome



Link: https://dannyman.toldme.com/2008/07/03/slick/


Feedback Welcome

About Me, Featured, Politics, Religion, Testimonials

One Nation, Indivisible

Link: https://dannyman.toldme.com/2008/07/04/one-nation-indivisible/

“I pledge allegiance, to the flag, of the United States of America. And to the Republic, for which it stands, one nation, indivisible, with Liberty and Justice for All.”


Notice anything missing?

Some time in grammar school I figured there was something wrong with an Atheist pledging allegiance “under God” and after some time I came to pause when we would recite those two words. “one nation . . . indivisible.”

Paul Burd asks “do you remember the words to the Pledge of Allegiance?”

I am overly aware of the words. I responded:

I can recite the Pledge of Allegiance no problem. But as a devout Atheist and an honest patriot I skip the Joseph McCarthy “under God” feature because it is sacrilegious to make false professions, and dangerously reckless to claim holy sanction for the State.

So, here’s to Independence from Tyranny and state-sanctioned religion!!

Feedback Welcome

Featured, FreeBSD, Linux, Mac OS X, Technical

HOWTO: Random Number in Shell Script

Link: https://dannyman.toldme.com/2008/07/04/shell-sh-bash-random-splay/

The other day I was working on a shell script to be run on several hundred machines at the same time. Since the script was going to download a file from a central server, and I did not want to overwhelm the central server with hundreds of simultaneous requests, I decided that I wanted to add a random wait time. But how do you conjure a random number within a specific range in a shell script?

Updated: Due to much feedback, I now know of three ways to do this . . .

1) On BSD systems, you can use jot(1):
sleep `jot -r 1 1 900`

2) If you are scripting with bash, you can use $RANDOM:
sleep `echo $RANDOM%900 | bc`

3) For portability, you can resort to my first solution:
# Sleep up to fifteen minutes
sleep `echo $$%900 | bc`

$$ is the process ID (PID), or “random seed” which on most systems is a value between 1 and 65,535. Fifteen minutes is 900 seconds. % is modulo, which is like division but it gives you the remainder. Thus, $$ % 900 will give you a result between 0 and 899. With bash, $RANDOM provides the same utility, except it is a different value whenever you reference it.

Updated yet again . . . says a friend:
nah it’s using `echo .. | bc` that bugs me, 2 fork+execs, let your shell do the math, it knows how
so $(( $$ % 900 )) should work in bsd sh

For efficiency, you could rewrite the latter two solutions:
2.1) sleep $(( $RANDOM % 900 ))
3.1) sleep $(( $$ % 900 ))

The revised solution will work in sh-derived shells: sh, bash, ksh. My original “portable” solution will also work if you’re scripting in csh or tcsh.



Violet Guy

Link: https://dannyman.toldme.com/2008/07/10/violet-guy/

Inspired by a guy in Hat Yai, Thailand, but all mixed up, Picasso-style.

Feedback Welcome



Link: https://dannyman.toldme.com/2008/07/17/woman/

My other favorite. She kind of came out of nowhere, and for me evoked Jordan while doodling in Thailand.

Feedback Welcome


Woman Sketch

Link: https://dannyman.toldme.com/2008/07/24/woman-sketch/


She’s not as pretty as last week. Next week is my first attempt at publishing a cartoon.

Feedback Welcome

doodles, Sundry

Mr Iconoclast

Link: https://dannyman.toldme.com/2008/07/31/mr-iconoclast/

This is the first contemporary “doodle” that I’m posting. I hope there will be more. I have long had a crush on the word “iconoclast” which basically means non-conformist, someone who marches to their own drumbeat, conventions be damned. I like it because it kind of sounds like “ironclad”. The “ironclad iconoclast” chugging along the seas blowing up wooden preconceptions!

Yeah, anyway, that crazy guy with the mug is me. Seriously, I can drink coffee from a paper cup if I have to but why should I have to? So, if I’m headed to a cafe I pack my own mug. Of course, Starbucks will still hand me my pastry in a bag, like I’m some sort of cretin.

I don’t actually talk as much as “Mr Iconoclast” but I have smiled and answered “MUG SIZE!”

Also, that overly-wide middle line could be considered a bug, which I could have fixed on the computer, but have chosen to preserve for posterity. Nyah!

1 Comment

Arrr! . . . Avast!
Site Archive