RSSAmplifier

Blog

George Ornbo

Recent content on George Ornbo

shapeshed.comRSS feed ↗20 posts

Latest posts

Toggle light and dark mode in Vim, Tmux and Alacritty

Out of the shadows ¶ For the majority of the time I use a dark theme. Throughout the winter months I have been under the blankets bingeing on Nordic Noir and dark drama but now it is time to get outside into the English spring and listen to high bpm techno the birds. The problem with a dark themed desktop of course is that it is hard to see the screen in any kind of sunlight.

Renewal

Mist envelops the soft hills, Smothering the quiet, monochrome hues. I watch life evaporating from the leaves, As they prepare to fall, and end this cycle. Dark, lifeless days are to come, As coldness enters my bones. My breath will illuminate the air, Exhaling a time that is gone. Storms will arrive and shake the earth, Lashing grey doors and smoking chimneys. They will twist this broken soul,…

Using HashiCorp Vault with LDAP

Introduction ¶ Vault is an excellent tool for managing secrets. It can be used by both machines and humans and has a modular design and strong security models. Some of the secrets it can store include. Service tokens Certificates Website passwords In this article Vault will be used to set up a secret store and will be integrated with LDAP, providing read-only access to groups and read-write access…

Linux and Unix xargs command tutorial with examples

What is the xargs command in UNIX? ¶ The xargs command in UNIX is a command line utility for building an execution pipeline from standard input. Whilst tools like grep can accept standard input as a parameter, many other tools cannot. Using xargs allows tools like echo and rm and mkdir to accept standard input as arguments. How to use xargs ¶ By default xargs reads items from standard input as…

Copy a file in Go

No shorthand method ¶ The ioutil package offers some of the common operations needed when working with files but nothing for copying files. Go tries to keep things lightweight so as operations become more complex the os package should be used. The os package operates at a slightly lower level and as such expects that files are explicitly closed after opening them. Reading the source code of the os…

Linux and Unix watch command tutorial with examples

What is the watch command in UNIX? ¶ The watch command runs a given command repeatedly and displays the output, refreshing the screen with each interval. This allows a command to be watched and produces functionality similar to the top command. The command will run until terminated, usually with CTRL-C. The watch command is very useful for generating a real-time view of events that are happening…

Build your own Vim statusline

The default vim statusline What is a statusline in Vim? ¶ The statusline in Vim is the bar along the bottom of the Vim window. By default it does not show when you open Vim until there is more than one window. The statusline is intended to give you information about the status of a buffer with the default statusline including the path, permissions, line and a percentage representation of where you…

Custom Vim Bindings in tmux 2.4

Changes in tmux 2.4 ¶ tmux continues to move on apace which is great news for the project. Since version 2 there have been several breaking changes to configuration options. This is fine if you run tmux on a machine that you maintain as it is easy to keep tmux configuration in sync with the the version on the machine. If, like me, you favour wrapping up your configuration in a dotfiles repository…

Using template files in Vim

Using templates in Vim ¶ The Vim philosophy encourages users to automate repeated actions and provides a rich toolkit with great documentation to achieve that. One example of this type of micro-optimisation is having a template or skeleton file that populates the vim buffer when a new file is opened. With just a few lines in the ~/.vimrc file it is possible to build a rich library of skeleton…

Rolling deployments with Kubernetes

In a previous post I worked through getting a Kubernetes cluster up and running on a local machine using minikube. Within this cluster I have one deployment of a simple Hello World Go application. kubectl get deployments NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE hello-go 1 1 1 1 1d How then do you deploy a new image? It is a simple case of updating an image within a deployment. kubectl set…

Getting started with Kubernetes

Over the last few weeks I have been learning Kubernetes. Here is how I got set up and started learning. To experiment with Kubernetes I used minikube to run a local cluster. This has dependencies of virtualbox and kubectl. On Arch Linux minkube and kubectl may be installed from the AUR. Virtualbox is available in the core Arch Linux repositories. Once installed a Kubernetes cluster can be started…

Listening to BBC Radio with mpv

BBC Radio feeds ¶ To the annoyance of some the BBC removed support for Windows Media and have migrated to using the AAC codec and http streaming. The good news is that the AAC streams are high quality and freely available. Matthew Peet shared the links to the 320 kbps HLS AAC streams on his site. BBC radio 1 AAC/.m3u8 BBC radio 2 AAC/.m3u8 BBC radio 3 AAC/.m3u8 BBC radio 4 AAC/.

Vim: So long Pathogen, hello native package loading

Vim 8 brings native third-party package loading ¶ Vim 8, released on 12th September, added a new feature of being able to load third party packages natively. Plugins keep growing and more of them are available than ever before. To keep the collection of plugins manageable package support has been added. This is a convenient way to get one or more plugins, drop them in a directory and possibly keep…

Linux and Unix more command tutorial with examples

What is the more command in UNIX? ¶ The more command is a command line utility for viewing the contents of a file or files once screen at a time. It supports navigating forwards and backwards through a file and is primarily used for viewing the contents of a file. It also supports searching for strings or regular expressions and opening the file at the current point in a text editor.

Vim: you don't need NERDtree or (maybe) netrw

Screenshot of netrw directory browser netrw - the unloved directory browser ¶ The netrw plugin normally ships with vim and is the default filebrowser. It gets a bad rap and ships with all kinds of features likes remote editing over SSH and FTP, and anecdotally has many bugs. Most developers just jump straight for the NERDtree plugin but in my opinion the default netrw plugin does most of what…

Linux and Unix kill command tutorial with examples

What is the kill command in UNIX? ¶ The kill command is a command line utility to for terminating processes. It is normally a shell builtin meaning the command is called from a users shell rather than an external executable program. By default the kill command will send a TERM signal to a process allowing the process to perform any cleanup operations before shutting down. The kill command also…

Linux and Unix touch command tutorial with examples

What is the touch command in UNIX? ¶ The touch command is a command line utility to update timestamps on files. UNIX and UNIX like operating systems store timestamp information for each file or folder including access time, modify time and change time. It is possible to modify timestamps using the touch command either to update a timestamp to the current time or to modify it to a date in the past.

Thoughts on yarn

Yarn is a better npm client ¶ Yarn announced itself at a new package manager for JavaScript. Eventually the project may look at creating a registry but for now it is simply a better npm client. It is a drop in replacement for the official npm client and offers a global cache and better parallelisation. From my crude tests and anecdotal reports from friends and colleagues it is much faster and more…

Linux and Unix cp command tutorial with examples

What is the cp command? ¶ The cp command is a command-line utility for copying files and directories. It supports moving one or more files or folders with options for taking backups and preserving attributes. Copies of files are independent of the original file unlike the mv command. How to copy a file ¶ To copy a file with the cp command pass the name of the file to be copied and then the…

Linux and Unix mv command tutorial with examples

What is the mv command in UNIX? ¶ The mv command is a command line utility that moves files or directories from one place to another . It supports moving single files, multiple files and directories. It can prompt before overwriting and has an option to only move files that are new than the destination. How to move a file ¶ To move a file using the mv command pass the name of the file and then the…