• Skip to primary navigation
  • Skip to main content

This is What You Get When You Mess With Us

  • Series
    • Cinema on Wednesday
    • Friday Fun Family Movie Night
    • Made a {} of It
    • Twisted Balloons
  • About
  • Contact Us

ruby

This is Good Pi, Part 1

August 1, 2019 by Rob

Good Pie!

The Raspberry Pi 4 came to market just a few weeks ago. For $35 to $55, plus some peripherals, you can run a desktop computer nearly as powerful. If you’re in the market and have the opportunity, I recommend you pick up the Raspberry Pi 4. For this project I am going to use a Raspberry Pi 3 B+. It’s not hearty enough for serving up steady HD video, but it should be fine for some of the projects that I have been working on at Flatiron.

Raspberry Pi 3 B+

So, wait, what is a Raspberry Pi? If you’re not yet aware, the Pi is a palm-sized computer originally built for young student learners. It is low cost and low power. It comes with no software preinstalled. A flavor of the Debian Linux operating system, called Raspbian, can be installed on an inexpensive microSD card and plugged into the available slot on the Pi board. Some versions come with USB and HDMI ports. Recent Pi models (Including 3 B+, 4, and Zero) come equipped with Wireless and Bluetooth. It is built with the novice in mind. The full distro of Raspbian comes with packaged with the software you might want to have in order to use the Pi like any other home computer.

Raspberry Pi Zero W

What can you do with a Raspberry Pi? A lot. I’ve talked about using a Raspberry Pi to build (but not yet completely documented) my TNYGLXY project. A host for a TinyMux server. I hope to build a audio server and home automation interface, replacing commercial hardware by companies that don’t have a stellar relationship with privacy. And, of course, a development server for Rails and React applications.1

Let’s get going on our low-power server build.

