Skip to content

Instantly share code, notes, and snippets.

View scottatron's full-sized avatar

Scott Arthur scottatron

View GitHub Profile
@scottatron
scottatron / Build images directly into the K3s containerd instance with BuildKit.md
Last active January 17, 2024 10:05
Build images directly into the K3s containerd instance with BuildKit

I wanted to iterate on some images and have them available to K3s immediately, much like the Docker Desktop experience.

I also wanted to use docker buildx bake for this, but buildctl and nerdctl build should work fine too. You can omit Docker components if you don't want Buildx.

  • Ubuntu 22.04
  • K3s latest (v1.24.2+k3s1)
  • BuildKit v0.10.3
  • Docker Engine 20.10.17 (required for Buildx)
  • Docker Buildx master (required for new 'remote' driver)
  • Nerdctl 0.21.0
@scottatron
scottatron / README.md
Created August 11, 2012 04:17
Lossless compression of images in Rails using Dragonfly & image_optim

This runs provides an .optim job for dragonfly and also adds the .optim job into .thumb

This requires you have the 'image_optim' gem and it's dependencies.

cluster:
name: kubernetes
# Set to true if the nodes have the required packages installed.
disable_package_installation: false
# Set to true if you are performing a disconnected installation.
disconnected_installation: false
# Networking configuration of your cluster.
@scottatron
scottatron / keybase.md
Created March 21, 2016 03:43
keybase.md

Keybase proof

I hereby claim:

  • I am scottatron on github.
  • I am scottatron (https://keybase.io/scottatron) on keybase.
  • I have a public key ASCHTW95U6JfBmBPmQ2EdVTUDYSQSKMB8Zawp-Sypr4ugQo

To claim this, I am signing this object:

Date/Time: 2013-01-15 17:31:22 +1100
OS Version: 10.8.2 (Build 12C60)
Architecture: x86_64
Report Version: 11
Command: SelfControl
Path: /Applications/SelfControl.app/Contents/MacOS/SelfControl
Version: 1.4.4 (1.4.4)
Parent: launchd [157]
@scottatron
scottatron / php_dalli_store.rb
Created October 11, 2012 03:14 — forked from watsonbox/php_dalli_store.rb
PHP Memcache Session Store Using Dalli
require 'action_dispatch/middleware/session/dalli_store'
# - PHP side is 5.3.6 configured with session.save_handler = memcache
# - Requires php-serialize gem for serialization: https://github.com/jqr/php-serialize
module ActionDispatch
module Session
class PhpDalliStore < ActionDispatch::Session::DalliStore
require 'php_serialize'
class PhpSerializingPoolDecorator < SimpleDelegator
@scottatron
scottatron / nginx_unicorn.erb
Created September 16, 2012 05:20
Rails / Dragonfly / nginx X-Sendfile (aka X-Accel-Redirect)
upstream unicorn {
server unix:/tmp/unicorn.<%= application %>.sock fail_timeout=0;
}
server {
listen 80 default deferred;
# server_name example.com;
root <%= current_path %>/public;
if (-f $document_root/system/maintenance.html) {
@scottatron
scottatron / watchr script
Created July 14, 2011 11:29 — forked from markbates/watchr script
A Watchr script for rails, rspec, and cucumber
ENV["WATCHR"] = "1"
system 'clear'
def growl(message)
growlnotify = `which growlnotify`.chomp
title = "Watchr Test Results"
puts message
image = message.match(/\s0\s(errors|failures)/) ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png"
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{strip_ansi(message)}' '#{title}'"
system %(#{growlnotify} #{options} &)
@scottatron
scottatron / Gemfile
Last active August 29, 2015 14:10
rubygems.org hosts file entries to work around DNSimple DDOS outage
source 'https://rubygems.org' # I needed to make sure this was *https*
@scottatron
scottatron / README.md
Created July 27, 2014 05:28
Vagrant Docker host VM with NFS support