Category Archives: Science & Technology

Mediawiki “vendor branch” for Mercurial users

I created a “vendor branch” of the MediaWiki stable releases for Mercurial users. (Git is, after all, pretty terrible by comparison.) Commit history goes from 1.21.2 back to 1.19.7.

You’ll do something like this to update:

$ cd your/personal/mediawiki/branch
$ hg pull -u
$ hg pull https://bitbucket.org/rianjs/mediawiki-vendor
$ hg merge tip
$ hg commit
$ hg push

Then deploy however you deploy. Check Special:Version to see that it’s updated.

How to install pip on Windows

This is a distillation of the instructions at The Hitchhiker’s Guide to Python, mostly for my own future benefit when I inevitably forget how to do it:

  1. Install Python, if you haven’t already
  2. Install distribute by running the distribute_setup.py script:
    1. wget http://python-distribute.org/distribute_setup.py
    2. python distribute_setup.py
  3. Use easy_install to install PIP. PIP is actively maintained, and supports package removal (unlike easy_install)
    1. easy_install pip

This took a grand total of about 60 seconds to complete.

Gmail: Find unlabeled mail, and filter by attachment size

If you’ve wanted to filter by attachment size, or find unlabeled emails… you’re now in luck. Gmail has added some search operators recently.

My favorite is the ability to filter by attachment size:

  • size:2m searches for attachments of 2MB
  • larger:3m searches for attachments of 3MB and larger
  • smaller:5m searches for attachments smaller than 5MB

You can combine these searches with the other Gmail search operators:

  • larger:3m older_than:2y
  • larger:5m from:email@example.com

Need to find unlabeled messages?

has:nouserlabels will show you stuff you haven’t labeled.

3 minute tip: Configure a Linux server to send email

It’s useful to be able to send email from a Linux webserver. I do it to get MediaWiki page change notifications and other automated status updates. I wanted something that supported two-factor authentication, and this does.

This guide is for you, if:

  • You don’t want to run a mail server
  • You want to send email, and you don’t care about receiving it
  • You want people to receive the emails that your server sends

I’ve used this method with Linode, and it works perfectly.

Install mailutils

~ sudo apt-get install mailutils

When the setup wizard launches, choose the unconfigured option. You don’t need to do any special configuration to get this to work.

Install and configure sstmp

  1. ~ sudo apt-get install ssmtp
  2. ~ sudo vim /etc/ssmtp/ssmtp.conf
  3. Hit “i” to enter Insert mode.
  4. Uncomment FromLineOverride=YES by deleting the #
  5. Add the following to the file:

     
    AuthUser=<user>@gmail.com
    AuthPass=Your-Gmail-Password
    mailhub=smtp.gmail.com:587
    UseSTARTTLS=YES

  6. Save and close the file:
    1. Hit Escape
    2. Type :wq
    3. Hit Enter

If you’re using two-factor authentication
Create a new application-specific password to use in the config file above. (If you’re using Gmail, you can manage those passwords here.)

Test it out
~ echo "This is a test" | mail -s "Test" <user>@<email>.com

Using a webmail service other than Gmail
You can follow the same pattern that I used above. You’ll need to:

  1. Subsitute the SMTP address and port for your email service (e.g. Yahoo!) where it says smtp.gmail.com:587. (587 is the port number.)
  2. Set up an application-specific password if your webmail provider allows it, and paste that into the password line, the way I did with Gmail. (Yahoo! appears to have something similar.)

A little morning reading

I read an article last night by Michael Nielsen entitled “Is scientific publishing about to be disrupted?” It was probably one of the best articles I’ve read in at least a month. This morning I woke up earlier than expected, and I decided to check out the author’s background, and suddenly it made sense that I was impressed with the content. Fortunately (unfortunately?) he linked to a bunch of other stuff he’s written, and I found myself popping open new browser tabs as though I were browsing Wikipedia.

This led to a great deal of copying and pasting. 34, two-column, 10pt, 4×0.5″ margin pages later, I have a whole pile of reading material. (I read offline because my attention span whilst on the computer isn’t what it needs to be for longer, denser pieces.) I’ve worked my way through a great deal of it, and I find myself wishing I had stuck with Computer Science a while longer.

In any event, here’s the list. Enjoy.

The last two aren’t written by Nielsen, but they’re worth reading, especially if you’re interested in open science.

Two of the best undersea exploration videos I have ever seen

I’ve never really been a huge fan of undersea exploration, but I did always find it strange that we deploy so much capital (human, financial, intellectual) exploring space while largely ignoring our oceans.

