Monday, September 19, 2011

Calibrating Sound Levels with ALSA

I'm trying to use a single headset for both listening to music and talking on the phone (via Google Voice). It's more difficult that it sounds! One big problem I found is that when talking on the phone, I have to jack-up the output volume (to close to 100%). But, at that setting, music playback is extremely loud---I prefer approximately 33%. Fortunately, there is a way to modify the volume of a particular application. Under Preferences->Sound->Applications, I found an "ALSA plug-in [ogg123]" control. I play music with ogg123. I can use this slider to control volume of music playback. By setting this slider to 33%, I can set the overall output volume to close to 100% and not have to switch volume back-and-forth when I go from listening to music to talking on the phone.

Thursday, September 15, 2011

Weather Percentiles

I just learned about It provides historical temperature information better than any other web site I've seen. The best part is the fact that it provides not just high/low means, but percentiles, so you can get a sense of how variable the temperatures are and whether-or-not the weather you're seeing is extreme. They overlay actual temperatures so you can easily compare actuals versus historical patterns.

Friday, September 9, 2011

How to Set the Font in New Emacs Windows

I frequently use C-5-2 to get a new window without creating a new emacs process. In emacs lingo, each window is called a frame. At some point, I was surprised to find that the new window had a font different than my default font. After some searching, I learned that emacs has a completely separate font specification for new frames. See the GNU Emacs Manual page on Creating Frames. At the bottom of that manual page is where you'll find the recipe:

(add-to-list 'default-frame-alist '(font . "6x13"))
I've used my favorite font name ("6x13") in this example, but that may be too small for many people. Many fonts are available. Try "10x20" for a larger size. Also see the GNU Emacs Manual page on Fonts

Tuesday, September 6, 2011

How to Take a Screenshot using a Mac


Note that this automatically saves a file to the desktop. You will not see any prompting or indication that the operation is complete. Just go and look for a file on your desktop.

Monday, September 5, 2011

Don't Freak Out if Your Baby Eats One Lily of the Valley Berry

Yesterday, I went on a walk with my wife and two kids (4 yo daughter, 1 yo son). On our way back home, my daughter picked a reddish-orange berry off what was likely a lily of the valley plant (we have a ton of them in Natick). My daughter loves picking berries. She does it almost every time we go on a walk. So, when we got home, my wife and I didn't think to be worried about the fact that she'd probably bring it home and leave it on the table in the playroom. Normally, that wouldn't be a problem since as of one week ago, our son wouldn't be able to reach such a berry. But, beginning about a week ago, our son has started pulling himself up. And, he loves exploring new sights and chewing on anything he can get in his mouth. So, the inevitable happened. One of us heard him coughing and came to check him out. Suspiciously, he wouldn't open his mouth. Normally, he lets us see inside with little prodding. We knew something was up. Then, we remembered---the berry!

After we stuck him in a high chair to keep him still, one of us managed to get a finger in his mouth and swipe out the skin and seed of a reddish-orange berry. My wife suspected Lily of the Valley (LotV) and recalled that the berries are toxic. I confirmed online that LotV has such a berry. I called the national poison control emergency line. They recommended going to the emergency room, but recommended that I talk to my local poison control first. The Massachusetts poison control told me not to worry---the berries are technically toxic, but one berry is not a problem for (even) a one year old child. She said we only need to worry if he starts acting strange---lethargic, nauseus, vomiting. Phew! We both heaved a sigh of relief. My wife didn't completely believe poison control and called our doctor. He said we did the right thing and, yes, we should believe poison control---there is absolutely nothing to worry about.

Note: When I called the 800-222-1222 number Sunday afternoon, I was transferred to the national center. They gave me the following local numbers, one of which connected me to the local poison control: 800-682-9211, 617-232-2120, 617-355-6607.