Filter Podcast Feeds

I’m an avid podcast listener and one of the most annoying things about podcasts is “rebroadcast” episodes and other atypical content slipped into the stream.

I’ve found myself hoping that one day my podcast app of choice (pocketcasts) would implement a filtering feature that would allow me to skip/auto-archive/hide episodes that match my specified keywords. But no.

Well, podcasts are distributed as simple RSS feeds. This means that if I could put a filtering agent in the middle of the RSS feed and my app, I can filter out episodes that I don’t want to listen to.

Well today I stumbled across https://siftrss.com/, which does exactly that.

So all I needed to do was:

  1. Find the RSS feed of a given podcast (I search the pocket casts directory with a Google Search like so: site:pca.st showname)
  2. Set up a filter for that feed on siftrss: I want to "include" items where the "title" "does not match regex" "/(Rebroadcast|Between the Scenes|ICYMI)/i"
  3. Generate the filtered feed (“Feed Me”)
  4. Use Pocket Casts to subscribe to the filtered feed (simply search in the discover section for the full URL of the filtered feed)

Finally!

Linux Drive Mounted as Read-Only

For if your Linux box has some drives that normally automatically mount fine, but suddenly one or more are in read-only mode.

This can happen because a common setting in fstab is “errors=remount-ro” which means that if there are any errors while mounting, remount it in read-only mode. Which is to help prevent data-loss.

To (try to) fix this, first, unmount the drive. Either with umount or by commenting out the appropriate line in fstab and rebooting, which I had to do because although I unmounted the drive, it claimed to still be in use.

Find your disk:

$ lsblk

Run some checks on the drive:

$ sudo fsck -f /dev/sdb1

and (if you have a lot of time)

$ sudo badblocks -nsv -b 4096 -c 65536 /dev/sdb

See this and this for more about the badblocks command above.

Hopefully those run smoothly.

Remount the drive, possibly by uncommenting the appropriate line in fstab and rebooting again.

Confirm the drive is mounted and writable.

Basics of Distributed Source Control – What is A Changeset?

A changeset is how source control systems keep track of changes.  Everything else is built up around these changesets. But what are they?

Quite simply, it’s a difference.  More specifically, a set of differences. What changes have you made since the last time you committed your code?  These differences are saved as text and tracked by the source control tool.

Creating changesets is referred to as a commit

Imagine if you made a change to a document and someone else asks you, “What did you do to it?”  So, you reply, “I added a line that says…” 

That’s similar to a changeset (for a single file – more on this later).  The person you’re talking to takes what they already knew about the document and adds the new information, the change of the new line, and now can picture the new updated document.

This can repeat for many changes.  “I added another line that says …”  And now the person you’re talking to takes the original document, plus the first change, and also plus this new change, and the final version of the document is known.

If you kept track of these changes, you’d be doing the basics of what a source code repository does.  Consider the following timeline:

  1. Original Document
  2. Add paragraph ABC…
  3. Add line … to paragraph ABC
  4. Change introduction from A to B

You can then answer the same question for each point in time and get a different result: “What is the state of the document at change number X?”  Each time, you start at #1 and add up the changes until you get to the desired point in time.

For a Single File?

Earlier in this post, I said that the document scenario was essentially a changeset for a single file.  But a changeset can be a set of changes all at the same time.  Consider the same document editing scenario, but for multiple documents.  “I added a line to doc A, and I deleted a line to doc B”.  Both of those changes can be saved at the same time in a set, a changeset.

This is the first of a planned series on using distributed source control.  More to come in the future.

Graphing Podcast Networks

I love podcasts.  I listen to them every day.

When I’m looking for more podcasts to listen to, one of my favourite resources is the iTunes website.  The reason for this is because iTunes offers a “listeners also subscribed to” section at the bottom of a podcast’s page.  I can instantly find similar podcasts to any given one.

For example, a great podcast is “Radiolab Presents: More Perfect”.

And if we jump to the bottom of the page, we’ll find five popular podcasts that appeal to the same audience…

We need to go Deeper

Picking one of these naturally takes you to its page and at the bottom again you’ll find yet more podcasts.  So what if we keep going down and down?

