Rework

Rework (Fried, 2010) can be summed up with the KISS Principle, “keep it simple stupid.”

It’s often harder to make things simple than it is to make things complex. I suppose this is just human nature. There is probably a good evolutionary reason for this, but that is reading for another day.

The most important message in Rework is to start. Start something you’re passionate about. Solving your own problems makes it easy to fall in love with what you’re doing. That feeds inspiration and inspiration affords great work.

You need less than you think - embrace constraints. Work less; work smarter. Make decisions and move on. Focus on what’s important.

To build anything sustainable takes time, so grow slowly. But most importantly, start.

Rework is such a great, short little book that I’d recommend it to everyone who is thinking about starting a business or is already running one.

Personal MBA

I’ve always found the whole idea of a master’s degree in business admisinistration interesting. It’s one of those things that I’d like to have, but only if the price is right. I certainly can’t justify spending over a hundred grand to obtain one from a reputable university.

What I REALLY want is the knowledge. I can’t think of very many reasons to have a certificate saying that I went through a few years of school to obtain knowledge that I could have largely gotten from the public library. So I’ve taken the DIY approach - the Personal MBA.

The Personal MBA is a list of good business books that cover the topics that you would learn in business school. That’s it. Just a list of books. But, it’s a well curated list of books with at least yearly updates since its inception.

For the past few years I’ve been reading a book from the list here and there, but never seriously committed to finishing the “degree.” The past few months I’ve gotten a bit more serious about reading more and more from the list. Now I need a place to put my notes, and that place is here.

Creating and rotating log files from piped input

Say you have an application that sends logs to STDOUT and you want to capture that stream, log it to a file and rotate the files based on time and/or size. rotatelogs is a small utility bundled with Apache’s HTTPD that can do it for you.

I wrote a small sample program as a test, one that outputs a bunch of Lorem ipsum text to STDOUT (lorem):

package main

import (
	"fmt"
	"math/rand"
	"time"

	//
	"github.com/drhodes/golorem"
)

func main() {
	for {
		fmt.Println(lorem.Paragraph(3, 8))
		time.Sleep(time.Duration(rand.Intn(1000)) * time.Millisecond)
	}
}

This prints a Lorem ipsum paragraph between 3 and 8 sentences once every (pseudo) random 0 to 1000 milliseconds.

Once built, you can do this:

$ lorem | rotatelogs -l "lorem-%Y%m%d-%H%M%S.log" 86400 5M

This sends the output of lorem to a date/time based log file like lorem-20150406-120400.log and rotates the log every night at midnight and/or after the content reaches 5 megabytes in size.

The rotatelogs manfile includes other useful examples I recommend reading through.

What's the best adjustable height standing desk?

The best adjustable height standing desk is the MultiTable ModTable.

MultiTable ModTable


Who needs an eletronic motor in a desk? Seriously. I use to have an electronic adjustable height desk from IKEA. It was nice, and unfortunately they don’t make them anymore, but I’d rather have the ModTable anyway. It’s not that big of a deal to adjust the height with a crank. It takes maybe 20 seconds to go from sitting to standing, or from standing to sitting. And, you don’t need to power the thing.

Every office worker should have an adjustable desk just as every office worker should have an adjustable chair. Regular movement is important too - just as important for the body as it is for the mind. But that’s a topic for another blog entirely.

Starting a food forest

The moment I learned about permaculture and what is possible, I was hooked.

I’ve never been incredibly interested in gardening for aesthetics alone. It has never drawn me in enough for me to take action. I know it can be a peaceful process - a meditation - but I’ve always had other things to do (like running). So when I discovered a whole system of design for plantings to work together and feed off each others inputs and outputs, I was hooked. It plays directly into other areas of my life I’ve been interested in for some time - namely, the design of software.

About a year after my wife and I bought our first house, I learned about permaculture’s existence. I took a year to casually learn more and observe as much as possible at our property. Where the sun shines, the warm and cool areas (microclimates) at various times of the day and in each season, which direction the winds typically blow, where the rain runoff is directed, etc. And then I was ready to start.


For the past two months I have been sheet mulching in patches. Each of these patches is where I plan to plant either a tree or a shrub. The first row of patches is situated on contour, and I will dig a swale on the uphill side of the patches so that the trees will stay well watered.

Here is how the back yard looked before I started:

(picture coming soon)

And here is how it looks now:

(picture coming soon)

Ideally I would have startd this process of improving the soil the moment we moved in. But I didn’t know what I was doing. In fact, the first fall, I dutifully raked and bagged up all the leaves that fell from the trees and set them out on the curb for trash because that’s just what everybody does. What a colossal waste of time and effort. And the plants and trees - I deprived them of large amounts of organic matter.

The next year was completely different. By then I had started a few compost piles. I still cleaned up a lot of the leaves because I was trying to keep the grass alive, but I didn’t bag anything up. I simply put everything in the compost pile. Better, but definitely not the best.

And this past year has been completely different. For the most part, I just left the leaves alone. I have a small area of grass I’d like to keep for a play area, but other than that, 4000 sq. ft. of lawn is being converted into a food forest.

To do this, I needed much more material than what the trees on my property were going to give me - especially since most of them are live oaks. I had tried for months getting a local arborist to drop a dumptruck full of wood chips on my property. It was like pulling teeth to get this arranged. And then one day, they arrive and a dumptruck full from a day of tree trimming was dumped on my driveway.