As a longtime subscriber to the TED talks video podcasts (HD podcast), I fell in love with these two presentations, so I thought I would share them here. What’s striking is their ability to make accessible, and even excite those who aren’t normally fascinated by the ocean. I’ve included the links to the HD versions of the presentations. Right click -> Save As to download them.

 

David Gallo on life in the deep oceans (HD download | TED page)
 

 

Robert Ballard on exploring the oceans (HD download | TED page)
 

In my opinion, TED is one of the coolest organizations out there, and I think it’s brilliant that they’ve decided to open up their catalog to the general public, for free. Hi-Def knowledge spillover for societal win.

In honor of Darwin

Darwin’s 200th birthday is this week, and Harvard is having a Darwin Day on Thursday which I will (alas!) be unable to make it to. (Just like I was unable to make it to the last Harry Potter book launch in the Square. I have rotten luck like that.)

The NYTimes has some great coverage of Darwin this week in their science section, both as a man and as a scientist. His story is one that is tragically ironic. A Christian who struggled with the ramifications of his discoveries, yet a man who is today reviled by many of those who share his core faith.

John Whitfield has been blogging the Origins as a run up to Darwin Day. An intriguing idea… I wonder how many biologists haven’t read it? I haven’t read it, but I’m not a biologist, and it is on my list. First off is Dawkins’ The Ancestor’s Tale which is currently sitting on my bookshelf. (Speaking of which, now that the Kindle 2 is out, I could probably keep most of my collection in digital format with me much like I have virtually all of my music on my iPod…)

My favorite article of the bunch, so far. Darwinism Must Die So That Evolution May Live:

Science has marched on. But evolution can seem uniquely stuck on its founder. We don’t call astronomy Copernicism, nor gravity Newtonism. “Darwinism” implies an ideology adhering to one man’s dictates, like Marxism. And “isms” (capitalism, Catholicism, racism) are not science. “Darwinism” implies that biological scientists “believe in” Darwin’s “theory.” It’s as if, since 1860, scientists have just ditto-headed Darwin rather than challenging and testing his ideas, or adding vast new knowledge.

Using phrases like “Darwinian selection” or “Darwinian evolution” implies there must be another kind of evolution at work, a process that can be described with another adjective. For instance, “Newtonian physics” distinguishes the mechanical physics Newton explored from subatomic quantum physics. So “Darwinian evolution” raises a question: What’s the other evolution?

Almost everything we understand about evolution came after Darwin, not from him. He knew nothing of heredity or genetics, both crucial to evolution. Evolution wasn’t even Darwin’s idea.

Darwin’s grandfather Erasmus believed life evolved from a single ancestor. “Shall we conjecture that one and the same kind of living filaments is and has been the cause of all organic life?” he wrote in “Zoonomia” in 1794. He just couldn’t figure out how.

Gregor Mendel, an Austrian monk, discovered that in pea plants inheritance of individual traits followed patterns. Superiors burned his papers posthumously in 1884. Not until Mendel’s rediscovered “genetics” met Darwin’s natural selection in the “modern synthesis” of the 1920s did science take a giant step toward understanding evolutionary mechanics. Rosalind Franklin, James Watson and Francis Crick bestowed the next leap: DNA, the structure and mechanism of variation and inheritance.

Bullets for a snowy Wednesday

A smattering of things I’m consuming:

MeDic: minor update

There were some comments on the MeDic pages indicating that MeDic was incompatible with newer versions of Microsoft Office. Specifically Office 2007 for Windows and Office 2008 for Mac due to it not being Unicode.

I have uploaded a new version with the text encoding as Unicode, so anyone that has been unable to use the dictionary should now be able to.

MeDic main page

À propos: Amazon Green

On the heels of my four-part series this week, Amazon has launched their new “Green” section:

Amazon Green

I have my doubts about the real usefulness of some of the top items, but the CFL bulbs are the real deal. While I would never pay $14 for one of them, we did get about three dozen of them on sale at Building 19 for something like 17 cents each about two years ago. We noticed a significant drop in our electrical bill right away on the order of ~$10-15 a month. Bonus has been that we’ve had to replace one(?) bulb during this time, so we still have quite a few of them stashed away. One downside is that they don’t seem to last very long in New England weather extremes, so we use a regular incandescent for our one of our outside lights.

[Completely unrelated, but what’s up with the crappy graphics Amazon uses for their navigation? Honestly, Amazon, just use text. It loads faster, and looks nicer.]