Bracing against the wind  
www.documentroot.com  

Sunday, December 19, 2010

Uncuddled Else

I don't care how cute the name is. It wastes precious vertical space while adding nothing to readability. Worse yet, the uncuddled else substracts from the implication that it is a part of the prior "if" statement... which it is.

[View/Post Comments] [Digg] [Del.icio.us] [Stumble]

Thursday, December 09, 2010

Migrate from Flickr to Picasa

There are other migration tools out there but nothing works as well as Nathan Van Geem's script... preserves your organiation, titles, descriptions... and moves it all to picasa in one clean step.

Of course... you'll need to have python installed on your machine.

But the advantage is that it uses almost no space... downloading and uploading at the same time, so it doesn't chew up your drive with "yet another copy" of those pictures.

I thought of giving people access to it as a service... but really, his instructions aren't too hard

[View/Post Comments] [Digg] [Del.icio.us] [Stumble]

Wednesday, December 08, 2010

HOWTO: Condor on an Intranet

Here's what I had to do to make it work. So far it's fine.

ADMIN:

1. If you install Condor as an RPM, it will default to running everything as the user "condor". This will prevent the condor machinery from smartly forking jobs as "the user who submitted them". Especially, if you're on a private network, this makes no sense though, so open it up with CONDOR_UIDS=0.0

2. Lots of machines mounted to the same share? This one was useful:

LOCAL_CONFIG_FILE = /mnt/blah/condor/$(HOSTNAME).local

Now I can keep configs for each machine, without having to worry about condor_config -set. I use symbolic links to create "machine classes" that I add machines to when I bring up new nodes.

3. condor_config_val -set ... seems nice, but don't bother. You really need to keep your configs well groomed. I wasted time getting it to work... and then deleted everything I set. Must be nice on heterogeneous public networks where the config file isn't on some shared mount. (In fact I just disabled it).

4. Trust everyone... let the firewall protect you. TRUST_UID_DOMAIN = True. This is good for getting started, so you're not bumping into roadblocks all the time. Afterwards, tinker with password auth. Kerberos and the like are a bit much, basic password encryption is fine, IMO, and will work everywhere.

5. GET RID of stuff that the RPM stuffs in your local config. Things like "Suspend=False" and "Start=True" are in there... and they are bad. Since your machines don't have a keyboard, ditch the Keyboard stuff and go with "START=$CPUIdle". Since you don't want your jobs to get randomly killed, go with "SUSPEND=$CPUBusy". (You can just delete the stuff in the local config and go with the UWCS defaults... they are really good enough for most things.). Your global config should be the SAME on all boxes. Your local config should be minimal... just the stuff for that machine.

USING

1. condor_run has to be run *from a shared directory* or it won't work. It says that in the docs, but I didn't read it.

2. Likewise, for vanilla jobs, make sure the paths to all your files are the same on every machine you run on. Trying to sort it out in a script is a mess. Fix paths first. Then run.


[View/Post Comments] [Digg] [Del.icio.us] [Stumble]

Better than Textpad

For the longest time, I used textbad because of teh block-editing, regex, and extremely large file support.

Notepad++ wasn't even a contender years ago, but it has cought up... and passed with flying colors:

http://notepad-plus-plus.org/

Switched all my scripts over today. Not looking back.


[View/Post Comments] [Digg] [Del.icio.us] [Stumble]

Sunday, December 05, 2010

Perl don't run this script more than once

I find myself writing this kind of code, preventing a script from being run more than once, in a lot of different ways - for no good reason. This method seems to work the best for me over the years:


use File::Pid;
my $pf = File::Pid->new;
exit(0) if $pf->running;
$pf->write();
END {$pf->remove();}

The IPC and mutex stuff is cute, but not portable... or transparent. Plus, it's nice to have a pidfile out there for other reasons.

(When I forget how I solved a problem, I post it here. That way, I can google and get an answer.)

[View/Post Comments] [Digg] [Del.icio.us] [Stumble]

Julian Assange, Julian Assange, Julian Assange

Did you know that by merely posting his name to my blog, that my blog now becomes suspect according to a new subpoena by the U.S. attorney general's office? Any website which has any connection to Julian and Wikileaks is now suspect.

Exposing the truth will always harm liars and help honest people. (And the U.S. is not the worst liar on the Wikileaks chopping block , by far. Looks like Yemen and Aghanistan are the title holders there. )

Perhaps the people who oppose Wikileaks the loudest are probably just the ones with the most secrets and the most lies.

Our news organizations have castrated themselves, and now do nothing more but parrot state press releases. Ethical, investigative reporting is a dying profession. It seems to me that Wikileaks is some sort of "last bastion", where the truth is freed.

Do we dare to live in a new age where "stat secrets" are not necessary - where we operate as a powerful nation who is proud of what it's leaders, diplomats and citizens are doing?

[View/Post Comments] [Digg] [Del.icio.us] [Stumble]

Saturday, December 04, 2010

Runaway Inflation Time

Suppliers and manufacturers are sending me emails every week talking about price increases. They all blame the cost of their own supplies. Following the chain leads to raw-material refining and extraction expenses have been rising.

This is a delayed reaction since existing stocks are being depleted.

Expect everything to get a LOT more expensive. The US dollar will continue weaken in response to low interest rates, and exacerbate the problem. The Fed won't raise rates because of the stupid stock market ... damn the rest of the economy.

[View/Post Comments] [Digg] [Del.icio.us] [Stumble]

Home | Email me when this weblog updates: | View Archive

(C) 2002 Erik Aronesty/DocumentRoot.Com. Right to copy, without attribution, is given freely to anyone for any reason.


Listed on BlogShares | Bloghop: the best pretty good | Blogarama | Technorati | Blogwise