I don’t even remember how many wheelbarrow-loads of wood chips, raked up leaves and sticks I moved to the backyard, but it was a lot. The following weekend I went around the neighborhood and picked up 70-80 bags of leaves that were left out for trash. A few days later I had 5 cu. yds. of compost delivered. And after months of keeping cardboard boxes from various shipments, I was ready to make the patches.


For each patch I first wet the ground. Then I covered the ground with cardboard in an 8x8 ft. patch. I wet the cardboard then added a layer of 2-3 inches of compost. On top of the compost I put a layer of 2-3 inches of mulched leaves. Then I wet them down, and added the final layer of 2-3 inches of wood chips.

Ideally I would have used more compost and more leaves, but I had a lot of patches to do (~22 in total) and only so much material to get started. It was more important for me to get all the patches in rather than worry about the ideal amount of material to use. We shall see if 6-8 inches is enough to do a sufficient job.

Next up is actually buying the trees and shrubs for the patches. After that, I’ll be digging the swale and filling with all the extra sticks that I pulled out of the wood chip collection. Also, I’ll be covering the rest of the grass with cardboard and hopefully a few more loads of wood chips from a local arborist. I really need those wood chips! Then, I’ll be ordering a lot of seeds and plants to support the trees and shrubs - making guilds so that everything can better take care of itself rather than me having to do all the work.

That’s the plan and theory behind this madness anyway. I’m excited to continue observing how well (or not so well) things turn out.

On athletic endeavours thus far

A little over five years ago I was at a friend’s Christmas party and heard about a guy there who had just completed a race at the Sears Tower (now Willis Tower), climbing up the stairwell all the way to the top. It was one of the most intriguing things ever. I had to talk to him. I had to learn more.

The reason it was so intriguing may require a bit of an explanation. I had just gotten into running and getting fitter in general. I was entering races seemingly left and right just for the fun of it all. Newness. But, a few weeks prior I ran the YMCA Turkey Trot in Dallas where I ran too many miles too soon for my newfound running body. I developed a really bad case of tendonitis that took a few months to recover from because I simply didn’t know how much was too much.

I eventually made my way over to the guy and started talking with him. Very interesting. Triathlete that has been doing stair races in the off-season. He told me a little bit about the race, also mentioning that there was one coming up in the next month. Luckily climbing stairs didn’t bother the tendonitis injury and I was up for a challenge. I knew I had to sign up the moment I got home.

I spent the next few weeks alternating between dangling my legs in an ice-cold pool, working out with P90X DVDs and attending intense workout classes at my residence. The lofts my wife and I were living at the time provided a great place to train with the workout classes and its six-floor parking garage. I made use of both the stairwells and the garage itsef for the next month.

The month passed by quickly and I was as ready as I was going to be for my first stair climb. The day came; my first Big D Climb. 52 stories of a thorough ass-kicking. I finished in 11 minutes, 43 seconds and felt like I was going to throw up while being treated with a beautiful view of Dallas for my effort. (I was able to enjoy the view - a few minutes after finishing I was fine.)


Stair climbing is easily the hardest thing I’ve ever done. Not that I’m super experienced in doing a lot of physically demanding activities, but completing a stair climb as fast as possible is terribly grueling. And to the right type of person, it’s also incredibly fun.

I’ve learned a lot about myself in the past 5-6 years of athletic endeavors. A good physical challenge is something I now live for. Since the day I discovered my love of running clad in a pair of hideous Vibram Five-Fingers, I’ve completed quite a few events. Stair climbs, 5ks, 10ks, road races, trail races, mud races, a few trail ultra-marathons up to 50 miles and one road marathon. And this isn’t a brag - at least that’s not how I intend it.

I grew up with seasonal allergies that always brought on an asthma attack. At least once, usually twice a year I was down, incapable of doing much of anything for one to two weeks. I never got into sports because my asthma always seemed to get in the way - or at least that’s what I thought would happen according to my regular visits with various doctors. But, it was bullshit. The best thing I could have done was to get regular exercise - to push limits safely. It took me 20 or so years to figure that out.

My point is that if you haven’t experienced the awesomeness that is being physically active in something you love to do or haven’t yet discovered, get out there. Try things. The Earth is a playground. Treat it with respect. Go slow. Have fun. If I can do it, you probably can too.


While at the Big D Climb, I learned about another race coming up in Dallas in a month. Again, I was signed up for the race right the moment I got home. The ALA Climb - American Lung Association; oh, that’s something personal (remember: asthma).

With the first race under my belt, I knew a bit more about what to expect. I ramped up my training specific to stairclimbing. I hit the spin bike more often, did parking garage workouts and hit any stairwell I could find. The next race came and I finished in under 10 minutes. 9 minutes, 44 seconds to be exact. What an improvement a little experience and a month of specific training makes. That placed me 39th in a field of over 500. Not bad!


A year went by. Many more 5ks, 10ks, an ultra-marathon, another 8 mile Turkey Trot and a marathon, and I was ready for round two of the Big D Climb. This time, I had done some race-specific training and was ready for a killer time.

While I thought I might have a chance at finishing around 7:30, it was hopeful at best. The race kicked my ass again. I finished in just over 8 minutes, placing #10 in a field of over 800 participants. What an improvement.

A week later I went on to finish a 50 mile race. Note that I said finish - not compete, or really even “race” - just finish. It was one of the coolest things I’ve ever done, and I hope to get back to long trail runs within the next couple of years.

