Welcome!
devops Derek is a place to keep notes related to things I am working on. It
makes it easier to later grep -iR something_I_did_in_the_past ./. Hopefully,
it is also useful to others.
Posts
Oct 15, 2017
Updating Thinkpad Firmware with Linux
Lenovo packages its UEFI firmware updater as either a Windows installable package or a bootable CD image. The bootable image is great for those running Linux on their systems. However, if you do not have an external CD drive or do not want to burn a CD, the update process takes a few more steps. Fortunately, the updater can be extracted from the CD image and written to a USB drive with Linux.
Oct 27, 2016
Enable NVIDIA modules in EC2 GPU Instances without Rebooting
Recently, I needed to use GPU instances with a custom AMI on EC2. The image I needed to use did not contain the necessary NVIDIA and CUDA modules and instead contained nouveau. This posed a unique situation because normally a reboot is necessary after installing the official module. However, the software I was provisioning the instances with was unable to resume after rebooting. Using this short script I was able to swap the opensource nouveau module for the NVIDIA module without rebooting the instance.
Sep 1, 2016
If you find yourself migrating a repository from subversion to git you may run into a couple issues. One common issue I ran into was where an engineer updated a tag. When converting a repository with a modified tag, svn2git will stop and return an error message stating that a duplicate tag is present.
Aug 27, 2016
Publish Vagrant Boxes with rsync
The built in vagrant push command allows you to post your boxes publicly to Atlas. However, what if you want to publish boxes to an internal or private server over ssh?
Nov 10, 2013
Bulk Delete Messages from Postfix Queue
Have you have ever had a script or application accidentally send thousands of messages through your postfix queue? With this simple tip you no longer need to wait for those messages to be processed through the Postfix queue. This one liner is also helpful if you have a lot of differed messages in the Postfix queue you would like to discard.
Apr 8, 2013
Quickly Transfer Files Between Servers
When transferring files between systems usually rsync or scp are all that is needed. Sometimes, there are difficult edge cases. For example using rsync to transfer many files spread across 1000s of directories quickly. Recently, I needed to move several TB worth of files in varying size spread across 1000s of directories. I found that rsync spent most of the time traversing directories and not copying the data. I turned to the webs to find a better solution.
Mar 10, 2013
View Man Pages with Preview on Mac OS X
I am always looking for better ways to integrate the unix components into Mac OS X. I recently came across a great way to connect the man pages to a more visual mode in OS X.
Nov 13, 2012
List and Disconnect PostgreSQL DB Sessions
Some times it is necessary to terminate a PostgreSQL query and connection. This can be very helpful when you have a run away command or script. It can also be helpful if your application has submitted a query to the backend that has caused everything to grind to a halt. Fortunately, postgres comes to the rescue and provides a few helpful commands that will allow you to cancel the query from the database and optionally terminate the user or application’s connection.
Oct 30, 2012
Screen is a great command to know when working on linux and unix systems. Screen allows long commands to stay running if you become disconnected from a server or if you want to disconnect.