Hardware

  • Raspberry Pi 3 B+
  • 5v Power Source with Micro USB connection
  • A case (optional, but recommended)
  • 16GB MicroSD card (at least)
  • MicroSD card reader (if not built into your computer
  • A Computer (Windows/Mac/Linux)
  • A Wired Network Connection

Software

  • Copy of a Raspbian Image (As of this writing, the Buster release; I’m using Buster Lite)
  • Some way to write the Raspbian Image File. I’m using balenaEtcher, which is available for all Operating Systems.
  • Some space on your local hard drive to keep the Raspbian Image
  • A zip utility
  • An SSH utility, like PuTTY

There is a version of Raspbian with a Window or Mac-like User Interface. For this project, by using the Lite image, I am omitting the UI and much of the standard packages (or software) that come with the larger installations. This gives me more control over what’s on my device, with the goal of navigating over potential conflicts. This system will also run ‘headless’ (that is, without a monitor, keyboard, or mouse). I can SSH directly into my Pi from any one of the computers that I keep around me at all times (including my phone).

Write the ISO to the SD Card

The first step is to get ISO written to the SD card. Place a formatted SD Card (FAT32 for cards smaller than 32GB; exFAT for anything larger, per the documentation. I’m using 16GB which is more than enough) in the card reader attached to your computer. When the drive is ready, you can start writing the ISO Image of Raspbian to the card.

balenaEtcher is dead simple to use. Simply click through the prompts until you get to the finished product. Follow along in the gallery below.

Select an Disk Image

Select an Disk Image
Image 1 of 8

Add SSH file to boot Partition

boot(H:) and USB Drive (I:) are two partitions on the SD Card. I: contains the Raspbian OS; boot is for configuration

Once balenaEtcher is done her magic, you will find that your SD card now has two partitions.

no extension on the ssh file

In the “boot” partition, add an empty file named ‘ssh’. This will let the Pi know to configure itself to accept an SSH connection from an external sources, ie: you.

Connect it Up

Carefully, remove the SD card from your computer, and insert it into the SD card slot on your Pi. Connect your network cable to the Ethernet port2 and then attach the power cable. Do this the other way around and you might not get assigned an IP address and nothing else will work.

There is a red LED on the front of the Pi. You can tell by the number and frequency of flashes how the boot is progressing. Once it’s solid red, you’re good to go. Any other pattern, there are problems. Consult the Raspberry Pi documentation as that’s not in scope for this tutorial.

Here is where things could get sticky. You need to find the IP Address for the Pi. The way that’s easiest for me in this headless scenario is to see what my Internet Router has assigned to the little computer.

Note the IP Address for your Pi

To do that, I logged in to my router and looked for connected devices. The one labelled “raspberrypi” is, obviously, the one I want.

If you don’t have access to your router (say, you were accessing your device on a public or work network), it would be best to connect a keyboard and monitor to the Pi and complete the steps *after* the bit with PuTTY.

Configure PuTTY

Putty Terminal. Create a “Stored Session” to login to the Pi in the future

PuTTY is an Terminal SSH/Telnet utility that I’ve used for years. I’m sure you have, too, if you’ve had to remove connect to a network, especially before things like VPN utilities became so widely used. This is less user friendly than those, but certainly more powerful.

When you open PuTTY (or any other SSH utility) you will need to create a session. Enter the IP address of your Pi in the Host Name field.3 Select a connection type of ‘SSH.’ The port should set to ’22.’ If it does not, you can fix it.

I like to save my session so I can quickly access the Pi later. Give it a name and click ‘Save.’

For now, you can leave all other settings as they are.

Login

In PuTTY, click the button ‘Open.’ The configuration screen will close and a terminal window will open.

Click ‘Yes’ to store the ssh key

First, you may have to confirm the ssh key fingerprint. Clicking ‘Yes’ will add the key to PuTTY’s cache and save it for future connections. Click ‘Yes.’

The login is ‘pi’ and the default password is ‘raspberry.’ You don’t have to but probably should change the password.

The default login for the Raspbian is ‘pi’ with a password of ‘raspberry.’ When you log in, you should be see the prompt:

pi@raspberrypi:~ $

At that prompt, type ‘passwd’ to change your, you know, password. You will have to confirm the existing password, choose a new one, and then confirm the new one.

Once that’s done and dusted, it’s time to update and upgrade your Pi.

Update and Upgrade

Why upgrade? When you downloaded your copy of the Raspbian Image, the date/time stamp on the release was likely in the past. Linux-based systems are updated constantly. So, between the time the release was published and now, there were likely updates made to packages by the great opensource community.

Type in the following:

sudo apt-get update

This will download to your Pi a catalogue of all packages with changes. This will help the next process we run determine what packages need updating.

Type:

sudo apt-get upgrade

This will likely take a while, so go get a Diet Mt. Dew.4. What this command does is go through that list of updates, pulls down, and upgrades the packages currently on your pie. When it’s done you can be sure you have the latest and greatest available to you.

To run these two commands on a regular basis is good practice. Unless you have very specific requirements for your machine that requires a targeted or customized updates, this is the way forward.

What’s Next

Now that the Raspberry Pi is powered up and running Raspbian, you can start to load up on the other pieces of software you may need for a purpose built staging server. For the stack I work with, in the next blog post, I will install the following, along with any dependencies:

  • Git
  • Ruby
  • Ruby on Rails
  • React.js
  • Bootstrap/React Bootstrap for UI

Until next time…

  1. Currently Raspberry Pi 3 B+ is $24 at your favorite computer super center, Microcenter. The Raspberry Pi Zero W is $5. Not as much power, and no wired Ethernet access, but a good place to start with a low barrier to entry. Amazon does *not* have the best prices. If you’re looking to buy in bulk, for whatever reason, try going right to the US Distributors. As for peripherals, including power and cases, bad is cheap; best is not that much more expensive. Better to buy the official branded or nearly anything they carry at Microcenter. Here, again, Amazon power supplies for the Pi have failed me. ↩
  2. New Raspberry Pis come with Wireless built in. Once your device is up and running you can turn on the wireless, if you choose. ↩
  3. In the future, you may want to point a domain name or subdomain at the dynamic IP address assigned by your service provider to your home internet connection, and then route that traffic to the local IP of your Pi. I will write a future blog on this topic. ↩
  4. Official Drink of Extreme Developers and Night Nurses. ↩

Filed Under: Made a Hash of It Tagged With: ethernet, guide, hardware, installation, pi, pi 3 b+, pi zero, rails, raspberry pi, react, ruby, w, wireless

My Kung Fu

May 27, 2019 by Rob

One of the benefits of having a kid is the opportunity to read with them: brand new books; stories you have known all your life; stories you wished you had read. It’s a chance for you to grow and learn as a family.

Before reading it together, I had known the broad outlines of the Zen koan, Banzo’s Sword. It’s the story of a young man, desperate to impress his father, finds the sword master Banzo and insist Banzo train him. Banzo agrees. The young man asks how long it will take to become a master. Bazo tells him a lifetime. Too long, the young man says. He tries to bargain with Bazo, offers to be his servant, and with every offer the time to mastery grows. Eventually, the young man realizes that he can’t get to mastery without putting in the work and being patient. I recommend that you read Bazo’s tale here.

This is also the plot to Karate Kid.

***

I fell in love with the X-Files in it’s second or third season, in dark basement in Centreville, Virginia. A friend introduced me to Mulder and Scully and the Consipracy through her brother’s library of VHS recordings off the air. We went our separate ways – college in different states – but I kept up with the X-Files until the end and I have all seasons on DVD – except, strangely, Season 4.

Viewers may remember the The Lone Gunman. Byers, Frohike, and Langly were allies of Fox Mulder and Dana Scully, who ran The Lone Gunman, a publication that explored conspiracy theories (i.e., Lee Harvey Oswald was either a patsy or part of a larger conspiracy, the was filmed by Stanley Kubric on a soundstage in Hollywood, Extraterrestrials walked among us. ). They provided what could be charitably described as “operational support” for Mulder and Sculley, including legwork, photography, and hacking/phreaking, in service of the Agent’s search for the truth in the alien invasion conspiracy.

Sometimes they got up to their own shenanigans.

I do prefer the one-off X-File episodes over the Conspiracy, if only because the Conspiracy was bleak. Check out Jose Chung’s “From Outer Space” or Musings of a Cigarette Smoking Man.

It Sure Is.

Another, Unusual Suspects is the Mulder/Gunmen origin story. In a scene with a character, “Holly,” who is running from the Cigarette Smoking Man, when she asks him about his hacking skills, Frohike tells her that his “Kung Fu is the Best.” The phrase, a kung fu film trope and well-worn in-group code from the black-trench-coat-and-combat-boot nerds, struck in my brain. I liked it so much at the time that I added it as my signature on my home printed business cards.

I seriously I thought that was sufficient to will myself to success (whatever that means) without having to actually put in any work. I had no patience. Success as a writer would find me.

***

I’ve had a lot of jobs since college and no explicit plan other than to be a kick ass novelist: Sales Associate, early morning chyrons for major market TV, secretary, program coordinator, and secretary. I thought the novel would come by magic and my future set. Eventually I decided to turn the only skill that I spent any time actually working on and turn it into a corporate career. I took a certificate in Technical Writing and through the power of nepotism found a job doing that for a small software company.

And over the last 13 years the job grew far outside that specific title. The knowledge I built up writing about our software products made it natural that I should also do pre- and post- sales. And live trainings. Marketing material. Trade shows. We were part of a much smaller company then and everyone did what they needed to do to move things forward. Honestly, I really liked it. I like having a skill or knowledge people appreciate. Still, nearly everyone who’s ever known me longer than 5 minutes thinks it strange that I’m a damned good capitalist.

I had no explicit plan. I took opportunities as they came (opportunities that are only available to a select few, I remind myself; I’m a stupid lucky human being) and eventually found something I genuinely liked to do.

My kung fu is just okay.

***

That friend popped up on my radar a few years ago. I happened upon an article she wrote about her distrust of Gwyneth Paltrow’s Goop. We reconnected on Twitter. Soon, she found global internet fame from her piece on Brigid Hughes, the second editor of the Paris Review, and how she was erased from the history of that publication by that publication and, among others, the New York Times. She advocates for the remembrance and recognition of women in the arts, especially those who have been edited out. She started a quarterly journal and a bookstore, as a single mom, an American living in the UK.

And if you were not paying attention, while her success might seem as the work of magi, she has made a series of explicit choices large and small that move her to her goal. Choices invisible to all but those who care the most. But as she will tell you – and has told others who make the same assumption – she’s put in the hours building her knowledge, skills, and “brand.” She’s put in the work on her kung fu.

***

This is not the same scale. I’m not shining a light on long suppressed, yet fantastic, women authors. I want to build software that makes life just a little bit easier. I don’t want to disrupt life; I want to help smooth out the bumpy trail so we can all get to where we need to be.

I’ve put in 13 years. I’ve got some skills. My kung fu is not the best. Not yet.

I starting my third week of a 15 week Coding Boot Camp at Flatiron. With the support of my family and an okay from my supportive boss, I am taking Vacation/Leave to learn to code, to add that skill to my set of tools. When I finish, I will be armed with the skills to help me be closer to that kung fu mastery that I wanted to advertise on that cheap business card nearly a quarter century ago.

To some, this may seem like a giant, brave (or insane) leap into the unknown. To all those who love me the most, this is the next, small logical step in my pursuit of happiness and some kick-ass moves.

Filed Under: Made a Hash of It Tagged With: cigarette smoking man, coding, flatiron, kick-ass, kung fu, mulder, ruby, scully, x-files

Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · Log in