Wait, get back to it? Yes, because about two months later my wife gave birth to our daughter and as everybody says, kids change things.

In 2013, my time slowed at the Big D Climb. It was never officially recorded because the timing company screwed my timing up (amongst others), but it was a little over 10 minutes.

My time slowed again to 10:46 in 2014. I kept on saying that I was going to get back to training to be competitive again. But after having a kid and buying a house, I was focused on the minimal amount of training possible. But the main problem is that I’ve never had any sort of method to my training. I’ve always just done whatever I’ve felt like because it’s all about having fun anyway. Well, this doesn’t work so well when you’re focusing on a minimal training method because you absolutely MUST be consistent. I wasn’t. It showed.

Things are still the same this year as well. I finished in 11:12 last Saturday on my fifth Big D Climb event. This time at a new building, but still close to the same height. I’m getting slower and slower, close to my first climb results while I should be getting faster and faster. Oops. Normally it wouldn’t matter, but I’m not having fun being slow in stair climbing. I wanna be fast!


I’m finally ready to change things up. I’m in a good routine of going to the gym. I have a good place to accomplish effective workouts. I’ve made a real effort over the last week to develop a stair-climbing specific training program for myself. One that is sustainable and will bring results.

The last week went extremely well. I did a mixture of strength training with the barbell (upper and lower body), two sessions of 400m repeats on the erg, hill repeats on the treadmill, a little bit of work on the stepmill, a long slow run at a trail at the lake, and even some kettlebell work at home.

Now for this week. More strength training. More erg. More spin bike. More stepmill and more trail running. I’ve developed my programming using energy system training methods recommended by Joel Jamieson in his book entitled Ultimate MMA Conditioning. I’m interested to see what happens when following a structured program instead of just going out to the trail a few times a week and doing whatever I feel like for that day.

Next week there is another race, the ALA Climb. I’m not sure if I’m doing it or not due to the price. There is another a week later that is more intriguing, simply because I haven’t done it before, it requires some travel and the race is shorter and plays more to my strengths.

I’ll make a decision soon. I’m just happy to be back to harder aerobic training. Makes me feel goooood.

Now there’s a cat climbing on top of me and I must get back to work anyway. Have fun out there!

What's the best lawn mower?

The best lawn mower is the Fiskars Staysharp Max 18” Reel Mower.

Fiskars Reel Mower


A reel mower? You’ve got to be kidding! But yes, the Fiskars Reel Mower is the best lawn mower for the average home lawn. Why? It’s quiet, easy to push, requires little maintenance, doesn’t need gas so no gas smell and doesn’t kick up a bunch of dust so it’s much friendlier to those with allergies. I really don’t understand why the majority of Americans use gas mowers. I just don’t get it.

There are a few downsides. They have trouble with long spindly weeds. Also, they don’t mulch. But these issues aren’t dealbreakers: the weeds indicate poor soil so those areas need to be fixed and grass mowed higher. And the mulching? That is better left to another tool anyway: a blower with mulching capabilities.

So if you haven’t tried a modern reel mower lately, I highly recommend it. If not the Fiskars, maybe the Scott’s Classic. It’s not as easy to push and is a little harder to adjust, but it does a great job too.

What's the best flashlight?

The best flashlight is the FourSevens Quark Turbo QB2A.

FourSevens QB2A Flashlight


I chose this flashlight because everybody should have a powerful, general use flashlight powered by common AA batteries at home in case of emergency. Whether you live in a house or a high-rise apartment building, a dependable flashlight could literally help save your life. They’re also just really handy - a tool you never realized you’d use so much until you have a good one.

FourSevens offers many other flashlights for many different uses. All are good. Pick the best for your needs.

What's the best cookware set?

The best kitchen cookware set is the Cuisineart MCP-12N MultiClad Pro Stainless Steel 12-Piece Cookware Set.

Cuisineart MCP-12N


I bet you thought I was going to give it to an All-Clad cookware set, right? Well, I would have a few years ago. But recently I started looking around to see if it was worth upgrading my cookware and if there was anything as good as or better than All-Clad for a lower price. And then I found a comprehensive write-up at centurylife.org entitled Is All-Clad worth it?. If you are in the market for cookware, this article is definitely worth a read.

In short, buy the Cuisineart if you want to save some money and don’t care about the All-Clad name. It’s the same thing, made the same way. Otherwise, buy All-Clad.

What's the best pocket knife?

The best pocket knife is the Spyderco Native.

Spyderco Native Pocket Knife


This is a solid, well-designed little knife that I typically carry around with me in my laptop bag. It comes in handy. It does the job. It doesn’t fail. The steel keeps an edge well and is easily sharpened. No complaints.

What's the best air bike?

The best air bike, or fan bike, is the Assault Air Bike. Yes, it has surpassed the Schwinn Airdyne.

Assault Air Bike


I absolutely love an efficient, close to puke-inducing cardio workout. I could replace the word “love” with “hate” in the previous sentence and it’d be just as true. The old-school fan bike is a great way to achieve an effective cardio workout in a short amount of time.

So yes, you could grab a vintage bike from Craigslist (and that would great, honestly), or you could go for the best with the Assault Air Bike.

Whatever the case, the most important thing is getting an effective cardio workout a few times a week. If you have (or just want) to do it inside, the fan bike is a great way to do it, and the Assault Air Bike is the best fan bike that exists.

