(#1) Programming is like...

06/30/2017

To be garbage collected player

Garbage collection is like if in basketball, coaches can substitute players by simply introducing the new player into play but the replaced player can remain on the court. You assume they won’t move or touch the ball or interfere with other players. And then every 5 minutes, the referees yell “FREEZE!” to check every player and sit out the ones that were substituted.

Active players

Troubleshooting Snap on Ubuntu Core

06/18/2017

I got started with Ubuntu Core on the Raspberry Pi and I had some problems (nothing major) starting with snap on Ubuntu Core. Here are some quick resolutions:

  • is the snap daemon on? Restart the service with service snapd restart
  • errors installing snaps? Did you login? Do snap login

Multicast DNS on Ubuntu Core

06/17/2017

Are you setting up a host with multicast DNS (mDNS) on Ubuntu Core?

There are some posts out there 1 2 3 about people trying to get mDNS on their Ubuntu Core. But avahi-daemon is now available as a snap for Ubuntu core.

Multicast DNS and Hostnames with Underscores

06/12/2017

Are you setting up a host with multicast DNS (mDNS) but you can’t seem to reach it?

Are there underscores in your hostname?

avahi will discard underscores if they are present in the hostname.

my_host_name == myhostname

ping myhostname

The Complete Raspberry Pi Start Up Guide

06/09/2017

Follow these steps to quickly start up your Raspberry Pi.

1. Wire into the Raspberry

  1. Connect microUSB for power.
  2. Connect USB keyboard.
  3. Plug in the microSD (with OS already installed).
  4. Plug in HDMI to Display.
  5. (optional) Connect USB mouse.

Artist Rendition of Raspberry Pi

2. Change the default password for the pi user.

  • Enter command

    $ sudo raspi-config

  • Navigate to the Change User Password option.
  • Follow the on-screen instructions to change the password for the pi user.
  • This is probably one of the simplest things you can do. Many people leave the default password and when they expose the Raspberry Pi to the world, bad things happen.

3. Expand the filesystem to full capacity of the microSD.

  1. Enter command

    $ sudo raspi-config

  2. Navigate to Advanced Options.
  3. Select Expand Filesystem.
  4. Follow the on-screen commands. You’ll be asked to reboot.

4. (optional) Enable ssh

  1. Enter command

    $ sudo raspi-config

  2. Select Interfacing Options
  3. Navigate to and select SSH
  4. Choose “Yes” to enable ssh.
  5. Select “Ok”
  6. Choose “Finish”

5. (optional) Connect to Ethernet/Wifi

  1. Ethernet: easy, plug in an Ethernet cable to the Ethernet port.
  2. Wifi: add the network configuration to wpa_supplicant.conf
    1. Enter command

      $ sudo vi /etc/wpa_supplicant/wpa_supplicant.conf

    2. Add entry

       network = {
         ssid="The_SSID"
         psk="Your_wifi_password"
       }
      
    3. Enter command

      $ sudo wpa_cli reconfigure

    4. More info

6. (not optional if you activated ssh!!!) Secure SSH:

  1. Edit file

    $ sudo vi /etc/ssh/sshd_config

  2. Do not allow root ssh (add/modify line to “PermitRootLogin no”)
  3. Limit user logins (add/modify line to “AllowUsers [username1] [username2] …”)
  4. Disable protocol 1 (Only have an entry for “Protocol 2”)
  5. (optional) change default port (add/modify line to “Port [some number]”)
  6. (optional) filter SSH at firewall a.k.a. only allow certain IP addresses to SSH
  7. Use public/private key for authentication
    1. Move public key over
  8. Now disable password authentication (“PasswordAuthentication no”)
  9. Restart the ssh service

    $ sudo service ssh restart

  10. More info

Artist Rendition of Raspberry Pi Logo