Skip to content

Instantly share code, notes, and snippets.

View kitplummer's full-sized avatar
🏠
Working from home

Kit Plummer kitplummer

🏠
Working from home
View GitHub Profile
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@ChrisTimperley
ChrisTimperley / install-docker-elementary-loki.sh
Last active April 27, 2020 19:44
Installs Docker on Elementary OS 0.4 (Loki)
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo rm -f /etc/apt/sources.list.d/docker.list
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -u -cs) \
stable"
sudo apt-get update
sudo apt-get purge lxc-docker
@rterbush
rterbush / linux-salt-bootstrap.sh
Last active January 11, 2020 22:54
Create Route53 A records using IAM profile with route53 access
#!/bin/sh
# bootstrap script that runs on every system boot called via AWS instance user-data
# via 'curl -s http://169.254.169.254/latest/user-data | /bin/sh 2>&1'
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@jpantuso
jpantuso / osx_lion_rail_setup.md
Created July 27, 2011 19:51
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@schisamo
schisamo / definition.rb
Created January 4, 2011 20:50
veewee definition for creating a Vagrant box that mirrors the centos5-gems knife bootstrap template
Veewee::Session.declare( {
:cpu_count => '1',
:memory_size=> '384',
:disk_size => '10140',
:disk_format => 'VDI',
:disk_size => '10240' ,
:os_type_id => 'RedHat',
:iso_file => "CentOS-5.5-i386-netinstall.iso",
:iso_src => "http://mirror.bytemark.co.uk/centos/5.5/isos/i386/CentOS-5.5-i386-netinstall.iso",
:iso_md5 => "0172883a3039772165db073693debae5",
@cookbooks
cookbooks / gist:731502
Created December 7, 2010 05:24
Grit clone example
# Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands:
require 'grit'
include Grit
gritty = Grit::Git.new('/tmp/filling-in')
gritty.clone({:quiet => false, :verbose => true, :progress => true, :branch => '37s'}, "git://github.com/cookbooks/cc-aws.git", "/tmp/cc-aws2")
# => "Initialized empty Git repository in /tmp/cc-aws2/.git/\n"
Dir.entries('/tmp/cc-aws2').size
# => 10
@dnagir
dnagir / rspec-syntax-cheat-sheet.rb
Created November 5, 2010 09:29
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@ik5
ik5 / daemon.rb
Created June 22, 2010 18:43
a quick and dirty jruby daemon based on basic_daemon
#!/usr/bin/env jruby
#
#
require 'rubygems'
require 'spoon'
EXEC = '/tmp/exec.rb'
PID_PATH = '/tmp/exec.pid'
WORK_PATH = '/tmp/'