Dad bod must die

My baby girl is now 1 year old.  Man how time flies.  And during that time man how I’ve let myself go.  Pushing 170 and not having the muscle mass to justify it and my loving wife remarking that “Hey I used to not be able to wrap my hands around your arms but now I totally can!” has forced me to reckon with the inevitable truth that I have become a fatter and weaker shadow of myself.

Today marks the beginning of the journey.

My stats are not impressive but they are as my friend calls it: a starting point

  1. Completely gassed in a game of 21 but still scores enough to be competitive but not win the game.
  2. 4 sets of 10 reps at 110 on the abs machine
  3. 4 sets both sides of 10 reps of 25 lbs of weighted oblique incline lifts.
  4. 6 sets of 135 lbs on the incline bench. Sigh I used to be able to do 210
  5. 4 sets of 4 reps of unweighted dips.  I used to be able to easily do 4 sets of 10

I will take this as a start.  Tomorrow is another day to fight!

Recovering from losing all ssh access Ubuntu 16.04

So I managed to lock myself out of my own computer.

I installed mysecureshell and didn’t realize that it disables shell access, which was my only way to control the machine.

So what did I do?

  1. Recover the root password
    1. Boot into recovery mode
      1. Restart Ubuntu and when the Grub menu comes up
      2. Select Ubuntu “Advanced options”
      3. Then select “Drop to root shell prompt”
    2. Remount /
      mount -rw -o remount /
    3. Reset password
      sudo passwd
    4. Reboot
  2. Re-enable SSH
    1. Now you should be able to ssh remotely as root.  So ssh into the machine as root and provide the password
    2. vi /etc/ssh/sftp_config
    3. under the <Default> section make sure that you have the following
      Shell                   /bin/bash
    4. Restart mysecureshell
      service mysecureshell restart

When mysecureshell disables shell on Ubuntu 16.04…

When I installed mysecureshell to setup sftp for my Ubuntu 16.04 server, it decided to do a lot of other things like…disable ssh access.

I don’t know why they don’t tell you this in screaming caps to begin with.

But a quick look at the Shell directive ( reveals that indeed if you install mysecureshell, it will turn it off by default.

I’m not necessarily opposed to that as a practice but they should make that really obvious as it took me quite some time to figure out what it was that made mysecureshell turn it off in the first place.

I installed mysecureshell via apt-get and configure sftp but then suddenly I got:

$ ssh user@server
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-59-generic x86_64)

 * Documentation:
 * Management:
 * Support:

22 packages can be updated.
0 updates are security updates.

Last login: Thu Feb 2 01:27:02 2017 from
Shell access is disabled !Connection to server closed.

What gives?  I didn’t change SSH access…I added SFTP.  Or did I?  So yes, installing mysecureshell will in fact disable SSH access by default.

Adding the directive

Shell /bin/bash

to the <Default> parent tag will re-enable ssh access.

Set up Ubuntu 16.04 with xfce and VNC server

I was installing vCenter on my ESXi server.  Since this was my first time installing vCenter, I decided that installing via UI was a far better choice than install from the CLI.  But then that meant I needed to get a UI on to the Ubuntu VM I had stood up to do the install from.  So this is what I did.

  1. Install the xfce4 and tightvnc packages.  Xfce is a desktop environment for Unix and Unix-like OS’s.  We will use Xfce, but you could use a different desktop environment if you want.
    sudo apt install xfce4 xfce4-goodies tightvncserver
  2. Validate that the server can be started and create an access password for view and control (you can also setup a separate password for view only)
  3. Configure vncserver to always use Xfce
    The configurations for vncserver are kept in the ~/.vnc/xstartup file.  Out of the box, it looks like this:

    xrdb $HOME/.Xresources
    xsetroot -solid grey
    #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    #x-window-manager &
    # Fix to make GNOME work

    We need to change this so it uses Xfce instead of GNOME.  You could edit the xstartup file directly (not recommended) or make a back up of it and start fresh with:

    xrdb $HOME/.Xresources
    startxfce4 &
  4. Make the startup script executable
    sudo chmod +x ~/.vnc/xstartup
  5. Start VNC server
  6. Test from a Mac OS X machine.
    1. Open an ssh session with port forwarding
      ssh -L 5901: -N -f -l username server_ip_address
    2. Open Screen Sharing
      1. From Safari or from Spotlight, type:
    3. You should see something like this:
  7. Daemonize the VNC Server
    1. Create the service
      sudo vi /etc/systemd/system/vncserver@.service

      Add the following to it.  Replace $user with your username

      Description=Start TightVNC server at startup
      ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
      ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i
      ExecStop=/usr/bin/vncserver -kill :%i
    2. Register the service with the system
      sudo systemctl daemon-reload
      sudo systemctl enable vncserver@1.service
    3. Kill any currently running instances
      vncserver -kill :1
    4. Start the service
      sudo systemctl start vncserver@1

How to write html test reports while keeping console output for ScalaTest

Recently I decided that I wanted to have html reports of my ScalaTest unit tests.  What I didn’t realize was that it would *remove* my console output!

When I first added html reports, I discovered that the required a dependency I wasn’t aware of: pegdown.


Adding html reports was as easy as setting it in the testOptions:

(testOptions in Test) += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/report")

As I mentioned above, this caused the following error:

java.lang.NoClassDefFoundError: org/pegdown/PegDownProcessor

So I added the latest version of PegDown to my build.sbt and set its scope to test:

"org.pegdown" % "pegdown" % "1.6.0" % "test"

But then I discovered that I wasn’t getting any console output for my tests!

The answer is to simply add both to your testOptions sequence:

testOptions in Test ++= Seq(Tests.Argument(TestFrameworks.ScalaTest, "-o"), Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/test-reports"))


How to create an enumeration in Scala with custom values and names

There has been some back and forth about whether Scala devs should even be creating enumerations to begin with.  (

But in the case you wanted to, here’s how to do it:

object MyEnumeration extends Enumeration {
  type MyEnumeration = Value
  val First = Value(1, "Custom Name")
  val Second = Value(2, "Custom Name2")
  val Third = Value(3, "Custom Name3")

Happy Coding!


How to suppress Scalastyle rules

Sometimes Scalastyle will bark at you for reasons that aren’t always constructive.  For example, the magic number rule is generally a good one except when you are trying to create an enumeration with a particular indexing.  Because Scala will automatically 0-base the enumeration entries, if you wanted to 1-base them, you will need to reindex them.  But then this means you need to set them as below:

object MyEnumeration extends Enumeration {
  type MyEnumeration = Value
  val `First` = Value(1)
  val `Second` = Value(2)
  val `Third` = Value(3)

As you can see, the numbers 1, 2, 3 are considered ‘magic numbers’.

So the way to suppress the rule is to a) find the offending rule id (in this case magic.number) then b) make the following change:

object MyEnumeration extends Enumeration {
  // scalastyle:off magic.number
  type MyEnumeration = Value
  val `First` = Value(1)
  val `Second` = Value(2)
  val `Third` = Value(3)
 // scalastyle:on magic.number

Happy coding!

How to set up a git commit message template

  1. Create a template in your user directory. Name the file .gitmessage
    vi ~/.gitmessage
  2. Add the following as your template:
     [commit message title]
     Test Plan:
  3. Then set it as part of your global configuration:
    git config —global commit.template = ~/.gitmessage

Come together

I love the Beatles.  Always have, always will.  Come together is one of the greatest songs ever.

But I don’t like politics.  And according to my friends, since I didn’t vote, technically I have abdicated my right to complain about the situation America is in.

They may be right, they may be wrong.  Who knows.  This will likely be the only post I ever write that is somewhat political in nature and I’m not really sorry for it.

I didn’t vote for a number of reasons, one of which is that while it is my right to vote, I also believe it is equally my right to not vote.  Another reason why I didn’t vote is because I couldn’t bring myself to vote for either candidate.  To my eyes, both candidates were the willing and also unwilling figureheads of a lot of hate and vitriol.  I was really appalled at it all and decided that instead of being forced to pick one side of hate and vitriol over another, I would simply not pick.  Yes, I could have picked the Libertarian party.  But apparently I was not alone in not voting.  Lowest voter turn out in 20 years.  That’s 5 elections.  That’s a lot of time.

I am just tired of the finger pointing and the typecasting and the rhetoric.  But is my silence just silent finger pointing?  I suppose one could look at it that way if they wanted to.  But you have to want to.  I don’t.  I’m just silent because I’m tired of the noise.  Judge me if you want.  And, I’m sure there will be plenty who do.  It’s easy to judge isn’t it?  Its easy to categorize and then categorically dismiss people.  I appreciate what Colbert said about us liking the taste of the poison.  I find that apropos.  We’ve all been a victim of judgement at some point in our lives, some more than others.  And when one has been a victim of that it makes that person want to return in kind.  Eye for an eye after all, right?

Or does it have to be?  Look, I’m not saying that I consistently demonstrate it.  I can feel the struggle within me to give the finger to the kid who was walking across the street that gave me the finger first.  And in that instance, I gave into my want for revenge.  I just wanted to get him back somehow for the injustice he supposedly caused me.  I wanted to turn around and harass him all the way home.  Make him feel fear.  But what does that do?  What did he really do after all?  Gave me the finger.  So what?  What does that matter?  It matters because I feel weak by not defending myself.

What ever happened to grace, forgiveness, and trust?

I will be a willing participant in constructive conversations.  I will be willing to offer the grace to listen to people’s opinions that I find offensive and hope that same grace is offered back.  I don’t know where things went wrong, but I suspect it really doesn’t matter.  In the end, it’s the future we have to come together on, not the past.

This may be a fool’s hope, but I really do hope we start to learn to show each other love and grace.  And I’m willing to start.

Taking the plunge: dropping my shoulder rest

I’ve finally done it. I am tired of fidgeting with my shoulder rest, having it move on me while I play, having it snap off in the middle of playing and most of all of feeling the pain in my neck and the tension in my shoulder after hours of practicing. Okay, let’s be more realistic. Hour of practice.

Nevertheless! It must go.

I’ll keep you posted on updates on how this is going.  In the meantime, I’ll post the videos and postings that were helpful to me.

This isn’t the first time I’ve tried this however. I used to try this back when I was in college. Perhaps I was too set in my ways back then (I was a far better player then than I am now) or perhaps I just didn’t have the right coaching (the reasoning I prefer to claim) But some really helpful youtube videos have cropped up that really helped get a good start on trying to figure out how to do it.

I really should plug this guys website as he has a full lesson set on this particular topic.  I don’t know you dude, but here you go Alex:  May many a violinist in pain come seeking your tutelage.

Below are the free vids he posted on Youtube.



Finally, Alex’s site refers to this page and I also thought it was super helpful:

Here are the videos on Youtube in case that page ever goes away