Vim’s Red Pill

I started this foray into Vim a few days ago. I’ve been talking with folks on
Mastodon.technology about exploring Vim and inspired by their learning and
exploration of this application that has been around publicly since 1991.

Vim is just a plain text editor, it’s ubiquitous on a lot of Linux and Unix
based operating systems, and less so on others. While I was in college the
professors in computer science were very fond of Emacs, so I sort of remember a
bit about Emacs and that I didn’t know Vim at all, nor did I really care for
it. Now that I’m older, I’m looking for new things to learn and Vim is quite a
good challenge for that.

The Learning Curve for Vim Resembles The Cliffs of Insanity

Learning this editor is a sheer climb straight up, on an imaginary learning
curve. There is very little that anyone who comes at Vim without any knowledge
of it will be able to understand. You get a little motd blurb on a blind open
with the name of the application and its version detail. You can’t really write
anything into the screen until you accidentally hit a command for getting into
the — INSERT — mode, like A, O, or I, or the lowercase equivalents. Over time
you start to accumulate more skills and you rely on the cheatsheets a lot less
than you were at the start.

Once the learning is done, then you start to move forward with the
customization part of the application. Vim is improved by plugins that enhance
or sometimes detract from the core use of the application. If you can get a
plugin to work, that is. Sometimes they just don’t, and there isn’t any clear
way to force the issue. Much of the plugins now live on GitHub, and sometimes
your mileage may vary when you are looking for help. For example, one plugin
which is for autocompletion at first seemed to be exactly what I was looking
for, but the fit wasn’t right for me. There is nothing on GitHub, for that
project, that even mentioned Q&A or anything like that. One thing that I have
learned is that sometimes when you add plugins to Vim, they can get “stuck” in
the Session system which forces you to dump your session details and start from
scratch. But once I was happy with how everything came together, it is a very
powerful editor.

Once You Pop A Red Pill, You Can’t Stop!

The first foray into Vim starts with editing. Then I started to look at some of
the other things that this editor could do. I fiddled a bit with Markdown, that
went well, and then afterwards I moved on to installing the Mutt mail
application. I have dwelled, perhaps malingered at Mac OSX Yosemite so when I
started to look into Mutt on my Macbook Pro, the Homebrew system complained a
lot about how some things would likely be broken because I was unwilling to
install the latest and greatest version of the Mac OSX operating system.
Everything worked out for the best in the end, and I got Mutt working for both
my Gmail account as well as my Office365 Hosted Exchange account at work. As a
funny side note, Mutt works well with IMAP servers however there was a bit of
skullduggery with the SMTP authenticator settings. For Mutt, this is the
general plan for a standard IMAP .muttrc file:

set ssl_starttls=yes
set ssl_force_tls=yes
set imap_user ='username@gmail.com'
set imap_pass = 'password'
set from='username@gmail.com'
set realname='First Last'
set folder = imaps://imap.gmail.com/
set spoolfile = imaps://imap.gmail.com/INBOX
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set header_cache ="~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
set smtp_url ='smtp://username@gmail.com:password@smtp.gmail.com:587/'
set move = no
set imap_keepalive = 900
set smtp_authenticators = 'gssapi:login'
set signature ="~/.mutt/gmailsig"
unset sig_dashes

While the last bit, for smtp_authenticators simply won’t work with Office365.
To get that to work with Mutt, you’ll need this line in its place:

set smtp_authenticators = 'login'

Once I was able to get all that figured out, I then had another way to see my
email, through the Mutt email client. It wasn’t until this point, after being
able to login and logout, and receive new email and send new email that I
looked over my email to discover that almost all of it is HTML encoded. Which
makes reading it a headache in Mutt. But that wasn’t the point! The point was,
Mutt helped bring Vim closer to me. I may use it, or I might not. The HTML is a
definite headache so it’ll die a slow death because of HTML.

Distraction Free Writing

Vim’s editing powers are one part of it, the other part is the sheer speed and
usefulness of the application. There are a lot of systems that I use that seem
to have these little lags for text entry, like the system is always a few
microseconds behind registering what I want to do, which when typing in text,
is to do just that. It’s only slightly present on my Macbook, but often times
very present in apps on my iPhone. I’ll never know why user text input isn’t
the number one thing for any device to do first. Everything else can wait, be
put aside, but my typing? That should take top billing each and every time! So
with a full-screen iTerm2 screen, Vim is almost a killer app for distraction
free writing. I like line numbers on the side, and margins on either side, so
for me, this is almost a perfect arrangement. Plus the cost can’t be beat, Vim
is free. Another big draw for me is that Vim should be useful still even on
very low-powered computers, if it turns on, if it can run Linux (or Mac, or
Windows even) then it can run Vim.

