PKB, Word, Textedit, Markdown, nvalt and File Portability

I left Evernote. As a result, I'm re-thinking my Personal Knowledge Base (PKB) a.k.a. Personal Knowledge Management (PKM).

As givens, I use a Mac, I share data with my Windows-using wife, and I want to be able to read my documents for the next 50 years. I need:

bash - Remove File Type

I never can remember this:

filename=foo.txt
echo ${filename%.*}

will remove the trailing ".txt". Mnemonic: % sorta looks like dividing two circles. "%.*" says to divide at the period, matching any file type.

I often use a for loop which looks something like:

for f in foo*.txt ; do
    echo ${f%.txt}
done

Keyword fodder: bash, shell script, remove file type, remove file extension, basename, base name, Linux, Unix

Kevin's Table of OpenVPN Keys, Certificates, and Authorities

Kevin's Big List o' Files

Sometimes I run OpenVPN on a Linux server. Sometimes I run OpenVPN on a consumer-grade router with a built-in OpenVPN. Just to be "helpful", they don't use identical terminology. Here's where I keep it straight.

You’re going to need a bunch of files with certificates.  You’ll give some of these to the server, some to the clients, and some you’ll keep secretly filed away. (See also this .)

Certificates, Keys, and Authorities

Certificates

VPNs use certificates and keys. We're going to spend some time building certificates and keys, so we should get clear on what they are.

Build the Keys and Certificates You Need for Your OpenVPN Server and Clients

We're going to use a tool called easy-rsa to build your keys and certificates. You can install easy-rsa on your Pi and run it there, but you only need easy-rsa when you're building keys/certificates -- not when you are using them (and using your VPN). I prefer to build them on my Mac. If you are a Windows user, you can build your keys on a Windows PC, but you'll find it easier to build them on your Pi. Generating keys is slow on a Pi, but it is faster to run easy-rsa on a slow Pi than it is to figure out how to make it work on a fast Windows PC.

Keys, Certificates, Certificate Authorities, are Like Your U.S. Passport

When I found out that my OpenVPN server didn't need a list of valid user IDs, I was nonplussed. How can you have a server without a list of authorized users? Let me draw an analogy...

Use Tasker to Auto-enable VPN on Android

Install and Launch Tasker

  • Download and install Tasker via the Play Store icon on your phone. (It is called "Tasker" and it is by "Crafty Apps EU".)
    • Tasker allows you to create many rules of the form, "If this is the case, do that." You can tell it to run OpenVPN if you are on WiFi and the WiFi has the 'wrong' name.
  • Launch Tasker

Add a "Pause a Few Sec" task

    Install OpenVPN for Android

    • Transfer the ''.ovpn'' file you built for that user from ~/easy-rsa/keys (on the machine where you built your keys -- in my case that is my Macbook at ~/Packages/easy-rsa/keys).
      • Don't copy the .crt or the .csr or the .key files -- just the .ovpn. easy-rsa bundled those other files into the .ovpn for your convenience.
      • This is hard to do on an Android, if you've never transferred a file before.
      • Here are instructions for using a Windows PC to transfer the file. (Of course, you'll have to first put the .ovpn file somewhere on your Windows PC!)

      Install OpenVPN for Windows

      Export Everything From Evernote

      I'm leaving Evernote. Here's a script I wrote to export everything from Evernote.

      Pages

      Subscribe to Input Jam RSS