More resources for effective cardio machines:

What's the best multi-tool?

The best multi-tool is the Victorinox SwissTool™ Spirit. Don’t believe me? Read the reviews.

Victorinox SwissTool™ Spirit


I bought mine several years ago with a serrated blade. It’s as beautiful as it is functional. I keep it in my laptop bag in its leather pouch and use it almost every day. Highly, highly recommended.

What do I use it for? Opening cardboard boxes, slicing through plastic packaging, tightening screws, framing photos, scratching my name into bathroom stalls (j/k), removing stray threads, cutting wires, stripping wires, tightening bolts, etc. Essentially I try to use this thing as much as I can because I’d rather use one tool even if it’s not the best for the particular task then go to the garage to get a bunch of specific use tools. Unless it’s a bigger job of course.

There is another beast out there worth recommending, and is definitely more well-known and probably more readily available too, and that’s the Leatherman Charge TTi. It’s also more expensive, and probably more than the average person needs. But it IS a beast.

What's the best drink?

The best drink is water.

Water in a glass


Did you really have to ask? Oh, you didn’t? Well, your un-vocalized suspicions have now been confirmed.

What's the best beer?

Belgium tripels. Specifically, the Tripel from St. Bernardus Brewery.


I’m not the only one that has high praise of the St. Bernardus Tripel. Beeradvocate and Ratebeer both give the beer very high ratings. And they’re all correct; it’s delicious.

What's the best blender?

The best blender is the Vitamix 5200. If you’re in the market for a blender, GET IT NOW.

Vitamix 5200 Standard Blender


“Wait a minute,” you might be saying. “That blender is hundreds of dollars! You’re crazy!” Yes. And I’ll just tell you over and over again that it’s worth every single penny. And you’ll agree with me.

And then you might say, “but I don’t even use a blender that much.” And I’d tell you over and over again that you should because it’s an amazing tool for blending up leafy greens and other fruits and vegetables which are absolutely wonderful for you and if you care about your health you’ll want to eat a lot of them. Phew, run-on sentences.

If you’re looking to save a few bucks, you can readily get a certified reconditioned standard model direct from Vitamix. I highly recommend the reconditioned models - I bought one myself and have used the thing 2-3 times a day for nearly six years.

There is one more blender I should probably mention because so many people love it, and it’s the Blendtec Total Blender. I really don’t know much about it because I’d rather just have a sweet motor without a bunch of buttons to do my blending. But it’s a worthy contender as well, so there ya go.

What’s the best text editor?

The best text editor is Emacs :-P

Emacs


Ohhh text editors. Many wars have been started and never won over text editor preference. As for myself, I don’t actually use Emacs. But as many people have expressed with convincing authority all over the internets, it’s the best text editor ever made.

That said, I prefer Vim. Maybe it’s just familiarity. Maybe it’s because I’ve never become comfortable contorting my hands in the manner Emacs requires. I don’t know. What I do know is that I’m becoming more and more interested in using Emacs with Evil, an extensible vi layer for Emacs. Oh, and the lure of Org mode plays a big part too.

Vim has been a pain in the ass in some respects lately. It’s mainly due to my configuration being a bit overloaded with plugins (and I love plugins). So, I’ve stopped using it unless I’m within a terminal in a remote connection. In the meantime I’ve been using Sublime Text. It’s a fantastic editor with great (and sane) plugin support.

Emacs, Vim and Sublime Text are all available in various forms for OS X, Linux and Windows. I’ve also included a few other great operating system specific choices below.

OS X

Windows

Linux

What's the best blog?

The best blog is just a jot.

Seriously. Did you expect anything better from me? By the way, hi!

Wiki on BeagleBone Black

I just picked up a Rev 4 BeagleBone Black from Micro Center for ~$40 with the intent of using it as a wiki server for both my own personal notes and those for my home and family. While the BeagleBone comes with an embedded 4GB chip pre-installed with Debian, I need more space to store my notes, so I also picked up a 16GB micro SD card.

Since the BeagleBone Black (BBB) is more powerful than the Raspberry Pi, I suppose you could use pretty much any wiki software that runs on the ARM architecture with reasonable performance. But, I wrote software specifically for this purpose: a Git-backed Markdown-based wiki in a single executable - Goiki. This is what I’ll be running.

First, I connected the BBB to my network using the supplied RJ45 jack on the board. To power it up, I used the supplied USB cable and connected it to an open USB port on my laptop.

To find the IP address, I logged-in to my router to see what changed on my DHCP server. Ah, there it is! It shows up with a hostname of “beaglebone”. I’ll just use that.

ssh root@beaglebone

There is no password associated with the root account. This will need to change. I used passwd to update the password.

I like to tackle hardware issues first so I then set-up the microSD card to act as storage for my notes. Debian is set-up to auto-mount the micro SD card, so I was able to use df -h to see what loaded.

The filesystem that was set-up on the card wasn’t appropriate for my needs (well, I suppose it was technically, but I wanted to change it anyway). So, I used fdisk to remove the current partitions and re-created one big partition. I then used mkfs.ext4 to make an ext4 filesystem on that partition. Then it was ready to go.

To make sure the partition is always available, a mount-point for the device needed to be set-up. The partition is located at /dev/mmcblk1p1 and I mounted it at /media/microsd (mkdir /media/microsd first). Below is the entry I used in /etc/fstab to set-up the mount point:

