I was just looking at some XML, and saw that the namespace for XUL is
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul
It looks like someone likes Ghostbusters at Mozilla. I just found it amusing.
Firefox is a pretty decent web browser. However, it can be a bit more clever than I want it at times. For example, if I want to SSH into a remote machine and launch a instance of Firefox — to take on the remote machine’s IP address or access localhost — I would have to close the local instance then launch the remote instance. That is annoying and unacceptable behaviour.
Luckily, the solution is fairly straightforward. Once you have SSH’d into a remote host (using ssh -X), you simply need to run firefox -no-remote. Of course you may want to tack on > /dev/null and an ampersand & to ignore the output and background the task. (Thanks to The Open Sourcer.)
With Firefox 2.x this behaviour was somewhat undocumented, but with Firefox 3.x, running firefox --help from the command line shows the -no-remote option. It also seems that the default (i.e. -remote), is “documented” on Mozilla’s site for Remote Control of UNIX Mozilla.
If you wanted to make the -no-remote behaviour the default when SSH’d into remote machines, you could simply add a few lines to your bash profile to alias the firefox command.
# If we're forwarding X over SSH, make firefox execute on this machine
if [ -n "$SSH_CONNECTION" -a -n "$DISPLAY" ]; then
alias firefox='firefox -no-remote'
fi
At least that is what I did.
For those that don’t know, I use mutt for my email needs. This provides several niceties such as stripping out all the various formatting people like to include in their emails (fonts, graphics, etc), a keyboard driven interface, and, well, it just sucks less that most mail clients.
With mutt I choose to download all my email via POP3 to a local machine where I can read it when I get around to it (rigorous, isn’t it). After I read a message and deem it complete I move it to a folder named after the sender (or possibly a group) where I can grep the files and read them at a later date.
However, after a while these files pile up and I need to periodically compress and archive them. This, of course, gets annoying and frequently forgotten. To solve this I needed a script that could parse messages in a number of mail formats, find a date, and determine if it is beyond some threshold at which point it should be archived. These requirements brought me to archivemail. Archivemail supports several input formats (IMAP, mh, mbox, Maildir), archives the messages, and outputs a single mbox formatted file (that can be compresses). While I’m not a huge fan of the mbox format I can easily deal with it for archived mail.
The headaches of coordinating a transition from svn => bzr at $JOB a few months ago have had time to fade, and I’ve now had some time to get used to using a DVCS on a day-to-day basis. Much like the experience of working with revision control is to the absence of it, I’ve found that the move to distributed revision control from centralized leaves one reluctant to return to the old way.
So, I’ve got Bazaar down pretty well—it’s design has been engineered for a smooth transition from Subversion—but Git is a different beast.
Git breaks a lot of the conceptual assumptions made in svn-land that you didn’t even know you were using to understand your daily VCS use; the basic “checkout, update, commit” operations don’t cleanly map to the git paradigm. This can create many WTF moments spent staring at lines of help like:
git-rebase - Forward-port local commits to the updated upstream head
The payoff for diving into these treacherous waters is, IMHO, worth it. When your first ‘git commit’ or ‘git checkout’ comes back within a few milliseconds and you’re left sitting there still trying to believe it’s already done… this is when you realize “Wow, this tool might actually change the way I work.”
This shouldn’t have been as difficult to find as it was, so I figured I’d better throw it somewhere.
OPS = { "=" => lambda { |v, r| v == r }, "!=" => lambda { |v, r| v != r }, ">" => lambda { |v, r| v > r }, "<" => lambda { |v, r| v < r }, ">=" => lambda { |v, r| v >= r }, "<=" => lambda { |v, r| v <= r }, "~>" => lambda { |v, r| v = v.release; v >= r && v < r.bump } }
Found deep in the rubygems source.
YAML.dump can’t produce valid YAML…Yesterday I had fun with ruby’s YAML module not loading a piece of YAML I needed it to load. Syntax Error… fine–all in a day’s work. But then I started looking at the YAML in question and I realized, this was GENERATED by the module itself!
Today at the Marquette Student ACM meeting, I gave a short presentation (PDF) about development on Linux. Specifically using Makefiles. As promised I have uploaded it to this site and I will give a little more information in this post.
cron and tarThis post is an import from a presentation I did in October of 2007. Since I’ve made this presentation, I’ve stopped using my own script and suggest you use another tool for backups. I hear rdiff-backup is good. However, I believe this is still a good introduction to bash scripting, cron, and tar.