Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

FLiB is a fast, free internet browser for Android devices. Read on for more details ...

Just like my Jenny Lane Cottage painting, this is another small version of a “faux painting” I recently created from a photo. This one is of a sidewalk in Santa Fe, New Mexico. The complexity of this image was in removing several modern aspects from the original photo, including signs that were on those green columns, and modern automobiles that were in the background. Everything after that is what has become fairly standard work with Gimp for me, including making it look like an oil painting, and dramatically modifying and enhancing the colors.

I use my favorite images as screensavers, and this “hoodie” image of Luke Skywalker from Star Wars Movie #7 is a recent favorite. I found an image online, then worked with it in Gimp to get a decent effect. This Luke Skywalker sketch shows another approach you can take with Gimp.

Luke Skywalker "hoodie"

This is another sketch of Luke Skywalker from whatever the last Star Wars movie was called. I started with this earlier image I created, then converted it to a Gimp “life sketch” by going to Beautify > Beautify > Art > Life Sketch > 100%.

While I’m in the neighborhood, I also created this fake Luke Skywalker “hoodie” oil painting.

Luke Skywalker black and white sketch

As a brief note, today I tried to list the files in my Android application, which was running on a physical Android device — a Nexus 9 — with this adb shell command:

adb shell com.alvinalexander.mybrowser ls /data/data/com.alvinalexander.mybrowser

When I did that, I got an Android/ADB “permission denied” error.

The short story is that a solution to this problem is to run the same command, but with the run-as argument, like this:

On the same day I learned that the Cookie Lady of Denver died, I just read that the Remix OS from Jide is also dead. (In inner circles I’m known as a bit of a cookie monster, so I’m sad that I never met or even knew of the Cookie Lady.)

The best advice I’ve gotten for practicing mindfulness meditation while not sitting in meditation – i.e., in active meditation – is to make something of a game of it. When I wash the dishes it’s like, “How deep can I get while I wash these dishes?” Or when talking to another person, you both put down the cellphones and think, “Okay, we’re both here right now, how much can we focus only on each other and be here in this moment while we talk? How deep can we go?”

I was reminded of this when I read this line recently: “Finally, I got it! The menial tasks I had been assigned to around the temple were meant to be an exercise in meditation. Whatever I was doing, my job was to try to stay in samadhi.”

(That quote comes from the book, The Science of Meditation.)

If you like to watch movies and videos on your tablet, this tablet stand is very cool. The up-and-down rotation is nice and stiff, so you can set it at any angle, and it has rubber cushions in the right places to keep your tablet from sliding or getting damaged. I just bought this a few days ago, and it’s a definite “thumbs up.” It works great with my Nexus 9, and an old iPad 2 (that I only use for music these days).

(I show it next to an apple because the shiny images on Amazon may give you the impression that it’s larger.)

Great tablet stand

Just saw this: “Never let your boss convince you that ‘work ethic’ is working extra hours for free. It’s the same as writing a check to the business owner.”

Technically that’s true, a good observation, and I can’t argue with it.

Conversely, when I got out of college, my wife’s grandfather told me the phrase, “If you do more for what you’re paid to do, you’ll eventually be paid more for what you do.” As an employee, I made a lot of money with his philosophy, rapidly doubling and tripling my income.

Later, as the owner of a small business, I didn’t mind it when employees didn’t work overtime – and we always paid for overtime. I respect people who want to work forty hours a week and have a balanced life. But I also knew that those people would never become partners in our business. I never thought of it as good or bad, just a fact of business life.

I needed to use Gnuplot a little bit over the last few days, mostly to create 2D line charts, and these are my brief notes on how to get started with Gnuplot. If you haven’t used it before, it’s a pretty amazing tool.

Jumping right in ...

Back to top

Installing gnuplot

Use MacPorts or Homebrew to install Gnuplot on Mac OS X systems:

port install gnuplot
brew install gnuplot
Back to top

Sample data files

My examples use the following 2-column and 4-column data files:

Back to top

Every once in a while when something hits you, you really remember it; it stands out in your mind as an “Aha” moment. One of those moments for me was when I saw a particular “Model/View/Controller” (MVC) diagram, and the light bulb went on. This diagram made the MVC pattern very simple, and I’ve never forgotten it.

This is a nice quote about attitude during competition from Garbine Muguruza, who just won the 2017 Women’s Wimbledon tournament:

“I knew she (Venus Williams) was going to make me suffer and fight for it. When I had those set points against me, I’m like, ‘Hey, it's normal. I’m playing Venus here.’ So I just kept fighting. I knew that if I was playing like I was playing during the two weeks, I was going to eventually have an opportunity. So I was calm. If I lose the first set, I still have two more. Let’s not make drama.”

Apple didn’t put a little home in each of its stores, but TechCrunch reports, “Apple has unveiled interactive HomeKit experiences in 46 of its retail stores worldwide ... when you go into Apple’s new retail stores you’ll be able to use the Home app from either an Apple Watch, iPhone or iPad to control devices like the Philips Hue light bulb, the Hunter ceiling fan and many others.” has a good article on what the Colorado Rockies and their pitchers have done to try to pitch successfully at Coors Field in Denver, Colorado, where at nearly 5,200 altitude, the air is 20% thinner than at sea level.

I just noticed that some of the MySQL files on this website had grown very large, so I wanted to be able to list all of the files in the MySQL data directory and sort them by filesize, with the largest files shown at the end of the listing. This ls command did the trick, resulting in the output shown in the image:

ls -Slhr

The -S option is the key, telling the ls command to sort the file listing by size. The -h option tells ls to make the output human readable, and -r tells it to reverse the output, so in this case the largest files are shown at the end of the output.

'ls' command output sorted by filesize

I made a mistake in configuring logrotate on a new Linux system, and almost ran into a problem because of that. Fortunately I saw the problem before it became a BIG problem, but as a result, I decided to add a script to my Linux system to check for large files, typically log files that have grown out of control for one reason or another.

Here then is a simple Linux shell script I named, which searches the filesystem for files that are larger than 1GB in size:

“You can meditate while talking to someone, while washing the dishes, while driving. As your experience grows, you eventually come to a point where you are so present that there is a kind of merging of inside and outside. When that happens, ‘focus’ becomes more than an extremely interesting and pleasant experience; it becomes a transformative experience.”

“Eventually a delicious figure-ground reversal takes place. In the beginning, meditation is something that happens within your day. Eventually, the day becomes something that happens within your meditation.”

~ From “The Science of Enlightenment: How Meditation Works

Table of Contents1 - A “Hello, world” MacOS AppleScript notification2 - AppleScript: Mac notification with a sound3 - How to add a title and subtitle to your notification4 - Running from Scala or Java5 - See also6 - Summary

Summary: This tutorial demonstrates how to fire MacOS system notifications with AppleScript (and Scala or Java).

In this article I assume that you already know at least a little bit about how to use AppleScript, and just want to know how to trigger a MacOS notification. At the end of the tutorial I show how to invoke the AppleScript code using Scala and Java.

“When you turn directly toward your own true nature, you discover that your spirit, your consciousness, is always free. With that discovery comes a wellbeing that manifests as joy.”

~ Jack Kornfield