/dev/mmcblk1p1      /media/microsd  ext4    defaults    0   2

Now the storage device automatically mounts upon boot-up to /media/microsd. My Goiki data directories were then set-up on the device.

mkdir -p /media/microsd/goikipersonal/data
mkdir -p /media/microsd/goikifamily/data

Install Goiki

Goiki is a Git-based Markdown-powered wiki written in Golang. I wrote it specifically for the purpose of having a simple wiki for low-powered ARM devices such as the Raspberry Pi and BeagleBone Black. Of course it can also run on many other platforms too.

I don’t want to compile the project on the ARM device itself due to unnecessary thrashing of the micro SD card. Instead, I cross-compile the binary from my Mac. Maybe one day I’ll have binaries available for multiple platforms, but since Goiki is in such a beta state (though completely usable), you’ll have to compile it yourself.

A quick primer on cross-compiling Go for ARM on OS X

Read the Go: Getting Started section on the Golang website first. Though, the following might get you there without needing to do that:

brew install go
mkdir ~/go
export GOPATH=~/go
cd ~/go
mkdir -p src/github.com/langhorst
cd src/github.com/langhorst
git clone https://github.com/langhorst/goiki.git
cd goiki
go get

For cross compiling Go projects on OS X for ARM, do the following once:

cd `brew --prefix go`
cd libexec/src
GOOS=linux GOARCH=arm CGO_ENABLED=0 ./make.bash --no-clean

And then to compile Goiki:

cd ~/go/src/github.com/langhorst/goiki
GOOS=linux GOARCH=arm GOARM=7 go build -o goiki.arm

Now copy over the binary:

scp root@beaglebone:goiki.arm

And on the BBB:

mv ~/goiki.arm /usr/local/bin/goiki

Now we can run the goiki executable.

Configure Goiki

Goiki packages its default configuration in the binary and provides a command line option for outputting it to the command line. Capture the output to a configuration file:

`mkdir /etc/goiki`
`goiki -d > /etc/goiki/personal.toml`
`goiki -d > /etc/goiki/family.toml`

The configuration file is self-documenting. Edit with your favorite editor and come back for setting up a daemon.

Setting up a daemon

Since init is available we’ll just use that. I found a terrific init.d script template to make this easy. You’ll just need to change the first couple of lines for your own executable:

#!/bin/bash
# myapp daemon
# chkconfig: 345 20 80
# description: myapp daemon
# processname: myapp

DAEMON_PATH="/home/wes/Development/projects/myapp"

DAEMON=myapp
DAEMONOPTS="-my opts"

NAME=myapp
DESC="My daemon description"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

case "$1" in
start)
	printf "%-50s" "Starting $NAME..."
	cd $DAEMON_PATH
	PID=`$DAEMON $DAEMONOPTS > /dev/null 2>&1 & echo $!`
	#echo "Saving PID" $PID " to " $PIDFILE
        if [ -z $PID ]; then
            printf "%s\n" "Fail"
        else
            echo $PID > $PIDFILE
            printf "%s\n" "Ok"
        fi
;;
status)
        printf "%-50s" "Checking $NAME..."
        if [ -f $PIDFILE ]; then
            PID=`cat $PIDFILE`
            if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
                printf "%s\n" "Process dead but pidfile exists"
            else
                echo "Running"
            fi
        else
            printf "%s\n" "Service not running"
        fi
;;
stop)
        printf "%-50s" "Stopping $NAME"
            PID=`cat $PIDFILE`
            cd $DAEMON_PATH
        if [ -f $PIDFILE ]; then
            kill -HUP $PID
            printf "%s\n" "Ok"
            rm -f $PIDFILE
        else
            printf "%s\n" "pidfile not found"
        fi
;;

restart)
  	$0 stop
  	$0 start
;;

*)
        echo "Usage: $0 {status|start|stop|restart}"
        exit 1
esac

I set one up for each of my wikis: goikipersonal and goikifamily.

chmod +x /etc/init.d/goikipersonal
chmod +x /etc/init.d/goikifamily

An example of how I changed the goikifamily init script:

#!/bin/bash
# goiki daemon
# chkconfig: 345 20 80
# description: goiki family daemon
# processname: goiki

DAEMON_PATH="/usr/local/bin"

DAEMON=goiki
DAEMONOPTS="-c=/etc/goiki/family.toml"

NAME=goiki
DESC="Goiki wiki for family notes"

Now, start them up!

/etc/init.d/goikipersonal start
/etc/init.d/goikifamily start

You should now be able to hit the box from your favorite webbrowser: beaglebone:[port].

DIY Hair Pomade

Ingredients

  • 1 tsp Pure beeswax
  • 1 tsp Coconut oil
  • 1 drop Essential oils

Use 8 parts of each to fill a small tin.

Supplies

  • Double boiler
  • Storage tin

Instructions

  1. Get about an inch of water boiling in the pot.
  2. Pour the beeswax into the bowl and wait until liquified.
  3. Mix in the coconut oil and essential oils.
  4. Stir until liquified.
  5. Carefully pour into the storage tin.
  6. Wait for a few hours until solid.

This recipe and accompanying instructions originally came from the article entitled DIY Hair Pomade for Father’s Day (All-Natural) by Ryan Foy.

On Shoes

