Skip to content

Instantly share code, notes, and snippets.

@ahoward
ahoward / a.sh
Created April 6, 2020 18:27
fixes "# mesg: ttyname failed: Inappropriate ioctl for device" warnings during docker build
# fixes "# mesg: ttyname failed: Inappropriate ioctl for device" warnings when building docker
#
echo '#! /bin/sh' > /usr/bin/mesg
chmod 755 /usr/bin/mesg
# all this does is replace the 'mesg' command with a no-op that always succeeds.
# do this *early* in your Dockerfile somewhere.
# from a security persprective this is also fine because it relates to multi-user unix systems,
# not single user/contrained docker images.
@whoisryosuke
whoisryosuke / Update-branch.md
Created September 17, 2019 17:38 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@maleksiuk
maleksiuk / gocd_on_amazon.md
Last active September 23, 2021 18:50
Instructions for getting GoCD running on Amazon Linux

This might help someone who wants to set up GoCD (https://www.gocd.io/) on an Amazon EC2 machine with the Amazon Linux AMI. I'm doing this from a Mac.

Preliminary notes

I'm not great at this stuff but I don't think I've done anything here terribly wrong. It will at least get you started. A person who is better at this sort of thing would probably use Docker.

Create the EC2 instance

In the Amazon console, select the Amazon Linux AMI. Choose the m4.xlarge instance type. I'm running the Go server and two agents on this machine. It is likely overkill -- I'm going to monitor the machine and downgrade if it makes sense, or install a third agent.