Image for post
Image for post
Turn macOS Command Line Tools off and on again to fix compilation related problems after an OS upgrade

TL;DR: Do not install Xcode, just do a fresh install of Command Line Tools

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

The macOS Command Line Tools were a welcome change for macOS users that previously had to install the entire Xcode application just to be able to compile software on their machine. The problem is that sometimes after a major OS version upgrade, things don’t work so well.

In particular, package managers for various languages will start failing because they are unable to compile software as part of installing or upgrading third-party dependencies.

Why xcode-select --install is sometimes not enough

To be honest, I don’t know why this is. It should be, but the crux of the matter, is that running xcode-select --install is meant to fix these compilation issues, but often, it doesn’t, as it will tell you it already exists, and the OS doesn’t know what to do beyond that. …


Image for post
Image for post

Installing the JetBrains Mono font on macOS Catalina for Microsoft Visual Studio Code is a straight-forward 5 process:

1. Download the font from https://download.jetbrains.com/fonts/JetBrainsMono-1.0.0.zip

2. Unzip the contents, select all fonts in the JetBrains Mono folder, then right-click and select Open With > Font Book.

3. Click the Install Font button.

4. In Visual Studio Code, open preferences (⌘,), then under Text Editor > Font if using the settings UI or editor.fontFamily if editing the JSON directly, insert ‘Jetbrains Mono’ (include the single quotes) as the first item in the list.

5. Save, and you should see the font changes reflect immediately.


Image for post
Image for post
Credit: https://gophercon.com/

Sourcegraph, known to our Developers as “a great source code browsing/discovery tool, especially for large codebase like k8s”, and “like Google’s internal code search but for rest of us”. We help developers write better software by giving them IDE like features in code hosts such as GitHub and Bitbucket server, both for Open Source and private repositories.

We’re proud to once again be hosting the official liveblog for GopherCon so we’re looking for attendees who want to contribute. Is that you?

About liveblogging

Liveblogging is hugely beneficial for the presenters, the bloggers, and those reading them.

It’s about capturing the most important parts of a talk so people from all around the world can follow along and learn. …


Image for post
Image for post
Credit: https://medium.com/@katopz/how-to-clean-up-docker-5gb-junk-919541ce5dfc

There are more elegant ways to do this for Docker images and containers with the Docker Daemon 1.25+, but the Docker Daemon on Minikube (at time of writing, 0.25.0) is 1.23, so does not support these commands.

So for now, we can use these two gems from Jim Hoskin’s website to remove untagged images (failed builds mostly) and stopped containers.

Removing untagged images

docker image rm $(docker images | grep "^<none>" | awk "{print $3}")

Remove all stopped containers.

docker container rm $(docker ps -a -q)

Image for post
Image for post
Image from https://medium.com/skillshare-team/from-docker-compose-to-minikube-d94cbe97acda

I had an problems earlier today where MiniKube could not start properly because the minikube-dashboard container was continually crashing.

The behaviour observed was that running `minikube dashboard` timed out waiting for a Dashboard URL to become available.

After running `kubectl get pods — all-namespaces`, I was able to see that not all pods were starting correctly,

The issue seemed to be because I was using the `brew cask install minikube` command to install MiniKube and it was installing an older version, v0.23.0. I was advised to install it manually, which installed version v0.24.1 …


WARNING: This is a strongly opinionated guide for what files *I* believe aren’t worth making it into my Time Machine backups.

But first, some context. If you just want to see what I exclude, jump to the bottom.

Who am I?

I’m a Developer, technical trainer and writer. As a Developer, I download an extraordinary large amount of “stuff” (e.g. Docker image layers) that I really don’t need backed up. I wanted to share what I exclude in the hope it might save other Developers some backup time (taken) and disk space.

Why bother to exclude files? Disk space is cheap right?

Yes, but developers tend to accumulate a lot of files on our machine. It’s not just the eventual size, but the number of files that is often problematic. …


Image for post
Image for post
From https://blog.docker.com/2016/02/docker-engine-1-10-security/

Security is becoming an important — if not the most important — feature of containerization in 2017. Not just for companies like Docker, but for Linux kernel maintainers, cloud vendors, Linux OS distributions and of course, container orchestrators such as Swarm and Kubernetes.

Security is always of great importance, but that doesn’t mean it gets the marketing and media attention it deserves. Interestingly, however, I think, Docker and the rise of mass-scale containerisation outside of Silicon Valley is putting security front and centre.

Container security in 2017

Everyone has a different take on containerisation and security but I’d like to offer this viewpoint. Security is becoming the focus not because container technology itself has made apps or hosts more vulnerable, but in many cases, the opposite. And smart companies are paying attention and changing their story, their marketing and as a result, their engineering efforts. …


While several third party libraries exist to provide this info (I used to use piprot), it has actually been baked into pip for years!

pip list --outdated --format=columns>>> Package      Version Latest Type 
>>> ------------ ------- ------ -----
>>> cryptography 1.8.2 1.9 wheel
>>> Django 1.11.1 1.11.2 wheel
>>> ipython 6.0.0 6.1.0 wheel
>>> pytest 3.1.0 3.1.1 wheel
>>> requests 2.16.0 2.17.3 wheel
>>> setuptools 35.0.2 36.0.1 wheel
>>> Sphinx 1.6.1 1.6.2 wheel

This would make for an excellent addition to your CI build process for your Python projects.

Enjoy!


If you’ve ever needed to kill a process that was listening on a specific port, here is the command to find the process.

lsof -i:<PORT NUMBER>

If you came here only to do this, he command you’re looking for is defaults write com.apple.finder AppleShowAllFiles YES.

NOTE: To see this change reflected in any previously open window, you’ll need to close, change location, or, in the case of the desktop, kill the Finder entirely (killall Finder).

This is something I toggle on and off quite frequently though as the additional hidden files definitely add unwanted noise.

To reduce typing, I made a bash simple bash alias that utilises a function (as it does not appear bash aliases can accept arguments).

# Add an alias `hidden_files` that requires either YES or NO to indicate whether they should be shown or hidden # Usage - show hidden files: hidden_files YES # Usage - hide hidden files: hidden_files YES hidden_files_fn() { defaults write com.apple.finder AppleShowAllFiles $1 } alias hidden_files=hidden_files_fn

You can also find this as a gist at https://gist.github.com/ryan-blunden/127b13e496e4f055d440

About

Ryan Blunden

Helping teams make sense of the Cloud, Containers, Microservices and DevOps.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store