I prefer shoes that are built for the anatomy of the foot, not solely for style. However, I also like a stylish shoe. Not very long ago this type of shoe was almost, if not completely impossible to find. Luckily for us, there are now choices!

Barefoot

Yes, barefoot is best. I prefer to be barefoot as much as possible, even when it may not be as socially acceptable as it probably should be.

Sandals

I love Luna Sandals. They are the most comfortable pairs of shoes I own. Okay, so they aren’t the most stylish; oh well.

Luna Mono with Pittards Footbed Source: http://www.lunasandals.com/collections/lunas/products/luna-mono

Barefoot Ted and team absolutely nailed the straps (and footbeds, and soles!). I have a few older pairs, but when it’s time to buy new I will grab the Luna Mono sandals with the pittards foot bed for an everyday sandal and the Luna Oso for trail running madness.

Casual

Lems Shoes makes some nice casual shoes. I own the Lems Mariner which is super comfortable worn without socks. The next shoe I’d like to try from Lems is the Lems Nine2five Coffee&Cream. I figure it’d be good to wear with pants once it gets a bit cooler. The Lems Primal 2 and Lems Boulder Boot are also enticing.

Lems Nine2five Coffee&Cream Source: http://www.lemsshoes.com/Mens-Nine2five-Coffeecream_p_94.html

Vivobarefoot has some great casual shoes as well. I have a pair of [Gobi]() and Ra that are both wonderfully comfortable. There are two problems with the Ra (the Gobi is perfect). One is fairly minor and can be fixed with thicker socks: the back digs into the heel a bit. The other is stylish: the toebox is so wide that it starts looking like a clown shoe at certain angles. Good news though, Vivobarefoot has completely fixed all the problems with the original Ra in the Ra II.

Dress

While I don’t currently have a need for dress shoes, Vivobarefoot’s Bannister, Porto and Lisbon are new luxury styles that I would purchase in a heartbeat if I had to go into the office everyday.

Vivobarefoot Porto in Dark Brown Source: http://www.vivobarefoot.com/us/mens/porto-mens?colour=Dark%20Brown

Hiking

When hiking in sandals is not appropriate, I currently use a traditional pair of hiking boots. But I’d like to replace them with a barefoot alternative, and the Vivobarefoot Off Road Hi is the one I’ll be going after.

Vivobarefoot Off Road Hi Source: http://www.vivobarefoot.com/us/mens/off-road-hi-mens?colour=Dark%20Brown

House

When talking about barefoot shoes, one can’t forget Soft Star Shoes. I partly lied about the Luna Sandals being the most comfortable pair of shoes I own earlier. For summer, that is definitely true, but the Roo Moccasins win that award in the colder months. Sometimes I wear them out, and yes they look funky (they come in custom color configurations too), but sometimes it’s worth embracing your inner elf for the sheer joy one experiences when wearing his or her elfish moccasins out for a day.

Soft Star Shoes Roo Moccasins Source: http://www.softstarshoes.com/adult-shoes/moccasins/adult-roo-moccasin-suede-forest-chocolate.html

Links

Hosting multiple domains with Nginx in Ubuntu 14.04 on Digital Ocean

So I was having problem with my previous server. Now that I’ve rebuilt everything I’ve realized that the problem I was having could have been easily fixed with my previous install. But, it doesn’t matter; it was time to upgrade from Ubuntu 12.04 to 14.04 anyway.

The goal of the server is simple: host two domains using Nginx. The problem I was having with the 12.04 install was that I could never get the second domain to serve up the right files; it would always serve up the first domain. This turned out to be a problem with the Nginx configuration. I thought this was the case at the time, but since the install wasn’t doing anything else anyway, I thought it was a good time to rebuild and start from scratch.

There are four articles of importance here:

  1. Initial server setup with Ubuntu 14.04
  2. How to install Nginx on Ubuntu 14.04 LTS
  3. How to set up Nginx server blocks (virtual hosts) on Ubuntu 14.04 LTS
  4. How to install and use Fail2Ban on Ubuntu 14.04

There is also a fifth article that may be useful to you: How to set up a host name with DigitalOcean.

The following is a quick summary of commands and configuration for the four articles listed above.

Initial server setup with Ubuntu 14.04

  1. Login: ssh root@[server_ip_address]
  2. Change the root password: passwd
  3. Add a new user: adduser [username]
  4. Give root priveleges to new user: visudo
  5. BACK OUT IMMEDIATELY with CTRL-X and export EDITOR=vim ;-)
  6. Give root privelges to new user: visudo

    [username] ALL=(ALL:ALL) ALL

  7. Alter SSH configuration: vim /etc/ssh/sshd_config

    1. Update port: port [port_number]
    2. Refuse Root Login: PermitRootLogin no
    3. Allow only certain users (careful!): AllowUsers [username]
  8. Restart SSH: service ssh restart

  9. Test SSH config from new terminal

    1. ssh -p [port_number] [username]@[server_ip_address]
    2. sudo vim
  10. Exit the root terminal: exit

How to install Nginx on Ubuntu 14.04 LTS

  1. Install Nginx:
    1. sudo apt-get update
    2. sudo apt-get install nginx
  2. Check the installation: curl http://[server_ip_address] or curl http://[domain_uri]

