> Use sed to Insert Text Every 'n' Lines/Characters

There are a lot of overly complicated ways to insert a line after every nth line, but the simplest way I find is the following: sed '0~3 s/$/\nMy Text/g' < input.file In a file with six lines you get something like the following: Line 1 Line…

> Rename a Github Repository

Ideally make sure the remote and any clones are up to date with one another -- not essential, but there are fewer hurdles when switching the clones to the new repository name. Go to the project in question an open the " Settings" page. Change the Repository name and click on…

> Simple Free-Tier AWS EC2 Instance Setup

This is the first of a few articles detailing how to host multiple Node.js or PHP websites on a single EC2 instance. Log in to AWS, and click on EC2 Click on Launch Instance under Create Instance Select the underlying OS you'd like to use. I've chosen Amazon Linux…

> Convert an AWS instance-store AMI to an EBS backed AMI

Borrowed this from a site I had to pull up via Google's cache with some additions. I recently needed to convert an AWS instance-store AMI to an EBS backed AMI. Here’s the steps I took in order to fix that. It’s a ext3 file system in this example,…

> Check out a _link from OBS

If you're looking to edit the _link file stored in the repository underlying your OBS you can check it out with the --unexpand-link option. Otherwise you'll end up with the _service file: osc checkout --unexpand-link <Project> <Package> # or if you're already in the project's directory: osc…