Bacula script: get_monthly_tapes

Periodically I remove tapes at $WORK from our tape library to keep them somewhere else. getmonthlytapes is a Perl script that helps me do just that. Released under the GPL; share and enjoy!

Tags: bacula backups

Observing Report -- March 23, 2012

Last night was the first clear night in a ridiculous amount of time. It was also a nearly new moon. On top of all that, the kids were over at their grandparents for the night, and I could stay up as late as I wanted. IOW, the astronomy gods were saying "GO."

I decided that I'd go to Mount Seymour. There's a parking lot about halfway up that folks congregate at; it's darker than the local park I usually walk to. I'd only been to it once before; I don't like going regularly because it's a long drive and gas, she is expensive. But this seemed like a special occasion.

I packed up tea and a sandwich, picked out some targets for the night, and started off. I got there at 8.15pm, distracted only slightly by Jupiter and Venus along the way. There were a half dozen people there already, including the woman I met last June ("Have I met you before? Yeah, and I probably asked you then if I'd met you before...") I set up and waited for the scope to cool down.

Well, no, I didn't wait. Who could wait? Venus was a lovely half circle, even if it was shimmery and wobbly. Jupiter was just heading below the trees and I got a very brief look; SEB, I think, present, and NEB not very noticeable.

Then Mars -- the first time I'd looked at it through the Dob. Very nice. I'd been preparing myself to see no features at all, but slowly some came out; it held my attention much longer than I anticipated. I think I saw hints of the north polar ice caps, and a band just south of that surrounding the pole. I came back to it a few times over the night, and magnification held up to 320x (Barlow'd 7.5mm Plossl; nothing special, but works for me). (I'd just traded my 4.3mm eyepiece in earlier in the day, and I was a little bit sad I didn't have a chance to try that...)

I got a chance to check out a number of things through a 6" AstroPhysics refractor, with a 100-degree TeleVue, that another person had brought. The Double Cluster and M42 were simply stunning, and I know now just how wonderful those supernormowide eyepieces are. I was surprised, though, how much colour fringing showed up on Mars. I envy him the deep sky stuff, but I'm happier w/my view of Mars.

M35, M36, M37 and M38 were all perfectly visible through binoculars -- nice! Took a quick look at M35 through the scope; pretty as always.

I took my usual run at M81 and M82. I've been searching for these for a year or more, and it's always been a fruitless search. After 30 minutes I gave up in frustration. I got talking to the woman I'd met earlier, and she showed me them through her scope (10" Dob). She also pointed out where they were in the sky w/her laser pointer. Inspired, I tried again, found out where I should be looking, and sweet Cthulhu on a pogo stick FOUND THEM! It was immensely satisfying, and very pretty -- faint, but pretty. Amazing to think I can hold two galaxies in one FOV.

I had to give up at 11.15pm; my feet were cold as hell. I hadn't got to half of my list (Comet Garradd, M46, M47, M67, NGC 2261, NGC 2264, X Cancri (Carbon star) and the Leo triplet), but what the heck. I packed up, came home, drank some therapeutic wine and got to bed at 1am. And then SLEPT IN 'til 8am. Wonder of wonders. What a night.

Tags: astronomy

Greg Kroah-Hartman

If you don't follow his blog, it's worth it. Two snippets from his post on the 2.6.32 kernel. First:

We all drifted back to our companies, and planted the seeds that maybe something like the 2.6.32 kernel would be a nice one to do our product on. This planting worked so well, I had to refrain from fits of laughter in one meeting where a project manager got up and said, "We decided that the 2.6.32 kernel would be the best for our product, what does engineering think about this?"

This successfully cumulated in the release of SLE11 SP1, Debian "Squeeze", RHEL 6, Oracle Linux 6, and Ubuntu 10.4 LTS, all based on the 2.6.32 kernel.

Hacking the business models of these different and competing groups, to coordinate on this specific kernel, was one of the (previously) unsung successes of how the community really can achieve remarkable things if they decide to do it.

Two:

I would personally like to thank the Debian kernel developers, specifically Ben Hutchings, Maximilian Attems, Dann Frazier, Bastian Blank, and Moritz Muehlenhoff. They went above and beyond what any "normal" developer would have done, ferreting patches out of the kernel.org releases and the different vendor kernels and bug tracking systems, backporting them to the 2.6.32 kernel, testing, and then forwarding them on to me. Their dedication to their user community is amazing for such a "volunteer" group of developers.

I firmly believe that without their help, the 2.6.32 kernel would not have been the success that it was. The users of Red Hat and SuSE products owe them a great debt.

Buy them a beer the next time you see them, they more than deserve it.

Tags: linux

Half-assed Emacs mode for Foswiki/Twiki

Here's my attempt at getting a working Foswiki/TWiki mode for Emacs based on Org-mode. I've started taking this good work and mangling it; my excuse is that I'm only just starting to program Emacs.

What works so far: cycling visibility with tabs and detecting levels. Hey, it's a start. :-) Next up is getting Meta-left/-right to work to promote/demote headings; I'm not sure if I should be doing this with Emacs advice, or if there's some other way to locally override a function's definition. Answers on a postcard to aardvark [ta] saintaardvarkthecarpeted [tod] com 'til I get comments sorted out.

Tags: emacs foswiki

Magit error \"fatal: ambiguous argument\"

When using magit, I came across errors that looked much like these:

Unpulled commits:
fatal: ambiguous argument 'HEAD..exoplanet/compute_server': unknown revision
or path not in the working tree.
Use '--' to separate paths from revisions

(Here, "exoplanet" is the name of a machine, and "compute_server" the name of a branch.)

The problem turned out to be that .git/config looked like this:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = exoplanet:~/dotfiles-git-master
[branch "compute_server"]
    remote = exoplanet

Note how the branch lists the remote as "exoplanet", but there's no "exoplanet" remote config stanza -- only one called "origin". Changing the remote listed under the branch to be "origin" worked. Here's the working config:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = exoplanet:~/dotfiles-git-master
[branch "compute_server"]
    remote = origin

Tags: git emacs

Small Emacs win

Part of how I'm beginning to work with Org and RT:

(defun x-hugh-boxquote-yank-and-indent ()
  "My attempt to combine boxquote-yank and indent.

The car/cdr bits are from the docstring for boxquote-points.  It's a bit silly to run it twice, but it was simple."
  (interactive)
  (save-excursion
(boxquote-yank)
(next-line)
(indent-region (car (boxquote-points)) (cdr (boxquote-points)))))
(global-set-key (kbd "<f9> y")  'x-hugh-boxquote-yank-and-indent)

Tags: emacs rt

Reading (Part Umpty)

Hacking Is Important:

The end result of successful hacking is product, and that product needs to grow by building more things. The more you grow, the more things you have, and the more you need people whose job is simply to coordinate the increasingly interdependent building activities. These people, called managers, don't create product, they create process.

Hackers are allergic to process not because they don't understand the value; they're allergic to it because it violates their core values. These values are well documented in Zuckerberg's letter: "Done is better than perfect", "Code wins arguments", and that "Hacker culture is extremely open and meritocratic". The folks who create process care about control, and they use politics to shape that control and to influence communications, and if there is ever a sentence that would cause a hacker to stand up and throw his or her keyboard at the screen, it's the first half of this one.

Tags:

TODO: post-commit hook to email log to RT

I need to add a post-commit hook to my RT git trees to email the day's logs to RT; send 'em as a comment so they show up automagically in the ticket. Looks like the default should do nicely.

Tags: git rt

But there's a HOLE in the bucket

At $WORK I'm trying to install tmap on 64-bit CentOS 5. Here's how it goes:

  • Built RPM for tmap, and it works -- but not using tcmalloc.

  • What's tcmalloc? Part of Google-perftools; a faster malloc. We really want tcmalloc.

  • Found RPM for google-perftools installed, but includes only the 32-bit version of tcmalloc due to dependence of other parts of perftools on libunwind.

  • installing libunwind on 64-bit CentOS 5 a big PITA and I decide to try working around it.

  • Conveniently, tcmalloc can be compiled on 64-bit platform; produces libtcmalloc_minimal, which documentation says is perfectly valid malloc.

  • tmap does not come, out of the box, configured to look for (in configure script) tcmallocminimal, but there is an commented-out option to do so. You can remove the comment and run autogen.sh, and then configure will look for libtcmallocminimal.

  • ...but this fails because the way I compiled/built rpm for tcmalloc does not include libtcmallocminimal.so; includes libtcmallocminimal.so.4.

  • and so my half-assed RPM/devel skillz come back to bite me in the ass again.

Tags: sysadmin centos

Bill C-11 in committee

Bill C-11 is in committee right now. I've sent (paper) letters to the committee members and emailed them. I'm not holding out a lot of hope, despite my dream (true story) a few weeks ago that I managed to convince Stephen Harper, while he was visiting my house, that as a parent I should be allowed to back up DVDs. When Harper kept James Moore in place after the lection, he kept somone who (whom? damn English) I've come to accord a grudging respect to as a pit bull of the first order.

Ugh. There's always the next election.

Update: Not four hours later, it's back to Parliament for 3rd reading and Senate approval. I'd better start backing up those DVDs now.

Tags: copyright

Impromptu training from the sysadmin

Today I gave some impromptu training at $WORK; the approximate topic was "Saving State in Linux". I've been meaning to do something like this for a while, but it was prompted by a conversation yesterday with one of the researchers who kept losing work state when shit happened -- Emacs window arrangements, SSH sessions to other machines, and so on. I found myself mentioning things like tmux, workgroups, and Emacs daemon mode...and after a while, I said "Let me talk to you about this tomorrow."

So today I found half an hour, decided to mention this to everyone in the lab, crowded into a meeting room, set up my laptop and the projector, and away I went. For a fly-by-the-seat-of-my-pants first attempt, I think it went relatively well. Best idea: asking people for questions. It hadn't occurred to me that people would want to know more basic stuff like "How do I split windows in Emacs?". I'm never sure what people already know, so I don't want to bore them...

Next time:

  • Be more organized
  • More notice for people so they can prepare questions
  • Let the vi people know if it's going to be Emacs-heavy

In other news: finally converted my SVN repos to Git yesterday in a fit of pique. The big three -- my org-mode stuff, and the two Cfengine repos (Cf2 and -3) -- are already in use, as in that's where I'm checking stuff into. The rest (Nagios configs, for example) are being done as I get to them. It's really, really wonderful.

Family: holy house o' plague, Batman!

  • Last Friday my older son pukes, stays home from school
  • Last weekend my younger son comes down with bronchitis, demands compensation for being forced to take antibiotics
  • My wife comes down with some kinda virus that makes her nauseous for a week
  • I'm still fighting off a sinus infection
  • Wednesday, my older son pukes again apropos of what we don't know

Gah. We're getting the house boiled next week. (Update, March 13: too late; I puked on Friday night and spent Saturday moaning in bed; my wife did the same thing Saturday night/Sunday. FUCK.)

Also? There's a Planet Lisp. Who knew?

Tags: linux emacs sysadmin geekdad

rpmbuild whatnot

Random rpmbuild stuff:

  • Here's how to create symlinks when building an RPM

  • If you're packaging a statically-built binary (I know, I know) and it suddenly craps out with "unexpected reloc type in static binary", put this in your spec file:

    %define __os_install_post %{nil}

(Found here)

  • To see what macros are defined for your RPMs, run:
rpm --showrc

  • The best way I found to make a symlink in an RPM is like so:
pushd $RPM_BUILD_ROOT/opt/bin
ln -sf ../package/bin/foo .

  • If an rpmbuild invocation fails, don't forget to remove $RPMBUILDROOT. OTOH, that might be my fault for not including that as part of the setup...not sure.

Tags: rpm centos toptips

Oh, so now Libya

I received this bit of spam a few days ago:

From: AUW-RSVP <melud.halasa@example.com>
To: undisclosed-recipients: ;
Subject: hi
Organization: Gen. Melud

My name is Gen. Melud Massoud Halasa,I was a Libyan army General in the
military force of Gardaffi in Libya,i have $23 Million Dollars hidden in
Libya,i need your assistance to move this money out of Libya to your
country,i have resigned from the army and i want to go into business in your
country as your partner.If interested REPLY ONLY VIA MY PERSONAL EMAIL
melud.halasa@example.org for more details.

I forwarded it off to a friend of mine and asked him if he knew anything about it. His reply:

Well, Melud's been trying to move that cash for about six months now but no
one will help him. The thing is, it's actually a physical pallet of $100
bills that we had used to buy his loyalty back during the uprising. That's
why he's starting to reach out farther and farther afield, trying to find
someone who will come to Libya and help him carry the danged pallet to the
local Western Union branch. I'd say it's not worth it ... that Western Union
is at least a mile from where he has the pallet stashed in his mom's house.
I value my lower back more than that.

And, of course, by sending this email back and forth we've guaranteed that
it's being read by some automated spy system that is trying to determine if
this counts as terrorist "chatter." In the interests of being friendly and
polite, I'd like to say hello to that automated system, and perhaps to any
actual human analyst who stumbles across it.

I'd just like to say: that is the funniest thing I hope to read all week. Maybe all month. And definitely on my top ten for the year.

Tags: spam

Northern Flicker

Saw this guy at work today, hammering away on a street light:

Northern flicker

It's a Northern Flicker, and it's a type of woodpecker. The male's the one with the red moustache on the right.

Apparently they do this to scare away other males and attract mates; in the wild, they use hollow logs. From Wikipedia:

This bird's call is a sustained laugh, ki ki ki ki ..., more congenial than that of the Pileated Woodpecker. One may also hear a constant knocking as they often drum on trees or even metal objects to declare territory. Like most woodpeckers, Northern Flickers drum on objects as a form of communication and territory defense. In such cases, the object is to make as loud a noise as possible, and s why woodpeckers sometimes drum on metal objects. One Northern Flicker in Wyoming could be heard drumming on an abandoned tractor from a half-mile away.

Oh, and also saw the standard pair of bald eagles circling overhead.

Tags:

Remember when M-x spook was a joke?

From the Emacs manual:

35.6 Mail Amusements

M-x spook adds a line of randomly chosen keywords to an outgoing mail message. The keywords are chosen from a list of words that suggest you are discussing something subversive.

The idea behind this feature is the suspicion that the NSA1 and other intelligence agencies snoop on all electronic mail messages that contain keywords suggesting they might find them interesting. (The agencies say that they don't, but that's what they would say.) The idea is that if lots of people add suspicious words to their messages, the agencies will get so busy with spurious input that they will have to give up reading it all. Whether or not this is true, it at least amuses some people.

Hee hee. And then there's the Jargon file:

NSA line eater: n.

The National Security Agency trawling program sometimes assumed to
be reading the net for the U.S. Government's spooks. Most hackers
used to think it was mythical but believed in acting as though
existed just in case. Since the mid-1990s it has gradually become
known that the NSA actually does this, quite illegally, through
its Echelon program.

And now this:

The Department of Homeland Security monitors your updates on social networks, including Facebook and Twitter, to uncover "Items Of Interest" (IOI), according to an internal DHS document released by the EPIC. That document happens to include a list of the baseline terms for which the DHS -- or more specifically, a DHS subcontractor hired to monitor social networks -- use to generate real-time IOI reports. (Although the released PDF is generally all reader-selectable text, the list of names was curiously embedded as an image of text, preventing simple indexing. We've fixed that below.)

stuff to monitor

Epic.org info here. Some random keywords, thanks to Animal New York:

  • United Nations
  • Disaster management
  • Security
  • Industrial spill
  • Public Health
  • Telecommunications
  • Yuma
  • Target
  • Earthquake
  • China
  • Social Media

Tags: politics emacs

Idea for task-based shell history

...now with extra synergy!

No. My idea is that if you cd into a particular directory, you'd automagically start a new history file w/in that directory. This would let you keep history when working on a particular task (which in turn would assume you have a different directory for each task). This is sort of related to how I'm beginning to organize work on tickets.

Here's a walkthrough:

  • When I start working on a new ticket, I already run something like this:
```
function setup_rt {
        TICKET=$@
        cd ~
        mkdir rt_$TICKET
        cd rt_$TICKET
        mkdir build test
        touch notes.org
        git init
        git remote add remote remote:/opt/git/rt_${TICKET}.git
        ssh remote -t "git init --bare /opt/git/rt_${TICKET}.git"
}
```

  • And now the magic bit, where cding to that directory automatically saves history in ~/rt_$TICKET/.bash_history.

The magic part is, of course, tricky. I can think of a few ways of accomplishing this:

  • Automagic directory-specific environment-variable fiddling FTW to set HISTFILE.

  • A Bash function like:

```
function start_work_on_ticket () {
     cd ~/rt_$TICKET
     bash --histfile=~/rt_$TICKET/.bash_history
}
```

  • Fiddling with history recording to include PWD each time, and then periodically record by running grep rt_$TICKET $HISTFILE >> ~/rt_$TICKET/.bash_history

And then of course you'd commit it to git (and birds would sing and did I mention it's sunny outside? Because it is). Even better would be a way for RT to automagically link to git-based repos with all this stuff in them.

Of course, for some/most tickets this is overkill. But there are times when I find myself two weeks into fixing something because it's turned out to be surprisingly involved, and I have no good recollection or record of what's been going on. And it's usually right then that someone comes by and says "Oh hey, turns out we gotta do that all over again because [blah]."

Tags:

Emacs and Outlook

Here's hoping I never need this: a Tcl script that allows you to use Emacs as an editor for Outlook.

Tags: windows emacs

Reference page for the Limit command in Mutt

Because it's awesome, that's why.

http://realprogrammers.com/jump_start/mutt/

Tags: mutt

Running newer versions of autoconf tools on CentOS 5

Today I had to compile a program that needed a newer version of the Autoconf suite than is available on CentOS 5. I got around this like so:

  • Downloaded and rebuilt the SRPM for autoconf2.6 from the good folks at pkgs.org

  • Installed it on the build machine (dang! shoulda been using Vagrant for that! Or least Mock...)

  • This gives you /usr/bin/auto[whatever]2.6x -- which is good! don't overwrite stuff! But you'll still get complaints about not new enough versions.

  • Symlink all the 2.6 binaries to ~/bin/:

for i in /usr/bin/auto*2.6x ; do
    ln -s $i ~/$(basename $i | sed -e's/2.6x//g')
done

  • Modify PATH to have ~/bin first.

Walla.

Tags: toptip centos

Weird bright satellite on Monday

Last night was a rare semi-clear night (this month has been awful, grumble), so I was excited to see the Moon, Jupiter and Venus on my walk home from the bus stop after $WORK; it was kinda cloudy, but not completely, and anyhow the crecent moon was awful pretty through the haze. When I got home I asked my oldest son if he wanted to go out w/the telescope after supper. He was enthusiastic, so I put the 4.5" reflector outside to cool while we ate.

Forty minutes was enough to bring in more threatening clouds, but we could still see the three of them. I set up the scope and had a look at Theopilus. A couple years ago my son noticed its distinct appearance, and asked what its name was. I looked it up, and have been fond of it ever since. This time, though, he couldn't pick it out...but he was still interested, so that was good.

I'd looked on Heavens-Above to see if the ISS was due to fly overhead tonight, and it was -- just before 7pm, right when we were outside. Sweet! Sure enough, we watched closely and there it was, bright as anything and moving just past the moon. But wait, wasn't it supposed to go across the moon? What the...

...and then one minute later, there was the real ISS, and it was going across the Moon (very cool!). And there was the other satellite, almost as bright, moving on a different track. As far as I could tell, both stayed the same steady brightness -- so no tumbling for our mystery satellite. We watched both 'til they passed into the Earth's shadow, then headed inside for the night.

First thing I did, of course, was pull up Heavens-Above again to see what this other satellite was. And I couldn't find anything! There was simply nothing listed anywhere near the time the ISS flew over, let alone something that was supposed to be that bright. No Iridium flares either. Stumped, I reported to my son that I had no idea what it was.

But then I realized that I'd been looking at the listings that were supposed to be brighter than 3rd magnitude, rather than the fuller list that went down to 4.5. It was possible this thing was in the fuller list, but was brighter than predicted (because the predicted angle of reflection was wrong, say). So I pulled up the full list and started looking at tracks.

Sure enough, there were a bunch that were overhead at that time. The ISS was the most obvious one, but looking at the map tracks this Delta II rocket was the one we saw, which had launched the Globalstar 26. Here's the ISS pass:

ISS pass

And here's the Delta pass:

Delta pass

The times don't match up perfectly. The Delta was predicted to reach max altitude at 18:44 and enter shadow at 18:50; the ISS was predicted to reach 10 degrees altitude at 18:51, max at 18:54 and shadow at 18:57. I didn't note the time we saw the first one, since it was right around 18:50 and I thought it was the ISS.

I told my son about all this and -- being the son of a geek -- he thought it was pretty cool. :-)

Also -- and this is completely unrelated -- how did I not know about M-a in Emacs? Ordinarily it's "backward-sentence", but in programming modes, it moves to the beginning of non-whitespace on a line. ZOMG.

Tags: astronomy geekdad emacs