How to set up Nginx server blocks (virtual hosts) on Ubuntu 14.04 LTS

  1. Create a directory for each domain’s files:
    1. sudo mkdir -p /var/www/[domain1]/html
    2. sudo mkdir -p /var/www/[domain2]/html
  2. Change ownership to each directory:
    1. sudo chown -R $USER:$USER /var/www/[domain1]/html
    2. sudo chown -R $USER:$USER /var/www/[domain2]/html
  3. Make sure the permissions of the web roots are correct: sudo chmod -R 755 /var/www
  4. Create sample pages for each site:
    1. vim /var/www/[domain1]/html/index.html -> HTML
    2. cp /var/www/[domain1]/html/index.html /var/www/[domain2]/html/index.html
    3. vim /var/www/[domain2]/html/index.html -> HTML
  5. Create server blocks for each domain:

    1. sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/[domain]
    2. sudo vim /etc/nginx/sites-available/[domain1]
        server {
            listen 80;
            listen [::]:80;
    
    
            server_name [domain1] www.[domain1];
    
    
            root /var/www/[domain1]/html;
            index index.html index.htm;
    
    
            location / {
                try_files $uri $uri/ =404;
            }
        }
    
    1. sudo vim /etc/nginx/sites-available/[domain1] /etc/nginx/sites-available/[domain2]
    2. Adjust the second domain’s configuration to match the domain name and appropriate directory locations.
  6. Enable the server blocks and restart Nginx

    1. sudo ln -s /etc/nginx/sites-available/[domain1] /etc/nginx/sites-enabled/
    2. sudo ln -s /etc/nginx/sites-available/[domain2] /etc/nginx/sites-enabled/
    3. sudo vim /etc/nginx/nginx.conf and make the following change: server_names_hash_bucket_size: 64;
    4. sudo service nginx restart

How to install and use Fail2Ban on Ubuntu 14.04

  1. sudo apt-get update
  2. sudo apt-get install fail2ban

Einstein on reading

Reading, after a certain age, diverts the mind too much from its creative pursuits. Any man who reads too much and uses his own brain too little falls into lazy habits of thinking.

– Albert Einstein

First post using Hugo

Ahhh, new beginnings. About the only time I ever write something is when I am changing software. I suppose it’s time to change that.

About Me

Hi, I’m Justin.

My interests are in permaculture and regenerative design; software development and architecture; business; running, kettlebells, diet and fitness; photography; and many tiny, specific little things.

This is mostly a place to share a few things with my future self. Bonus points if you find something of value too.

Contact Me

Want to get in touch? Email me at: the at justinlanghorst dot com, or tweet in my general direction @justajot.

Octopress on S3

I’m currently working on redoing a company website, moving from WordPress to Nanoc. Since the new website will be static, and mostly a single-pager for a while, we now have the option of moving from a traditional host to the Amazon S3 datastore. Before committing a company website to the process, I decided to go ahead and move this blog over to S3 (it uses Octopress) first. Here are a few notes that I jotted down along the way.

Sign-up to S3 and create buckets

Amazon has excellent documentation for hosting a static website on S3. I basically followed this excellent walkthrough. To begin, create two buckets for your domain, one with the “www” subdomain and one without. Point the “www” bucket to the non-www bucket, and keep all your files there. Or just ignore the “www” version entirely if you don’t care to resolve the www subdomain to your website. Some might say it’s deprecated anyway.

Add S3 deployment to Octopress

Jacob Elder wrote about deploying Octopress to S3 and also included a bit of code for deployments using s3cmd. Check out the blog post for detailed info, or just update your Rakefile with the contents of this patch.

Updates to Jacob’s patch

I ended up changing a few things from Jacob’s code, mostly just adding the option to use reduced redundancy since the contents of my website are most definitely “durably stored elsewhere”.

## – S3 Deploy Config – ## # Requires s3cmd. brew install s3cmd or see http:/s3tools.org/download s3_bucket = “justajot.com” s3_delete = false s3_reduced = true

That’s the config, and this is the Rake task:

desc “Deploy website to Amazon S3” task :s3 do puts “## Deploying website via s3cmd” exclude = File.exists?(“./s3-exclude”) ? “–exclude-from ‘#{File.expand_path(‘./s3-exclude’)}‘” : “” ok_failed system(“s3cmd sync –guess-mime-type –acl-public #{exclude} #{‘–delete-removed’ unless s3_delete == false} #{‘–reduced-redundancy’ unless s3_reduced == false} #{public_dir}/ s3://#{s3_bucket}/“) end

Create routes, switch DNS servers

Keep following Amazon’s walkthrough. Once you’ve switched over your DNS servers to point to those listed under the Route 53 entry, all you have to do is wait a bit to see if you did everything correctly. If you’re reading this, I’m guessing everything my attempt was a success. ;-)

Using AirPort Utility 5.6.1 in Lion

So I’m in the beginning stages of planning a whole-house automation system. Since music is pretty damn important to me, the first part of this system I’d like to get right is whole-house audio. I want to be able to play music in pretty much any room I’m in, all controlled from my phone or tablet. Since I’m already running Apple products everywhere, it just makes since to use an AirPort Express for each zone.

To get things started, I have an older version of the AirPort Express that plugs directly into the wall. It hasn’t been updated in a while, but my OS X systems have. I’m currently running Lion (not Mountain Lion) and the current AirPort Utility application (version 6.1) doesn’t support the old AirPort Express. The older version that does support it only runs on Leopard/Snow Leopard. Or so it says. What to do?

