alvin's blog

Methods on the Scala collections classes, organized by category

When I wrote the Scala Cookbook, I gave each recipe and then each chapter my full attention. I thought that if I wrote each recipe as well as possible, and included important recipes in each chapter, well, I wanted each chapter to be worth the price of the entire book. That was my goal.

As a result of this effort -- and perhaps to the chagrin of my editor -- the Scala collections chapters ended up being 130 pages in length.

Day 20 of the low iodine diet (before radioactive iodine treatment)

Dear Diary: Day 20 of not having a thyroid, not taking thyroid medicine, and the low-iodine diet.

I didn’t know if a person could lose weight without a thyroid, but I’ve dropped six pounds so far. In all I’ve dropped 20 pounds since I finished writing the Scala Cookbook (when I was working around the clock, not exercising, and eating crap).

Complete backup scripts for my websites (Drupal, MySQL)

I’m spending a little time today trying to automate the process of backing up my websites, and in doing so I thought I would share the Linux shell scripts that I use to generate the backup files, including backups of my MySQL databases and Drupal website directories. If you are comfortable with shell programming in Linux, I think you’ll be able to follow the code in the following scripts.

MySQL database backup script

First, this is a backup script I use to backup a MySQL database:

How to add a Sencha ExtJS splash (loading) screen

I’ve written a couple of small Sencha ExtJS applications lately, and I can confirm that the following technique works to display a splash screen while your application is loading.

(This isn’t a tutorial per se. I assume that you know how to use ExtJS, and just want to see how to implement a splash screen (loading page) as the user waits for the application to load.)

In short, you’ll want code like this in your Ext.application function:

Notes on configuring Sencha Touch, Nginx, and Play on Mac OS X

These are a few notes on how I set up my Mac OS X development environment for my Radio Pi Mobile application (RPM). The app uses Sencha Touch for the front end, the Scala Play Framework for the backend server, and Nginx to glue them together.

The Play server

The server component of RPM is written using the Scala Play Framework. It runs on port 9000, and I configure it in Nginx like this:

How to kill/disable the Dashboard in Mac OS X 10.9

OS X 10.9 is sucking the life out of my old Mac, a 2008 iMac. Like turning off everything on Star Trek’s Enterprise so you can give power to something else (like the engines or shields), I keep looking for ways to bring a little life back to it. One way I’ve read about is to kill the Dashboard on 10.9.

You can kill the Dashboard with this Mac OSX defaults command, issued in a Mac Terminal window:

The Mac OS X 10.9 "won't shutdown" (slow shutdown) problem

Since upgrading to Mac OS X 10.9 I’ve experienced the problem other people have reported, where their Mac won’t shutdown, or shuts down very slowly. We had a huge lightning storm roll in a few days ago, and when my 2008 iMac didn’t shut down after three minutes of waiting, I finally had to press and hold the button on the back to force it to shut down.

Since then I’m glad to say that the following series of defaults write commands has helped my iMac to shut down much more quickly:

Syndicate content