Converting blog to Terraform & Ansible

Setting up my blog has always been easy. Previous to today, you just had to: Provision an Ubuntu 18 VM somewhere (I’ve been using Digital Ocean) Install Apache and remove its default website Use Hugo to generate the site’s static files and copy them to the VM host Done! But, never being one to sit still, I’ve decided to up my game and move to automatic provisioning with Terraform and Ansible....

2019-10-05

Operating on a subset of lines with sed

Today a coworker posed an interesting question to me. Given a BIG-IP configuration file with thousands of records like this… gtm pool /Common/p_example { members { /Common/2001:668:fc78:0:f811:3ef2:fed7:98cc:vs6_2001_668_fc78_0_f811-3ef2-fed7_98cc-80 { order 0 } } monitor /Common/gateway_icmp } …how can we easily replace every colon in the name : with \\:? In short, /Common/2001:668:fc78:0:f811:3ef2:fed7:98cc:vs6_2001_668_fc78_0_f811-3ef2-fed7_98cc-80 needed to become /Common/2001\\:668\\:fc78\\:0\\:f811\\:3ef2\\:fed7\\:98cc\\:vs6_2001_668_fc78_0_f811-3ef2-fed7_98cc-80. This must only be done on the lines with start with /Common and which also contain the string vs6....

2019-09-11

Using SMS is like Killing Whales for Oil

If you’ve known me for a while, you probably know that I have a soap box. This soap box has “STOP USING SMS” written on the side in red Sharpie. It’s true. I hate SMS/MMS. The protocols are terrible and like hunting whales for oil. (Sure, you could do that, but why would you when there are so many better technologies out there?!) The Pain Points Slow Text messages are slow to deliver....

2019-08-15

Notes on sed

I’ve always been a bit hit-or-miss with sed and haven’t understood it to the level to which I wanted. Today I aimed to change that and these are my notes from sitting down to learn it. Replace a string in a file (first occurrence per line only): cat file.txt | sed 's/oldstring/newstring/' Replace a string in a file (all occurrences per line, i.e., globally): cat file.txt | sed 's/oldstring/newstring/g' Use your own delimiters by just dropping them in place of /:...

2019-06-15

Digital Declutter Reflections

A few days ago, I finished my Digital Declutter Experiment. Here’s what I accomplished: Successfully fixed my leaky kitchen faucet Attempted to replace the burned out lights in my car’s climate control dashboard, but did not succeed. It turns out you have to take apart a ton of the dashboard to replace the tiny light-bulbs which burned out. I spent an hour and a half on it before deciding it was more work than it is worth to me....

2019-03-23

TCL - Part 2

Lists (Continued) Appending to lists is simple with lappend: Note: lappend takes just the name of the list. It updates the specified list, so you do not have to use set. % set list {this is {a list}} this is {a list} % lappend list {more stuff here} this is {a list} {more stuff here} % % puts $list this is {a list} {more stuff here} Inserting into a list is done with linsert....

2019-02-22

Digital Declutter Experiment

I recently finished “Digital Essentialism” by Cal Newport. As part of my resolution to get more value from the books I read, I will be conducting his recommended “Digital Declutter” experiment for the next 30 days. As such, here are the technology rules I will follow from 2019-02-19 to 2019-03-21. The Rules Email My personal email will be checked once per day. I already do this, but feel like it is a useful habit, so I am continuing it....

2019-02-19

TCL - Part 1

I’ve been improving my knowledge of TCL since I’m starting to work with a lot of iRules (which are based on TCL) in my current position. With that said, here’s some notes I took from my latest round of studying and learning. Many thanks to Exploring Expect by Don Libes for facilitating my learning! Getting setup Installing TCL on Ubuntu: apt install tcl Launching the TCL shell: tclsh Variables Setting a variable: set i 100...

2019-02-18

Initial commit

I’ve tried this blog thing before. It hasn’t stuck (probably because I wrote in the style I learned in college.) I’m giving it another shot, but this time it will be much more free form and less academic. I will use this to record anything I find interesting.

2019-02-16