Well, there is an excellent explanation here. I’ll forgive the errors in the title of his/her site because the solution and walk-through are great.

Briefly, here’s what you need to do:

  1. Download the disk image from [http://support.apple.com/kb/DL1536]().
  2. Mount the image / move AirPortUtility.pkg to your Desktop.
  3. Open Terminal, and cd ~/Desktop ; mkdir tmp ; cd tmp.
  4. Extract the payload: xar -x -f ~/Desktop/AirPortUtility.pkg Payload.
  5. Extract the app: gzcat AirPortUtility.pkg/Payload | tar -xf -.
  6. Open up the app located withing the new Applications directory.

Following the instructions above allowed me to finally fix my old AirPort Express to get it showing in my AirPlay list again. Now I just need to buy a few more to get audio in each room. I think it’s time to go listen to some music. Yup.

On pens

What goes well with notebooks? Pens! Since my last post was about notebooks, it only makes sense for this one to be about pens. Right? Right.

Earlier this year I was on an all out yetti hunt to find the perfect notebook after Moleskine completely screwed their previously lovely square-ruled notebook with ink dark enough to compete with my own writing. The quest was successful after I found my perfect notebook in the Behance Dot Grid Journal. The bright green strap just does it for me.

For the Dot Grid Journal, my favorite pen so far is the Papermate Flair UF. The Fisher Space Pen is great if you’re into ballpoints, as is the Parker Jotter. And while I have the stainless steel version, I far prefer the lime green (yes, bright green is a favorite color of mine). The weight and feel is a bit different too, and I actually like the colored plastic versions better.

If I were still writing on Moleskines, there is no question what pen I would be using: the Pilot Hi-Tec-C. And to make things more interesting, there have been a few successful Kickstarter projects for better housings.

My choice would be the Render K. Just something about it. I haven’t felt like forking over $40 just yet though. Hmmm, the PHX-Pen looks interesting as well. Decisions, decisions.

A search for the perfect notebook

I’ve been on a mad hunt for the perfect notebook the last few days. Not a laptop. Certainly not one of those spiral notebooks typically used in gradeschool. No, just a regular black notebook. Oh, but with graph lines. Not blank. Not ruled.

My last Moleskine Squared Notebook is nearing completion with 11 pages left. Why the hunt? Why not just buy another one? There are several Barnes and Noble stores near me that sell them, BUT, there’s one major reason why I won’t do it again – the graph lines are TOO DARK!

It wasn’t long ago that the Moleskine Squared Notebook was the perfect one for me. Except for being a bit pricey, I loved everything about them – the color of the paper, the graph lines, the way the binding allows the notebook to lay flat when you have the notebook open. Oh man! Anyway, while I’m sure you care about the details of what works for me (I know you don’t), that isn’t the point.

After calling a few places and driving around to several different stores in the area, I came up with nothing. Needing a notebook immediately, I gave up and bought a ruled Moleskine from B&N. But, here is what I found.

After a large search around the area, I wasn’t able to get my hands on a physical copy, but apparently Piccadilly makes exact replicas of the Moleskine notebooks on the cheap. Apparently they are both made in China. I wouldn’t be surprised if they are made by the same company.

Ecosystem has a really nice line of notebooks themselves. They use 100% post-consumer recylced paper and are 100% USA made. Awesomeness. Unfortunately for me, their Architect line of notebooks just isn’t what I’m looking for. The lines are printed dark and are much too small. If I was looking for a ruled journal, I would definitely consider them – their flexi cover is amazing and I just love their story.

Markings sells a line of products at Staples and Target. I find their cover disgusting and refuse to use it.

Behance sells the Dot Grid Journal, which looks pretty interesting. I know I was looking for a squared ruling, but if the dots aren’t too dark, it could be perfect.

UPDATE! The Behance Dot Grid Journal is the best notebook I’ve ever owned. Plus, their customer service is awesome.

UPDATE #2 It appears as if the lines in the squared Moleskine notebooks are back to normal - yay!

UPDATE #3 Lately I’ve been using nice printer paper, folded up twice to make four squares. I actually like this better than a notebook for daily notes - keeping around five pages with me at a time. I think I’ll punch holes in them and put them in a binder.

pbcopy | pbpaste, and opening a new terminal tab in the current working directory

While I try my best to improve all areas of my life continuously (kaizen), sometimes I fail to perform with exemplary status. Countless times a day I have the need to open a new Terminal tab in the same working directory. Before today, I issued a pwd command, copied the output using the mouse, Command-T, and cd Command-V. Ugh. That’s a convoluted mess.

When I was growing up and mastering conventional memory management in DOS for the sole purpose of viewing various graphical demos from around the world, I knew about and how to use every command available within the operating system. Even though that’s probably not realistic these days, it’s something definitely worth shooting for over time (hmmm Linux from Scratch. If the same were true today, then I would have already been using the pbcopy and pbpaste utilities.

Now I can simply pipe the current working directory to the clipboard:

pwd | pbcopy

Open a new terminal tab or window, and use a combination of cd and Command-V or pbpaste to get back to the original directory:

cd `pbpaste`
cd [Command-V]

While pbcopy and pbpaste are excellent utilities, they aren’t the best solution for what I originally set out to do: open a new tab in the current working directory. I’m sure there is an even quicker way to get to the same current working directory, probably with an AppleScript, and I suspect that OS X Lion has an option for this in Terminal, but for now, pbcopy will do the trick.