Shaun Abram
Technology and Leadership Blog
Amazon Kindle publisher’s copy limit
One of my favorite ways to read technical and leadership books is on my laptop, where I copy, paste, and summarize (I do this so much, I described a bit more in summaries).
One problem is that I often do this reading in the Kindle app and after a certain number of copy & pastes, I get this:
“You have reached the publisher’s copy limit set for this title.”

And it drives me crazy.
Here are a few workarounds…
Tags: amazon, books, calibre, drm, kindle
Git Notes
These are some git notes I’ve put together over the years. I refer back to these frequently, but there are many better sources for Git docs out there, so use at your own risk!
If you do choose to use, any feedback welcome.
Tags: git
Why use containers?
Containers, and the supporting orchestration platforms, are increasingly popular tools for deploying applications. This article focuses on why you would want to use a container ecosystem. While there are many reasons, including portability and reduced boot times (compared to VMs), this article concentrates on security and cost.
We will focus on Docker, since it is by far the most dominant container, and on Kubernetes, since it seems to have “won” against alternatives such as Swarm and Mesos.
Tags: containers, continuousdeployment, docker, k8s, kube, kubernetes
Kubernetes Admin GUI
docker for mac now comes with Kubernetes support built in to it. It is now the easiest way to experiment with Kubernetes locally (previously, minikube seemed to be the easiest way). This feature was announced at DockerCon Europe in late 2017 and is supported in docker for mac versions 17.12.0-ce-mac45 or later. Note however, you do need to use the Edge version.
When you get Kubernetes running via docker for mac, you can access the admin GUI as follows…
Tags: k8s, kube, kubernetes
Using Docker with a maven project
If you have a maven project, there are a plethora of ways to enable it to run within a docker container.
Tags: containers, docker, helloworld, Maven, mvn, springboot
Post Production Debugging
Monitoring and Observing Your App Post Release
Pre-release tests are essential, but the ability to debug, monitor and observe your application suite post-release is what allows you to detect, and quickly fix, the production problems that will inevitably rise.
Tags: apdex, KPIs, monitoring, mttd, mttf, mttr, o11y, observability, production, SLAs, testinginproduction
JWTs
This post is a quick and dirty introduction to JWTs. Honestly, there are better resources out there to learn about JWTs. See the references section below. These are just some of my own, fairly hastily written, notes…
Tags: jsonwebtokens, jwt, jwts
URL Encoding
URL encoding, also known as percent encoding, takes certain “reserved” characters and standardizes (or canonicalizes) them.
Why? This is normally done when transmitting data in html forms. For example, the # character has a special purpose in html (as an html anchor) and so is converted to make it clear that it is part of that data, not part of the html document where it is to be displayed.
Another (related) use is for prevention of XSS attacks. If your web page allows a user to enter text (for example, a comments box on a blog), it would be very easy for a motivated user to enter malicious text that will be interpreted as a script.
Tags: helloworld, springboot, urldecoding, urlencoding, webdev
Copying keys to a new laptop
If you use GPG (which I have written about before) and start using a new laptop, you will need to copy your keys over.
While it is possible to copy just your personal key, I prefer to also copy other people’s (public) keys too, and my entire trust database. To do this is fairly simple…
Tags: encryption, gnupg, gpg, pgp, security
GPG
I use GPG (Gnu Privacy Guard) for email encryption. GPG is an OpenPGP implementation. If you would like to send me an encrypted email, my public key can be found at https://keybase.io/shaunabram. I also have some keybase invites available, if you are interested.
Tags: encryption, gnupg, gpg, pgp, security
Git rebase
Git rebase can be intimidating for newcomers, but it’s a powerful and versatile tool when you understand it.
Like git merge, rebase allows you to bring the changes from one branch into another. However instead of all those noisy commit merges you get with the merge command, rebase allows a tidier, linear commit history.
Technically, rebasing is the process of moving a branch to a new base commit, but if that isn’t clear, hopefully the diagrams and explanations below will illuminate.
Before we even start looking at rebase though, we will start with a quick review of merging.
alternative to tail -f that allows scrolling: less +F
You can use less +F to start less in its “forward forever” mode. In this mode, less will behave like tail -f, ignoring the ends of files and providing a steady stream of text.
When you want to scroll, press Ctrl-c. To re-enter forward forever mode, press F.
From http://unix.stackexchange.com/questions/81628/is-there-an-alternative-to-tail-f-that-has-convenient-scrolling
sed
sed (stream editor) is an simple but incredibly versatile command line tool that parses and transforms text. It is line-oriented in that it reads the text line by line, transforms it, and outputs the result.
For example, this sed command would replace all occurrences of the text “white” with “black”:
sed s/white/black/g
sed reads text on a line by line basis and performs an operation on it, usually extracting or replacing text snippets. In this case, the s prefix means substitute, and the g suffix means global. Other example usages include:
find
“find” is a unix command-line tool for locating files (and directories). The results can be displayed, passed to another command (e.g. grep, ls etc, see more below), or the find command has its own limited set of actions that can be performed too, such as delete.
Find allows you to specify all manner of search criteria such as name, location, size, permissions, modify date etc. Using regex expressions with those criteria makes it more flexible still.
See the full find manual here.
Tags: bash, find, grep, tools, unix
awk
I think of awk as a tool for searching, manipulating and reporting on text files, but it is in fact an entire programming language. Its basic function is to search files for lines that contain certain patterns, and perform specified actions on that line.
The name awk comes simply from the initials of its designers Aho, Weinberger and Kernighan.
The basic format of an awk command is:
awk pattern { action } file
Every line in ‘file’ matching the ‘pattern’ will have the ‘action’ performed. Either the pattern or action are optional, but not both.
No pattern means every line is actioned.
No action defaults to print.