Where Do We Go From Here?

We’ll see where I take Vim in the weeks to come. There is a lot of travel
coming up for me and I expect I’ll be doing a lot of blogging during it.
Writing everything out in Vim, saving it as Markdown, and then importing it
into WordPress. I suppose I could very well just email it into my blog as well,
we’ll have to work on that workflow in the future. Maybe I’ll find a WordPress
installation that works and be able to leverage Vim more directly with that
system. We shall see.

Derailing Robocalls

If you have an iPhone as your mobile device, you can set up a foolproof filter for pretty much all Robocalls, unwanted solicitations, or anything else that bothers you with multiple calls on your mobile phone.

The first step is to create a Voicemail Greeting that lets people know that they have to introduce themselves with their numbers first, and then once they exist in your Contact List, then your phone will ring and you might answer it. If your callers don’t know, then they will never get through.

The second step is to make sure your Contact List in your iPhone is as up-to-date as you can make it. Trim out any junk, do your best to de-dupe the list, get it so it is nice and tidy.

Third step is to go into Settings, then to Do Not Disturb settings, Turn Do Not Disturb ON, set Schedule if you want it off, although I just leave my phone on DND permanently. Silence Always, and in the Phone section, “Allow Calls From” and set that to “All Contacts”. Turn Repeated Calls off, and any other setting is your personal preference.

When inbound calls arrive, they will be checked via their Caller ID presentation with your Contact List. If they don’t know which number will match in your Contact List, then your phone will never ring. It will obviously ring for the caller, until they arrive in Voicemail, and then they leave a message introducing themselves, which is after all, a civilized way of using these devices. If you met someone IRL, then you’d have to create a contact for them in order for them to ring your iPhone.

If you have any other iOS device, like an iPad, you should configure that the same way as your iPhone so when it is connected over Wifi it doesn’t ring the way you don’t want it to.

After that, you won’t get any more inbound calls unless they are from your Contact List. No fuss, no muss.

Cisco AMP for Endpoints

Several months ago we bought into Cisco AMP for Endpoints. There was a lot of work right after that, so we set up the management account and put it aside. Months later, I felt a little awkward about it, so I thought I would devote my April to Cisco AMP for Endpoints.

I just uncorked my AMP for Endpoints account, for this post and going forward, when I write AMP, I mean Cisco AMP for Endpoints, because it’s a mouthful. AMP itself seemed forbidding and difficult, but then once I started working with the site, configuration wasn’t that bad. I decided to test AMP in my environment by starting a “Factory Fresh” copy of Windows 7 32-bit in VirtualBox on my Mac, with 4GB of RAM assigned to it. A standard humdrum little workstation model.

I downloaded a bunch of starter packs, including the “Audit” model, the weakest of them all. I installed it on the workstation and the site responded well enough, noticing the install. As I was working with the system, I noticed that AMP complained that the definitions were out of date on the client, so I went hunting for a “definition update” function. There isn’t anything the user can trigger, you have to wait for it. Oh, that’s not good.

So then I had AMP on the test machine and I thought I would try to infect it. So I found a copy of EICAR, which is a sample file that all these technologies are supposed to detect and find hazardous. Symantec Endpoint Protection (SEP) sees EICAR well enough, and really gets upset by it, immediately stuffing it into Quarantine and sending an alert. AMP also detected EICAR and because it was in Audit mode, just sat on its hands. Which I expected.

So then I found a bunch of sample malware files on a testing website, because while EICAR is useful for basic testing, it’s as relevatory as a knee-jerk reflex. It’s nice to know there is a reflex, but it’s not the same as an actual malware infection. I opened the ZIP file, typed in the password and all these malware samples came spilling out into the downloads directory. So, a workstation that is quickly becoming filthy. That’s my use-case for AMP.

So after “infecting” the computer with the files, and the tamest model, which is just to have them in a folder, I went to AMP and told it to switch the model on the test machine from Audit to Triage. That took almost twenty minutes! Are you for real on this, Cisco? Twenty minutes!!!

So I knew what I had on this workstation, but I pretended that I was the admin on the other side, with an unknown workstation connected, reclassified with Triage and waiting. I knew that the computer was infected, and as the admin, “not knowing what is going on” with the endpoint, I sent a scan command. This is the worst case scenario.

