Loneliness and a shovel

Writing prompt

Prompt by Cameron Graham, Oct 25 2017, Writing Prompts Group, Facebook

The loneliness was crushing. For six weeks, since the fever had taken her, there had been no one to talk to. The walls would not reply; the looming trees around the cabin had nothing to say; the winds only whipped his words away.

Why did she have to be gone?

He realized she did not have to be gone. Taking up his pick and shovel, he returned to the clearing where he had made her grave.


He dug madly into the earth. The moon watched over him throughout the night and then finally retired. As the sun rose, he carried her frail and withered body back to rest in her favorite chair beside the hearth where she had sat for all the years of his life. It was from that chair she’d taught him all the most important things to know.

“You can’t keep that sweet young girl here, Jimmy,” Mama would say. And then she would wait patiently as he pinched his ears and shook his head and moaned and groaned in a fit of anger. She was always so patient. Always so gentle and wise.

Jimmy picked maggots from her flesh and tossed them into the fire. He fetched her crochet needles and placed them gently in her hands. Laid the roll of yarn in her lap and arranged the blanket snug upon her shoulders.

“I know, Mama,” he said. “Someone might a come lookin’ for that girl.”

He waited for her to answer as she had done so many times before. He waited for her to say what she always said, and what he always hated to hear. That’s right, Jimmy. And you ought not have her in your bed when they come a knockin’.

“But Mama,” he would whine.

And “Now, Jimmy,” she would say, “you know better. You get that girl on outta here now.”

He peeked through the door in his bedroom at the child. In the soft glow of the firelight, he could see that she was still there. Still sleeping. So, he sat on the floor by his mama and waited for her to tell him when it was time.

As the day went on, she said many things, but never a sharp word. She never told him to take the girl on out. She had changed. The fever had softened her heart.

And Jimmy’s heart grew full. His loneliness was gone. He had someone to talk to. Like wise old friends, even the trees around the cabin had much to say. The winds sang like a jubilent chorus in their leaves.

If she can stay, why do the others have to be gone too?

He realized they did not have to be gone. Taking up his pick and shovel, he returned to the clearing where he had buried them.

This page provides a log of how I setup a Liferay development environment using Ubuntu and VMWare Fusion. The idea is to be able to develop for Liferay CE and Liferay DXP although only the CE portion is fully setup so far, with the DXP portion standing by for potential completion in the case of a customer project. I like to snapshot my VMs frequently so that I can roll back at any point, so you will see indicators everywhere that I’ve taken a snapshot.

This also includes an acid-test, which is itself a mini-tutorial on how to create a RESTful web service endpoint in Liferay.

Continue Reading…

How to install Oracle Java 8 on Ubuntu (in may case, Ubuntu 16.04 LTS)

Procedure to install Oracle Java 8 on Ubuntu

You probably want to confirm first that a version of Java is not already installed. If so, you can do that with the java -version command as shown below…

developer@ubuntu:~$ java -version
The program 'java' can be found in the following packages:
 * default-jre
 * gcj-5-jre-headless
 * openjdk-8-jre-headless
 * gcj-4.8-jre-headless
 * gcj-4.9-jre-headless
 * openjdk-9-jre-headless
Try: sudo apt install <selected package>

Change to root…

sudo su -
(enter password)
apt-get install software-properties-common
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer

Check if Java is successfully installed

java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

Procedure to uninstall

If, for some reason, you want to undo this operation and uninstall Oracle Java 8 from Ubuntu, you can then execute the following:

sudo su -
sudo apt-get remove oracle-java8-installer


Quotes for writers

A list of quotes for writers – most often from writers, most often inspiring.

The first sentence can’t be written until the final sentence is written.

Joyce Carol Oates

Creativity and ego cannot go together. If you free yourself from the comparing and jealous mind, your creativity opens up endlessly.

Some Asian dude on Chef’s Table, Season 3, Episode 1

Editing while writing is a terrible idea. Reviewing while writing is a terrible idea. Making retrospective story changes while writing is a terrible idea. There are cases where you might feel that you have to do some of those things, but you’d be better off if you didn’t. Just write the thing. That’s the single most valuable lesson I learned. Get the words out, almost without regard to what those words are. Keep going, at all costs.