Going a mere three levels will get us to 155 podcasts.  Many will be duplicates; for example in the image above there’s Embedded *2, Invisibilia *2, Reply All *2, etc.

Visualizing It

What happens if we crawl this tree of podcasts and graph the connections?  Well, going three levels deep on the podcast “The Vergecast”, we can generate a network that looks like this:

And if we go five levels….

Now what’s really fascinating is the natural clustering that becomes visually apparent.  It makes sense that it would happen but these islands of genres and sub-genres are neat to look at.  Here are a few that jumped out at me, professionally highlighted with Paint:

It’s a fun way of looking at it.

Avoiding Email Scams

Being one of the more technologically capable members of my social circle, I am often asked if a specific email is a scam.

Usually it is.

But what if it seems real?  What do you do if that email honestly feels legitimate?  Well, I’ve been thinking about how to simplify my own rules and actions into general “rules of thumb” for others to easily understand and follow.

Here’s what I’ve got:

  • Is the email unexpected?
  • Get the URL / contact info with Google
  • Google the email itself

Let’s break these down.

Is the email unexpected?

Let me explain this with a couple examples.  If you go to a web page and click “I forgot my password,” I imagine the subsequent “password reset” email is fairly unsurprising.  It’s safe to say that this is not a scam.

Alternatively, let’s say you’ve simply been enjoying your day, doing cartwheels and whatnot, and then you get a “password reset” email.  Here, most likely, someone else is is trying to reset your password, or it’s a scam.  The link may take you to a fake (but identical looking) website, asking you to put your old and new passwords.  You’ll then be handing your password over to whoever runs that site.

If an email is spontaneous, if you weren’t expecting it, there’s a very strong chance that it’s a bad email that means you harm.

But is it possible for an unexpected email to be legitimate?

Yes.

That is the point of email after all, to notify you of things.  Sometimes those things require actions on your part.  Perhaps the site has suffered data loss due to a hack, and wants everyone to change their password.  Well, when something like this happens, consider my next rule of thumb.

Get the URL / contact info with Google

It doesn’t have to be Google, of course.  Feel free to use Ask Jeeves or… Bing.  But the spirit of this rule is to only allow the email to serve as a notification; don’t let it help you accomplish the task.  If it supplies a handy link to take you somewhere, don’t use it.  Pretend you deleted the email accidentally, but still want to do what it said.

Maybe that means going to the website manually and finding the option to reset your password.  Or, maybe that means googling for the contact info, calling, and asking about it – do NOT use a phone number supplied in the email.

The point is that by doing this you’re now doing something outside the control of the scammer. The whole mission of the scam is to scare you into clicking their link or calling their number.

Google the email itself

Another tip is to Google parts of the email.  Often this will take you to discussions about the very same email.  Reading through what others have to say can help you to determine if it’s a harmful email and even help you gain some insite as to how others know.

Hopefully this post can help even just one person avoid even just one scam.

Sharing a Hotel’s Single WiFi Connection Between Two Phones

I recently visited a resort on vacation.  Overall, it was pretty good.  Except for a couple things, like when the entertainers really wanted you to participate in something embarrassing.  Dancing on stage is not my idea of a relaxing vacation, Mia!

Anyways, another not-perfect reality of the resort, was the WiFi.  When we arrived, we found out that the WiFi was not free, and not only that, it was fairly expensive.  $12/day.  Per device!

The per-device restriction was maintained with a captive portal of some sort.  You purchased a username and password to log into the network.  Attempting to use it on more than one device would yield a message along the lines of “maximum sessions exceeded”.

The way to get around this, is to turn one of the phones into a router, of sorts.  It’ll be the main phone responsible for connecting to the WiFi, and sharing this connection with another phone.  The network will just see this as a very busy singular phone.

What you want to do, is use Bluetooth tethering.  And it’s pretty simple to set up.  The below instructions are for Android phones.  I don’t know how they differ or if it’s even possible on iPhone.

  1. Go to the Bluetooth settings screen on both phones and pair them to each other.
  2. On the master phone (the one that will share the connection) find the settings screen “Tethering & portable hotspot”.  In this screen:
    1. Enable “Bluetooth tethering”
  3. On the secondary phone (the one that will connect through the other phone) go to the Bluetooth settings screen again and:
    1. Click the gear icon beside the phone – in paired devices.  This is to manage the settings of the connection.
  4. Check the box “Use for: Internet Access”