On the AMP side, I didn’t see anything at all. I panicked around looking for any hint that the AMP system recognized my scan request, and so I sent five more scan requests. Obviously, one scan request should have done it, but I wanted to make sure that I worked around even an imaginary screw-up in Cisco over scanning. Nothing. Workstation just plotzing along, infected files just sitting right there in the Downloads folder, just waiting for double-clicking end-user to make a tame infection a wild one.

Obviously this is the worlds worst scenario, one were SEP somehow is gone, not installed, or somehow lost its marbles, leaving AMP on its own to run defense. Scan! Scan! Scan! — Nothing at all. AMP just sits there just merrily SITTING THERE. Like shaking a coma patient, is very much what it felt like.

So then I started with the Help feature, request help, okay, I knew how this would go. This would lead to TAC. God help me. Cisco’s system didn’t know what AMP was, hahahahaha of course not. But there was a chat system in a teeny tiny little button, so I tried that. Someone! Hallelujah! They found my contract and linked it up, and started a case for me. When I went back to the test system, AMP had done it’s work. FINALLY. It only took twenty minutes! A lot can happen in twenty minutes. How many files could have been ransomware-encrypted in those twenty minutes?

So now I await a response from Cisco TAC. During the chat I declined the entire phone call angle since Cisco TAC people cannot speak English, or at least, I cannot understand their speech. So I told them that I would only communicate over email. So lets see what TAC has to say. We spent a lot of money on this, so obviously I’ll likely deploy it, but man, I am sorely disappointed in a system where every second counts. On reflection, Cisco AMP for Endpoints was probably a mistake.

Strategy to Inbox Zero

Earlier in the week I had talked to a friend about my unmanageable email pile in my Inbox, about 78 pieces of email just sitting there, dwelling on the edge of my consciousness and weighing on me. Is there something there that I should take care of? Did I miss something important? So I started to chat and to do some research.

