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.…

Keep reading

svn2git: Tag Already Exists

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.…

Keep reading

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?…

Keep reading

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.…

Keep reading

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.…

Keep reading

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.…

Keep reading

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.…

Keep reading