Automatically Mark Prompt Lines

Thanks to a tweet by John Siracusa, I noticed something I’ve had enabled on my computer for months and never noticed (but now can’t unsee): automatically marked prompt lines in Terminal:

Notice the square brackets around the executed command on the first line?

[jared@Jared-MBP:~$ ll A*                   ]

According to this answer on an Ask Different question, every time you press return on the keyboard, the line is ‘marked’, and you can use cmd+up and cmd+down to jump back and forth between marked lines.

Now that this has been pointed out to me, I’ve started playing with it, and it seems like a really nice feature I’m going to get used to really quick.

Apple Watch Magnetic Charging Cable

My brother pointed out to me that Windows detects the Apple Watch charging cable when you plug it in. Of course, I was curious, so I used USBView to take a look at the device. Apple apparently has a PCI Vendor ID of [0x05AC] (Apple Computer), which is pretty cool!

Complete output from USBView:

Device Descriptor:
bcdUSB:             0x0200
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x40 (64)
idVendor:           0x05AC (Apple Computer)
idProduct:          0x1392
bcdDevice:          0x0200
iManufacturer:        0x01
0x0409: "Apple Inc."
iProduct:             0x02
0x0409: "Apple Watch Magnetic Charging Cable"
iSerialNumber:        0x03
0x0409: "DLC5357021XGTCMAH"
bNumConfigurations:   0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     Full
Device Address:       0x06
Open Pipes:              1

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x32

Configuration Descriptor:
wTotalLength:       0x0022
bNumInterfaces:       0x01
bConfigurationValue:  0x01
iConfiguration:       0x00
bmAttributes:         0x80 (Bus Powered )
MaxPower:             0xFA (500 Ma)

Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x01
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x00
bInterfaceProtocol:   0x00
iInterface:           0x05
0x0409: "HID Interface"

HID Descriptor:
bcdHID:             0x0111
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x0021

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x32

Tracking aircraft with PiAware

As I mentioned in my SDR post, I had planned on setting up my SDR dongle and my Raspberry Pi 2 to listen in on aircraft transponders. I did just that this morning.

I started by following these instructions to clone, build, and install MalcomRobb’s fork of dump1090. After following the instructions (and blacklisting the dongle from being used by the OS), I was able to start seeing aircraft:

Then, following the instructions over at PiAware (starting on step 2), I downloaded, installed, and configured the PiAware application, and linked it to my new FlightAware account.

Within a few minutes, I started to see aircraft in the skies above me show up on my map:

In the screenshot above, you can see the flight track I captured of United Airlines flight 1239, flying from Houston, TX to Vancouver, BC.

Although all of the flights my Pi hears are listed on the right, only aircraft using the new “next-generation” ADS-B transponders will display the latitude and longitude. Otherwise, I just listen in on the Mode S transponder signal.

Installing VMWare Tools on Debian 8.1

For a project I am working on, I am running Debian 8.1 as a guest operating system in VMWare Player 7, and I needed to get VMWare Tools installed to enable host-to-guest folder sharing, and I was having no luck with Debian’s open-vm-tools package.

After several tries, I found that this works successfully for me:

First, downloading and installing the build-essential and the appropriate headers for my kernel packages:

sudo apt-get install build-essential 
sudo apt-get install linux-headers-$(uname -r)

Then, using instructions from this site, running the following commands to install VMWare Tools:

# Remove existing open-vm-tools installations
sudo apt-get remove --purge open-vm* -y
sudo apt-get autoremove -y 

# Mount the VMWare Tools cd image, if it doesn't automount
# Mine automatically mounted to /dev/cdrom0
sudo mkdir -p /media/cdrom
sudo mount /dev/cdrom /media/cdrom

# Copy the VMWare Tools archive to /tmp
cp /media/cdrom/VM*.tar.gz /tmp
sudo umount /media/cdrom
cd /tmp

# Extract and run the VMWare Tools installer
tar xzvf VM*.tar.gz
cd vmware-tools-distrib
sudo ./vmware-install.pl

The VMWare Tools installer is interactive, and will ask questions as it installs – for me, the defaults worked just fine. Once it finishes, it will ask if you want to run the vmware-config-tools script. I answered yes, let it finish, and restarted the VM, but I was not able to see the shared folders.

You can verify that Debian is seeing the shared folder by running vmware-hgfsclient in the terminal, and it should come back with a list of the available shared folders.

I had to run the vmware-config-tools script again:

sudo vmware-config-tools.pl

And then the shared folders were visible to the VM:

ls -l /mnt/hgfs

And finally, you can create a symlink to the shared folder location (rather than trying to mount it through the OS):

ln -s /mnt/hgfs/[name of share] /home/[username]/Desktop/[name of share]

2014 Running Report

Now that 2015 is officially here, I decided to look back at my year of running and see what I accomplished:

  • Total distance: 307 miles
  • Average overall pace: 11:36 min/mi
  • Average run distace: 4.0 miles
  • Longest break: 33 days (ouch)
  • Longest streak: 2 days
  • Day most frequently run: Thursday

Overall, not too bad. Of course, what’s a new year without a resolution!

This year, my goal is to cross 400 miles, and run at least one half-marathon – I’m already registered for the Colfax Half-Marathon, and I’d like to run the Estes Park Half Marathon again, if I can.

Here’s to 2015!

Engineering rotations at Etsy

Etsy posted a walkthrough of their ‘engineering rotation’ for employees:

This got us thinking about starting up engineering rotations, where people outside of the engineering organization spend some time learning how the team works and doing some engineering tasks. Armed with our excellent continuous deployment tools, we put together a program that could have an employee with no technical knowledge deploying code live to the website in three hours. This includes time spent training and the deploy itself.

The program is split into three parts: homework; an in-person class; then hands-on deployment. The code that participants change and deploy will add their photos to the Etsy about page. It’s a nice visual payoff, and lets new hires publicly declare themselves part of the Etsy team.

I think programs like this are an excellent idea – not just exposing people to how others across the company work, but giving them an understanding of what other groups are doing. I see a lot of animosity towards other groups in my current job, mostly because they don’t really understand what it is the other groups do.