Scala, Java, Unix, MacOS tutorials (page 275)

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:

Former Cubs manager Dale Sveum on young players and hitting, from this link.

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:

Well said as usual, Steve.

From this series of examples showing examples of how to make charts and graphs look better.

Brief notes on how I got the xdaliclock screensaver working with xscreensaver on a Raspberry Pi Linux (Debian) system:

I saw part of a Star Trek movie a few nights ago, and was reminded of the Vulcan proverb, “Only Nixon could go to China.”

This is a screenshot of the Mac Things app, a to-do list application. I’ve written a to-do list app with Sencha, so I was looking at other apps to see what features they have, and how they’re organized.

I took this photo of the document, Swift is a lot like Scala.

I don’t remember where I took this picture from, I assume it is the Play Framework docs, but it offers a nice explanation of how a Future works in the Play Framework, especially in regards to blocking the client and server.

Rafael Nadal on playing the French Open at Roland Garros. From this Time interview.

“Email is a wonderful thing for people whose role in life is to be on top of things.” Donald Knuth on why he dropped email in 1990, after 15 years. From this Twitter link.

Here’s a quick Linux Bash if/else example featuring an or clause:

#!/bin/bash

day_of_week=`date +"%a"`

if [ "$day_of_week" == "Sat" ] || [ "$day_of_week" == "Sat" ]; then
  echo 'Weekend!'
else
  echo 'Not weekend!'
fi

The if/or clause is similar to other if/or expressions, and uses the || syntax shown.

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: