Tuesday, November 3, 2020

TinyPilot: A fun project for both New and Seasoned Sysadmins

 I recently read about a do it yourself KVM called TinyPilot, by Michael Lynch.

TinyPilot provides a KVM (Keyboard Video & Mouse) connection to any machine, for the low cost of around $150, or about an hour of your time and whatever Raspberry Pi parts you have sitting around.

I have an old Dell R800 with an older version of iDRAC.  The iDRAC fails every reasonable attempt to manage the server through the browser, and can't be updated any further. I don't keep a VGA monitor around / connected in my garage, it's a major chore anytime I do something that requires a reboot on that system.

I like this as a weekend project for a few reasons:

  • If you're new to working with home lab hardware, this is a nice stretch project with an immediately useful result.
  • If You've a seasoned home lab tinkerer or "professional" - This is much easier and cheaper than a traditional KVM, and likely solves a common annoyance.
  • Regardless, it's an inexpensive way to play with a Raspberry Pi and potentially support a useful open source project.
While following the tinypilot guide, I ran into a few problems:

I didn't have a Rasp 4 lying around (Only a 2) - This turned out to be a big issue, you absolutely need a 4.

I didn't have a 32 gig SD card available (only a 4gig) - This wasn't an issue, worked fine.

No HDMI port on my old R800 - I tested on another machine, and picked up a hdmi to VGA dongle.

The actual install of TinyPilot on my Raspberry Pi 2 took about 45min.
 This is likely because my Pi 2 is pretty old. No effort was required on my part- outside of kicking off the install script. The installer kicks off an Ansible playbook on the Pi.  I'm fine with waiting as it put the Pi 2 to good use, and I actually avoid some of the power concerns with the recommended Pi 4. 

PiRecommended PSU current capacityMaximum total USB peripheral current drawTypical bare-board active current consumption
Raspberry Pi 21.8A1.2A350mA
Raspberry 
Pi 4  
3.0A1.2A600mA
Raspberry Pi FAQ

Update:
As mentioned above - The Raspberry 4 was definitely required. My Pi 2 loaded the web GUI, and even displayed the desktop - but any attempt to interact failed. I suspect either the CPU/RAM on the Pi 2 wasn't enough. I performed a fresh install on my Pi 4, which completed in under 10min.  


Wednesday, February 19, 2020

Change OSX Hostname - For Real!

This was enough of a headache today that I wanted to keep a record.

If the hostname of your MacBook doesn't match across various places (Terminal, System Preferences, iCloud) - you can fix it with the steps in this Ask Different question.

I've also included the answer here, for my own sanity.

  1. Open a terminal.
  2. Type the following command to change the primary hostname of your Mac:
    This is your fully qualified hostname, for example myMac.domain.com
    sudo scutil --set HostName <new host name>
    
  3. Type the following command to change the Bonjour hostname of your Mac:
    This is the name usable on the local network, for example myMac.local.
    sudo scutil --set LocalHostName <new host name>
    
  4. If you also want to change the computer name, type the following command:
    This is the user-friendly computer name you see in Finder, for example myMac.
    sudo scutil --set ComputerName <new name>
    
  5. Flush the DNS cache by typing:
    dscacheutil -flushcache
    
  6. Restart your Mac.

Sunday, December 15, 2019

Expect the Unexpected! Lisa '19

Excited to share the video from my Lisa 2019 talk with Brian Artschwager.

Ops teams have a higher volume of unplanned work than any other similarly sized team.

This talk will attempt to explain the details of a practical method of managing unplanned work, though the engaging story of how our team used this method to systematically process our previously unending backlog.

 

Sunday, November 10, 2019

How The ISE team at Stack Overflow does Python Linting


Some time back I wrote this short guide for our internal wiki at Stack.
I'm sharing it here for anyone with an interest in Python linting.
Our team generally subscribes to a modified version of pep8.
Reference: Google Standards for Python

Specifically:
  • We allow long lines up to 120 characters.
  • Classes should be CamelCase
  • Globals FULLY_CAPITALIZED
  • All other variables lower_snake_case
The following are recommended steps using Sublime Text linting with Anaconda.
  1. Install sublime text Package Control
    • From inside sublime text:
    • CTRL + SHIFT + P to open the package control menu 
  2. Install anaconda
    • if you already have it you may need to reinstall anaconda when done
  3. Install Sublime Text Package Resource Viewer 
  4. Update Anaconda Settings
    1. Go to preferences -> Package Settings -> Anaconda
    2. paste anaconda settings into the user settings file 
  5. Using Package resource viewer open your current color scheme 
    1. CTRL + Shift + P - then type color scheme 
    2. Select The Package Resource Viewer option for your color scheme.
    3. Add the color scheme JSON into the Rules section of your color scheme. 
    4. You'll need to do this any time you switch to another color scheme.
If everything worked out, your editor should now look something like this:
(Yellow dots indicate warnings, Red errors, blue spacing mistakes.)
An explanation of the error will appear in the bottom of the editor

Sunday, May 27, 2018

FizzBuzz in Go

I recently started poking around at Go again.
I like to prove I can write FizzBuzz in a new language (without looking up any language-specific syntax).

This is pretty straightforward - sometimes people go with a case statement, but I wasn't sure what kinds of comparisons were allowed in a Go switch.  It might be fun to see if I can perform an evaluation (i%5 ==0), or am limited to specific values (1,'a', false).

Thursday, June 1, 2017

Getting Started with Appengine

My brother asked about building web pages on Google AppEngine.  A while back I recorded this getting started tutorial.  The expectation is 0 knowledge of how AppEngine works and brings you from empty folder to working website in under 45min.