Some Asian dude on Chef’s Table, Season 3, Episode 1

Habit is the bed of creativity. Tuck yourself in.

Steven King

Time constraints sharpen the mind.

F. Scott Fitzgerald

Inspiration is everywhere. Carry a notebook.

Victor Hugo

The difference between the almost right word and the right word is the difference between the lightning bug and the lightening.

Mark Twain

Serious writers write, inspired or not. Over time they discover that routine is a better friend than inspiration.

Ralph Keyes

The two most engaging powers of a writer are to make new things familiar and familiar things new.


It is the function of art to renew our perception. What we are familiar with we cease to see. The writer shakes up the familiar scene, and, as if by magic, we see a new meaning in it.

Anais Nin

It’s hell writing and it’s hell not writing. The only tolerable state is having just written.

Robert Hass

Good dialog illuminates what people are not saying.

Robert Towne

My presecription for writer’s block is to face the fact there is no such thing. It’s an invented condition, a literary version of the judicial ‘abuse excuse’. Writing well is difficult, but one can always write something. And then, with a lot of work, make it better. It’s a question of having enough will and ambition, not of hoping to evade this mysterious hysteria people are always talking about.

Thomas Mallon

One of the biggest, and possibly the biggest, obstacle to becoming a writer is learning to live with the fact that the wonderful story in your head is infinitely better, truer, more moving, more fascinating, more perceptive, than anything you’re going to get down on paper.

Robin McKinley

Be an unstoppable force. Write with an imaginary machete strapped to your thigh. This is not a wishy-washy, polite, drinking-tea-with-your-pinkie-sticking-out stuff. It’s who you want to be, your most powerful self. Write your books. Finish them, then make them better. Find the way. No one will make this dream come true for you but you.

Laini Taylor

If you intend to write as truthfully as you can, your days as a member of polite society are numbered.

Steven King

When in doubt, make trouble for your character. Don’t let her stand on the edge of the pool, dipping her toe. Come up behind her and give her a good hard shove. That’s my advice to you now. Make trouble for your character. In life, we try to avoid trouble. We chew on our choices endlessly. We go to shrinks., we talk to our friends. In fiction, this is deadly. Protagonists need to screw up, act impulsively, have enemies, get into trouble.

Janet Fitch

The first draft is just you telling yourself the story.

Terry Pratchet

You don’t really understand an antagonist until you understand why he’s a protagonist in his own version of the world.

John Rogers

Stopping a piece of work just because it’s hard is a bad idea. Sometimes you have to go on when you don’t feel like it and sometimes you’re doing good work when it feels like all you’re managing to do is shovel shit from a sitting position.

Steven King

A good writer is always a people watcher.

Judy Blume

If you don’t see the book you want on the shelf, write it.

Beverly Cleary

Docker cheat sheet

A cheat sheet of commonly used docker commands.

List all containers

docker ps --all or docker ps -a

Remove all containers and images

Here are the two Docker commands you can run in sequence to completely remove (delete) all of your containers and images.

To remove all containers:

docker rm $(docker ps -a -q)

To remove all images:

docker rmi $(docker images -q)

Warning: Executing the commands shown above will destroy all your containers and images; it will not be possible to restore them.

List images

docker images

Remove an image

docker rmi <image-id>

Warning: Executing the commands shown above will destroy the given image; it will not be possible to restore it.

Container shell access

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your container:

docker exec -it <container-name> bash

If the container does not have bash installed you can use the following as an alternative:

docker exec -it <container-name> sh

Type exit to exit out of the container and return to your host shell.

List ports

The port command can be used to display the ports that are exposed by a given container.

docker port <container-name>

List processes

To see the processes running in a container, you can use the top command (similar to running the Linux top command):

docker top <container-name>

View container log file

docker logs <container-name>

RDF syntax examples

RDF can be expressed in a variety of different serialization formats. It can also be used inline with HTML. Following is an example of the most widely used of these formats so that you can compare them at a glance.


An XML-based syntax for RDF graphs that was the first standard format for serializing RDF.

<?xml version="1.0" encoding="utf-8"?>
  <gr:Location rdf:about="http://www.acme.com/#store">
    <gr:name>Hepp's Happy Burger Restaurant</gr:name>
        <gr:hasOpeningHoursDayOfWeek rdf:resource="http://purl.org/goodrelations/v1#Wednesday"/>
        <gr:hasOpeningHoursDayOfWeek rdf:resource="http://purl.org/goodrelations/v1#Monday"/>
        <gr:hasOpeningHoursDayOfWeek rdf:resource="http://purl.org/goodrelations/v1#Tuesday"/>
        <gr:hasOpeningHoursDayOfWeek rdf:resource="http://purl.org/goodrelations/v1#Thursday"/>
        <gr:hasOpeningHoursDayOfWeek rdf:resource="http://purl.org/goodrelations/v1#Friday"/>

See also: RDF 1.1 XML Syntax


A compact, human-friendly format.

@prefix gr: <http://purl.org/goodrelations/v1#> .
  a gr:Location ;
  gr:name "Hepp's Happy Burger Restaurant" ;
  gr:hasOpeningHoursSpecification [
    a gr:OpeningHoursSpecification ;
    gr:opens "08:00:00" ;
    gr:closes "20:00:00" ;
    gr:hasOpeningHoursDayOfWeek gr:Wednesday, gr:Monday, gr:Tuesday, gr:Thursday, gr:Friday
  ] .

See also: Turtle – Terse RDF Triple Language


A very simple, easy-to-parse, line-based format that is not as compact as Turtle.

<http://www.acme.com/#store> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/goodrelations/v1#Location> .
<http://www.acme.com/#store> <http://purl.org/goodrelations/v1#hasOpeningHoursSpecification> _:b0 .
<http://www.acme.com/#store> <http://purl.org/goodrelations/v1#name> "Hepp's Happy Burger Restaurant" .
_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/goodrelations/v1#OpeningHoursSpecification> .
_:b0 <http://purl.org/goodrelations/v1#opens> "08:00:00" .
_:b0 <http://purl.org/goodrelations/v1#closes> "20:00:00" .
_:b0 <http://purl.org/goodrelations/v1#hasOpeningHoursDayOfWeek> <http://purl.org/goodrelations/v1#Wednesday> .
_:b0 <http://purl.org/goodrelations/v1#hasOpeningHoursDayOfWeek> <http://purl.org/goodrelations/v1#Thursday> .
_:b0 <http://purl.org/goodrelations/v1#hasOpeningHoursDayOfWeek> <http://purl.org/goodrelations/v1#Friday> .
_:b0 <http://purl.org/goodrelations/v1#hasOpeningHoursDayOfWeek> <http://purl.org/goodrelations/v1#Tuesday> .
_:b0 <http://purl.org/goodrelations/v1#hasOpeningHoursDayOfWeek> <http://purl.org/goodrelations/v1#Monday> .

See also: RDF 1.1 N-Triples

N3 (or Notation3)

A non-standard serialization that is very similar to Turtle, but has some additional features, such as the ability to define inference rules.

@prefix gr: <http://purl.org/goodrelations/v1#> .
<http://www.acme.com/#store> a gr:Location;
    gr:hasOpeningHoursSpecification [ a gr:OpeningHoursSpecification;
            gr:opens "08:00:00";
            gr:closes "20:00:00";
            gr:hasOpeningHoursDayOfWeek gr:Friday,
                gr:Wednesday ];
    gr:name "Hepp's Happy Burger Restaurant" .

See also: Notation3 (N3): A readable RDF syntax


a JSON-based serialization (for Linked Data).

  "@context": {
    "gr": "http://purl.org/goodrelations/v1#"
  "@id": "http://www.acme.com/#store",
  "@type": "gr:Location",
  "gr:hasOpeningHoursSpecification": {
    "@type": "gr:OpeningHoursSpecification",
    "gr:closes": "20:00:00",
    "gr:hasOpeningHoursDayOfWeek": [
        "@id": "gr:Thursday"
        "@id": "gr:Wednesday"
        "@id": "gr:Friday"
        "@id": "gr:Monday"
        "@id": "gr:Tuesday"
    "gr:opens": "08:00:00"
  "gr:name": "Hepp's Happy Burger Restaurant"

See also: JSON-LD 1.0


Not really an RDF syntax, but rather – a compatible format. “RDFa is an extension to HTML5 that helps you markup things like People, Places, Events, Recipes and Reviews. Search Engines and Web Services use this markup to generate better search listings and give you better visibility on the Web, so that people can find your website more easily.” – rdfa.info

<div xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   <div about="http://www.acme.com/#store" typeof="gr:Location">
      <div rel="gr:hasOpeningHoursSpecification">
         <div typeof="gr:OpeningHoursSpecification">
            <div property="gr:closes" content="20:00:00"/>
            <div rel="gr:hasOpeningHoursDayOfWeek"
            <div rel="gr:hasOpeningHoursDayOfWeek"
            <div rel="gr:hasOpeningHoursDayOfWeek"
            <div rel="gr:hasOpeningHoursDayOfWeek"
            <div rel="gr:hasOpeningHoursDayOfWeek"
            <div property="gr:opens" content="08:00:00"/>
      <div property="gr:name" content="Hepp's Happy Burger Restaurant"/>

See also: RDFa


Also not really an RDF syntax, but a compatible format. This mechanism allows machine-readable data to be embedded in HTML documents in an easy-to-write manner, with an unambiguous parsing model.

<div itemscope itemtype="http://purl.org/goodrelations/v1#Location" itemid="http://www.acme.com/#store">
  <span itemprop="name">Hepp's Happy Burger Restaurant</span>
  <div itemprop="hasOpeningHoursSpecification" itemscope
Opening hours: Mo-Fri,
     <link itemprop="hasOpeningHoursDayOfWeek"
           href="http://purl.org/goodrelations/v1#Monday" />
     <link itemprop="hasOpeningHoursDayOfWeek"
           href="http://purl.org/goodrelations/v1#Tuesday" />
     <link itemprop="hasOpeningHoursDayOfWeek"
           href="http://purl.org/goodrelations/v1#Wednesday" />
     <link itemprop="hasOpeningHoursDayOfWeek"
           href="http://purl.org/goodrelations/v1#Thursday" />
     <link itemprop="hasOpeningHoursDayOfWeek"
           href="http://purl.org/goodrelations/v1#Friday" />
     <meta itemprop="opens" content="08:00:00">8:00 a.m. -
     <meta itemprop="closes" content="20:00:00">8:00 p.m.

See also: HTML Microdata

RDF Converter Services Online

There’s a few decent RDF converter services that you can use online:

SPARQL examples – filter

Return items with recorded date less than given date

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX web: <http://base22.com/ont/web#>
    ?subject dcterms:title ?title.
    ?subject dcterms:abstract ?abstract.
    ?subject web:publishDate ?publishDate.
    FILTER (?publishDate < "2016-09-28T19:19:02.982Z"^^xsd:dateTime)


SPARQL examples – limit

Limit the number of results returned

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bc: <http://www.base22.com/ontologies/2010/5/bc.owl#>

  ?subject bc:hasEmployer <http://www.base22.com/ontologies/2010/5/my-contacts.owl#IBM> .
           ?subject bc:hasBusinessEmail ?email .

The LIMIT keyword is used after the WHERE clause, followed by a numerical value. In this case, of course, only 5 results are returned.

  • LIMIT is a solution modifier that limits the number of rows returned from a query. SPARQL has two other solution modifiers:
    • ORDER BY for sorting query solutions on the value of one or more variables
    • OFFSET, used in conjunction with LIMIT and ORDER BY to take a slice of a sorted solution set (e.g. for paging)

Find the person entries in Tim Berners-Lee’s FOAF file that do not contain a URL for the person’s FOAF file. Try this on ARQ.

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?name
FROM <http://www.w3.org/People/Berners-Lee/card>
  ?person a foaf:Person ; foaf:name ?name .
  MINUS { ?person rdfs:seeAlso ?url }


SPARQL examples – paging

Retrieve the second page of names and emails of people in Tim Berners-Lee’s FOAF file, given that each page has 10 people. Try this on ARQ.

PREFIX foaf:  <http://xmlns.com/foaf/0.1/>

SELECT ?name ?email
FROM <http://www.w3.org/People/Berners-Lee/card>
    {      SELECT DISTINCT ?person ?name WHERE {
        ?person foaf:name ?name
      } ORDER BY ?name LIMIT 10 OFFSET 10    }
    OPTIONAL { ?person foaf:mbox ?email }