That’s it!

Cons

This method is not perfect.  I found it a little finicky.  Sometimes the phones refused to connect to each other, the connection was really slow for the secondary phone, and if the phones got too far apart they would not reconnect automatically upon getting close enough again.

But it was much better than paying an extra $12/day.

Maven – Exclude Resources From Jar

A project I was working on recently had some… interesting packages in the source code.  There was a test package, a config package, and a notes package.  By placing these non-source items in the source folder, they were being included in the final jar that maven would build.

The ideal solution here is to move these packages to more appropriate places, such as a test source folder, a relative config folder in the application’s root, and maybe a private wiki for the team, respectively.

However, not even having enough time to do the work I was assigned, I decided I would at least prevent these items from cluttering up the jar, and I would return to move them properly at a later time.

You’ll want to use the maven-jar-plugin, and configure excludes as absolute package paths:

<plugins>
   <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <version>2.3.1</version>
      <configuration>
         <excludes>
            <exclude>test/</exclude>
            <exclude>config/</exclude>
            <exclude>example/package/path/notes</exclude>
         </excludes>
      </configuration>
   </plugin>
</plugins>

Switching Keyboard Layouts in Windows 10

Adding a New Layout

1. In Control Panel

Use the search box and search for “input”.  Choose “Change input methods”change-input-methods

2. Click “Options”

input-methods-options-link

3. Click “Add an input method”

input-methods-add-input-method-link

4. Search for Your Desired Layout, Select It, and Click “Add”

input-methods-search-and-choose-new-one

5. Click Save

Switching Between the Layouts

The new layout isn’t activated automatically if you left the old layout configured as well.  You can switch between the two by clicking the language menu near the clock.

change-input-methods-afterwards

Sudo on Debian

Sudo Not Installed?

The fix – getting sudo to work – is at the bottom.

When you use Debian for the first time, you may have quickly run into this:

Debian_sudo_not_found2

bash: sudo: command not found

This happens if, during the setup process, you provide a root password.  The Debian installation will install sudo if you do not specify the password.

debian-8-install-root-password

Notice, in the last paragraph of the above dialog:

If you leave this empty, the root account will be disabled and the system’s initial user account will be given the power to become root using the “sudo” command.

And, here is a relevant portion from the installation guide for Debian 8 Jessie:

By default you are asked to provide a password for the “root” (administrator) account and information necessary to create one regular user account. If you do not specify a password for the “root” user this account will be disabled but the sudo package will be installed later to enable administrative tasks to be carried out on the new system.

So, if you do specify the password for the root user account, the sudo package will not be installed.

Using sudo

To add sudo, all you need to do is:

1. Open a terminal and change to root
2. Install sudo

apt install sudo

3. Add user to sudo group

usermod -a -G sudo matthew

4. Have the user log out and back in.

That’s it!

Ubuntu – Automatically Connect to VPN on Boot (Without Keyring Prompt)

This post assumes that you have set up a VPN connection on Ubuntu already that you are able to use, and will show you how to make that connection start on boot.

First, the easy step; tell your existing connection to automatically connect to the VPN:

  1. Open up “Network Connections”
  2. Highlight your default network connection
  3. Click edit
  4. Choose the “General” tab
  5. Check the box “Automatically connect to VPN when using this connection” and choose your VPN connection
  6. Save

automatically-connect-checkbox

Stop the Keyring Prompt

At this point, if you restart your machine, you’ll be prompted to enter your keyring:

unlock-login-keyring

To make this go away on boot, navigate to /etc/NetworkManager/system-connections and look for a file named after your VPN connection.  For me, it was “pia-toronto(openvpn)”.  In this file, make two changes:

  1. Under the “[vpn]” section, remove the “password-flags=1” line.
  2. Add a new section, “[vpn-secrets]” to the file with your VPN account password underneath it:
[vpn-secrets]
password=my_vpn_password

And now you should be good to go.