Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Kit Plummer kitplummer

🏠
Working from home
View GitHub Profile
@ChrisTimperley
ChrisTimperley / install-docker-elementary-loki.sh
Last active Apr 27, 2020
Installs Docker on Elementary OS 0.4 (Loki)
View install-docker-elementary-loki.sh
#!/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 Jan 11, 2020
Create Route53 A records using IAM profile with route53 access
View linux-salt-bootstrap.sh
#!/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
A killer GNU Screen Config
View .screenrc
# 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 Jul 27, 2011
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
View osx_lion_rail_setup.md
@schisamo
schisamo / definition.rb
Created Jan 4, 2011
veewee definition for creating a Vagrant box that mirrors the centos5-gems knife bootstrap template
View definition.rb
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 Dec 7, 2010
Grit clone example
View gist:731502
# 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 Nov 5, 2010
RSpec 2 syntax cheat sheet by example
View rspec-syntax-cheat-sheet.rb
# 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 Jun 22, 2010
a quick and dirty jruby daemon based on basic_daemon
View daemon.rb
#!/usr/bin/env jruby
#
#
require 'rubygems'
require 'spoon'
EXEC = '/tmp/exec.rb'
PID_PATH = '/tmp/exec.pid'
WORK_PATH = '/tmp/'
You can’t perform that action at this time.