There are many strategies out there, and I adapted them for my own use, and so far it has worked out marvelously well. Here’s how I process my email:

  1. Create sorting folders. I created a host of new subfolders in my work email account which runs under a hosted version of Microsoft Exchange. Because folders sort alphabetically, I forced the sort using number indexes and dashes.
    1. 1-Email Management
      1. 1-Today
      2. 2-This Week
      3. 3-This Quarter
      4. 4-FYI
      5. 5-Toodledo
      6. 6-Done/Sort
    2. 2-Help Desk
    3. 3-To Evernote
    4. 4-Barracuda
    5. 5-Syslog Alerts
    6. 6-ATP
  2. Then I sort the Inbox into the “Email Management” folder structure. If something has to be done today, it goes to 1-Today, and so on and so forth. My first consideration is the due-date for the item in my Inbox. If the item is purely informational, it goes into the 4-FYI box.
  3. I have rules set up in my email application, which happens to be Apple Mail. If I get email from Toodledo, my favorite To-Do system, they are moved into that folder. Anything from my Spiceworks Ticket sytem ends up in the 2-Help Desk folder. The messages from my Barracuda backup appliance end up in the 4-Barracuda folder, all my incoming Kiwi Syslog alerts end up in 5-Syslog Alerts, and finally the Advanced Threat Protection from Hosted Exchange reports get filed in 6-ATP. Rules are a huge part of keeping your neck above water when it comes to emails. There are a lot of purely informational emails that have zero urgency and very low importance, you want to keep them to go through them, but they don’t need to clog up your Inbox. Rules can help you sweep a lot of these away automatically. Always flag your junk mail, review that occaisonally to drag it for any false-positives.
  4. If an item is a request for help from work, and it didn’t come in as a ticket originally, those need to be pushed into the ticketing system. Thankfully Spiceworks allows you to forward emails into the ticket system by sending forwarded mail to whatever mailbox you’ve configured for the Spiceworks system. There are a litany of hashtag controls you can place in the email body to configure how tickets are arranged. My Cisco CUCM system is configured to also kick voicemails to me as attached MP3 emails, if they are requests for help, they likewise end up being forwarded with some extra flavor text to stomp down on confusion.
  5. If an item isn’t help, is urgent, is rather important, and has a clear date and time I will forward the email to my Toodledo using the configured email address on that system. Toodledo has a flag system that works on the Subject line. My preferred method is to alert people to events, include Toodledo as a BCC addressee, and then add at the end of the Subject line this text fragment: @work :1 day #{duedate} where the field duedate is whatever the date is that is relevant. Send it, forget it, it’s in the Toodledo list.
  6. The next step is to cycle through folders in Email Management, starting with Today and then reviewing all the rest. The Today folder is the action items that can be done today, or are due today. After completion, simple things are thrown away, but anything more elaborate or anything that touches on CYA gets sorted into the 3-To Evernote Folder.
  7. Evernote is a bottomless notekeeping system that I also use, and I leverage Evernote as a destination for all my CYA emails, and each quarter the extracted Sent Items from my Exchange account. I don’t trust Microsoft at all, I’d rather keep things in Evernote. Microsoft has a 50GB quota, Evernote does not have a quota. At the end of each week, I have a “Sharpen The Saw” task in Toodledo that I run, and a part of that is running along the structure in the 3-To Evernote folder, which includes all the emails across the branches of the company I work for, and all the vendors I have relationships with. Every Quarter, I search for all the emails for the previous block of time, soon Q1-2019 will be over so I search for all Q1-2019 emails and also move them into Evernote.
    1. The Evernote move is accomplished in two steps. The first step is to extract all the attachments out of the emails in my Exchange account, I use Mac Automator for that purpose, and here’s how it’s configured:
      1. Get Selected Mail Messages – Get selected messages.
      2. Get Attachments from Mail Messages – Save attachments in: “Attachments”
    2. I then run the Automator workflow, and all the attachments are put in a folder on my Desktop called Attachments. I then bulk rename them with their folder, a date such as 20190301 (YYYYMMDD), and then select them all and drag them into the right notebook in Evernote.
    3. Then I highlight all the relevant emails in my Mail App that I intend to send to Evernote, and I have created a General Service in my Mac called “Send To Evernote” which is actually another Automator Workflow, called “Send To Evernote.workflow”, that has this content:
      1. Run AppleScript:
        1. on run {input, parameters}
           -- Slightly modified version of Efficient Computing's AppleScript: http://efficientcomputing.commons.gc.cuny.edu/2012/03/17/copy-email-message-in-mail-app-to-evernote-applescript/
           tell application "Mail"
            --get selected messages
            set theSelection to selection
            --loop through all selected messages
            repeat with theMessage in theSelection
             --get information from message
             set theMessageDate to the date received of theMessage
             set theMessageSender to sender of theMessage
             set theMessageSubject to the subject of the theMessage
             set theMessageContent to the content of theMessage
             set theMessageURL to "message://%3c" & theMessage's message id & "%3e"
             --make a short header
             set theHeader to the all headers of theMessage
             set theShortHeader to (paragraph 1 of theHeader & return & paragraph 2 of theHeader & return & paragraph 3 of theHeader & return & paragraph 4 of theHeader & return & return)
             --import message to Evernote
             tell application "Evernote"
              set theNewNote to (create note with text (theShortHeader & theMessageContent))
              set the title of theNewNote to theMessageSubject
              set the source URL of theNewNote to theMessageURL
              set the creation date of theNewNote to theMessageDate
             end tell
             -- move the email message to archive and make it bloody obvious
             set background color of theMessage to blue
             set acc to account of mailbox of theMessage
             move theMessage to mailbox "Archive" of acc
            end repeat
           end tell
           return input
          end run

           

      2. It takes some time, but it efficiently moves the text parts of the emails selected into Evernote, using my default Notebook, called IN BOX.
      3. I select everything in the Evernote notebook IN BOX and move it to where it has to go, the destination notebook within Evernote itself. The messages all end up in the Archive folder, so then after that I hunt them down and delete them out of Exchange. Then empty the trash out of Exchange.
  8. In the end, I have a very slim Exchange account, a well fleshed out Evernote data store where I can search for all my email CYA details that I might need later on, and it also works on the web and over mobile apps as well. It’s very handy.
  9. It only took me a little while, maybe an hour tops to sort my Inbox and get to Inbox Zero. Then the cycling through the subfolders helped give me a handle on both urgency and importance, and I have a far better sense that I am actually on-top of my emails.

 

Whiteboard Secure?

The first time you start to involve yourself in cryptography you start on a path to suspicion and paranoia. Nearly every discussion about cryptography involves two example parties, Alice and Bob. Alice is always trying to keep secrets from Bob, and these two characters are used to illustrate everything from public key cryptography to man-in-the-middle attacks, and a lot more than just these examples as well.

This entire line of reasoning starts to kindle thoughts about how you go about your everyday life and just how much of your personal data, your privacy, your secrets are all leaking out around the edges. For all the efforts of your own personal Alice, there is a Bob out there, maybe, trying to dig up things you aren’t watching over or never expect.

