Skip to content

Instantly share code, notes, and snippets.

View dimfeld's full-sized avatar

Daniel Imfeld dimfeld

View GitHub Profile
@Tenzer
Tenzer / README.md
Created February 18, 2015 21:20
Docker Registry S3 cleanup script

Docker Registry S3 cleanup script

This simply requires you to install the boto3 package and set the DOCKER_BUCKET variable to point at the bucket you would like to clean up, and the rest should be handled automatically. That's is presuming you have credentials to manage the S3 bucket in one of the default locations where Boto go to look for them.

Since the script more or less traverses through your entire S3 bucket, it probably makes sense to only run it infrequently, like daily or weekly, depending on the amount of repositories and layers you have and the amount of updates on the registry in total.

@justmoon
justmoon / custom-error.js
Last active April 22, 2024 17:19 — forked from subfuzion/error.md
Creating custom Error classes in Node.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@mbostock
mbostock / .block
Last active February 26, 2023 06:42
Hello WebGL
license: gpl-3.0