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

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.”

SI.com 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 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 LargeFileCheck.sh, which searches the filesystem for files that are larger than 1GB in size:

“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

As a brief note today, I was recently looking for all Messages/iMessage files that are stored on my Mac, and I used this shell script to copy all of those files — many of which have the same name — into a directory named tmpdir, giving them all new names during the copy process:

# WARNING: back up your files before running this script.
#          if something is wrong, you may lose them all.
count=1
for i in `cat myfiles`
do
    fname=`basename $i`
    cp $i tmpdir/${count}-${fname}
    count=`expr $count + 1`
done

Curl FAQ: How do I use curl to get the headers from a website URL?

Short answer: Use curl's -I option, like this:

$ curl -I URL

Here's a specific example, including a real URL and results:

In my new book on functional programming in Scala, I’m not a salesman trying to “sell” anyone on functional programming. I prefer to think of myself as a reporter who reports what he has learned. I describe this as the reporter metaphor.

“When people feel connected to others, that brings out their best selves. When people feel disconnected, their worst impulses often come out.”

From an interview with a Zen priest, who also happens to be the director of analytics for Facebook’s News Feed.

“He suffers more than necessary, who suffers before it is necessary.”

~ Seneca (as seen in this tweet)

“I was very happy to hear from you, and that you have such a position in the Research Laboratories. Unfortunately your letter made me unhappy for you seem to be truly sad. It seems that the influence of your teacher has been to give you a false idea of what are worthwhile problems.”

“The worthwhile problems are the ones you can really solve or help solve, the ones you can really contribute something to. A problem is grand in science if it lies before us unsolved and we see some way for us to make some headway into it. I would advise you to take even simpler, or as you say, humbler, problems until you find some you can really solve easily, no matter how trivial. You will get the pleasure of success, and of helping your fellow man, even if it is only to answer a question in the mind of a colleague less able than you. You must not take away from yourself these pleasures because you have some erroneous idea of what is worthwhile.”

The next release of my book on Scala and functional programming will include at least two lessons on ScalaCheck.

“There is always a Netflix to your Blockbuster. Nothing is static. Keep learning, or face the consequences.”

That’s a good quote from this Twitter link. It reminds me of the text in The Heart Sutra that says, “Gate, Gate, Paragate, Parasamgate, Bodhi Svaha.” I read once that the first part of it can be translated as, “Gone, gone, totally gone, totally completely gone.” That reminds me of Blockbuster.

Seeking enlightenment? There is no door. There is no spoon, either. ;)

Seeking enlightenment? There is no door (cartoon)

This is a fun article on Wired: A retiree discovers an elusive math proof, and nobody notices. The mind doesn’t stop working just because you’re retired.

“Live in the now.” From a favorite book by Eckhart Tolle, Guardians of Being.

Guardians of Being: Live in the now

I just ordered The Science of Enlightenment: How Meditation Works by Shinzen Young. I haven’t read it yet, but he’s someone that I trust implicitly, and the preview of the book looks like what I’d expect from him. Like me — but way ahead of me — he’s interested in the science of meditation.

The Science of Enlightenment: How Meditation Works

The sbt-errors-summary plugin looks cool. Here’s a summary from its author:

“A simple plugin that makes the error reporter a bit more concise. I find it useful when doing refactoring: I get a lot of compilation errors, and I waste a lot of time switching between files and looking for line numbers in the error message, when I can immediately see what's wrong when looking at the faulty line.”

SBT errors summary plugin

“Shut your mouth, work extremely hard and be the first one in there, last one to leave, and to lead by example.”

Denver Broncos QB Chad Kelly, talking about the advice he got from his uncle, Hall of Fame QB Jim Kelly.

Here’s a look at the three nen actions, as described in the excellent book, Zen Training. My summary of the three nens goes like this:

  • 1st Nen: Pure sensation/cognition; your bare attention.
  • 2nd Nen: Reflecting upon watch you sense.
  • 3rd Nen: Self-conscious thought of what you have sensed; integrates the impressions of the 1st and 2nd nens into a perception.

Note that the third nen involves referencing “some knowledge that you have already stored up as conceptions (your memories). Then the sound is recognized as that of the noon whistle.”

Zen Training: The three nen actions