A portion of cryptography, or more generally espionage in general comes down to the things you leave behind. Some folks think that strip-shredding sensitive papers is enough, while others consider upgrading to crosscut shredding to be the gold standard. For really sensitive papers, I personally have considered the only really effective way to prevent them from being reassembled is through burning and beating with some sort of implement to mix up the ashes. All this is to prevent information from leaking out where you never intend for it to leak out from. A big part of this, and in a lot of film noir detective stories, is phone numbers or passwords written on sticky notes or on a notepad. Sometimes people will write something down on a series-bound stack of papers with something like a ball-point pen, because it’s handy. The ball-point does put ink on paper, but it also can emboss paper below the sheet you are working on, and with a gentle swipe of pencil graphite, the ghost of what was written re-appears.

While I’ve been working at my desk, I got to thinking about convenient surfaces that I could take notes on, which would be handy and easily erased and reused. A while back I stopped at the dollar store and got a nice little whiteboard and a selection of dry-erase markers. Super cheap, super convenient. The whiteboard has proven to be very convenient and useful in my workplace and for $2, a non-issue when it comes to the pricetag. It struck me that this cheap cardboard and plastic whiteboard assembly could also be a very secure way to write temporary notes, say banking details for example. I can write a whole line of values and account numbers, passwords, whatever I like and with a swipe and rub of an eraser rag, whoosh, all of the details are gone forever. As I examined the whiteboard and considered this, I thought of ways that the wiping process could be reversed. There is no embossing onto a lower layer to worry about, and there doesn’t appear to be any order of anything at all on the surface or the wiping rag. So I would at least think on the outset that a whiteboard makes a very fine and secure temporary notepad to write anything on, because once wiped off, perhaps also with alcohol or Windex just to be very careful, I can’t imagine there is any way to unwind the clock on the erasure process. No way to get back what was written.

Now there is no application for this sort of security in my life, other than perhaps writing down account numbers, my SSN, or perhaps the password to some sort of system here at work, but if you are looking for a way to write temporary notes and not have to worry about security – a whiteboard at the dollar store certainly seems to be a solid approach.

C2E2: Will I Be On Camera?

Spotted this gem this morning. There’s something in the tall grass here at C2E2:

The paragraph covering “Will I Be On Camera?” has us scratching our noggins. What does it mean? It could mean facial tracking technology and data sales between customer flow in the exhibitors hall and their subsequent selections on the app for their fandoms. And since all our demographic data is online with ReedPOP, the managing company, they’d have to be dullards to not take advantage of this in all the ways I can think of. So, pinnacle of corruption and deep-cut privacy violations galore! But hey, we all accepted it and frankly my dear, nobody cares or even is worried over it. So I am going to be, in perpetuity (heh heh) the only Watchman shaking his canary cage.

It’s all good. I expect nothing less. Companies are corrupt, all the way to the core. That’s what they are. That is their basic nature. Paging Marcus Aurelius, and Dr. Lecter.

Moo goes the cow. Baa goes the sheep.

Boeing as Microsoft

https://arstechnica.com/information-technology/2019/03/boeing-sold-safety-feature-that-could-have-prevented-737-max-crashes-as-an-option/

Ars wrote an article about the 737 Max aircrafts safety system gap. Boeing made a key function for safety an expensive add-on. God, that smells like a Microsoft joint, doesn’t it? Hahahahahaha. Make your flight choices clear when you buy tickets: I don’t want to fly on Boeing aircraft.

And then, in related news, a touch of quid pro quo between Nikki Hayley and Boeing, too. https://www.seattletimes.com/business/nikki-haley-nominated-for-board-seat-at-boeing/

Hilarious.

Perfect

Aside

Finally found the perfect recipe for poached eggs for my morning breakfast. An English muffin, toasted. Then a smear of Kerrygold Butter. Then the eggs. I suppose you could call it a firm poach. I have little silicone poaching cups I got for Christmas years ago, a little spritz of nonstick spray. Then put those in ceramic ramekins, put those in the Instant Pot, a cup of tapwater, seal. High pressure for 7 minutes and 7 minutes of NR, then a QR. Put the eggs on the buttered muffin halves and a little scratch of pepper and salt. Perfect. The yolk is just ever so accidentally runny, but right on the edge of being set. Perfect.

Wrong Again Amazon

Aside

So, Amazon shipped my Reuzel Beard Balm and… WRONG AGAIN IN THE SAME WAY. So instead of sending out another tin which is wrong, they want me to ship it back. LOL. Fucking Amazon, man. And this is the dark side of Jeff Bezos’s company. Top notch work you fucking dullards.