Instantly share code, notes, and snippets.


One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
View EnvHacker.scala
trait EnvHacker {
* Portable method for setting env vars on both *nix and Windows.
* @see
def setEnv(newEnv: Map[String, String]): Unit = {
try {
val processEnvironmentClass = Class.forName("java.lang.ProcessEnvironment")
val theEnvironmentField = processEnvironmentClass.getDeclaredField("theEnvironment")
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Removes a file or directory while preserving the modification time (mtime) of
the parent directory.
Pure-python implementation.
#!/usr/bin/env bash
# @author J. Elliot Taylor (@jaytaylor)
# @date 2018-11-14
# @description Andromeda postgres DB remote backup utility.
View ansi_terminal_color_codes_cleaner.go
package main
import (
View etc_systemd_system_boot-ntp-client.service
Description=NTP sync on boot

Sets system time based on what is reported by Useful for cases where it is not possible to use the standard ntpdate command. For eample, if a Linux machine is on a network which is only able to reach the internet through an HTTP proxy.

Inspired by ryenus' answer @


# Download latest script.
status = error
dest = err
name = PopertiesConfig
property.logDir = /var/log/elasticsearch
appender.console.type = Console = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
#!/usr/bin/env bash
# Builds and prints java class dependency graph based on import references.
# Could be useful for extracting a portion of java files out of a project.
# Arg: <class-name>
# e.g. ./ CoreNLP/src TokenizerAnnotator

Docker DTR V2 Distribution Registry: Manual Authentication

In this #HOWTO, we'll use a set of user:password credentials to obtain an auth token from an enterprise Docker Trusted Registry DTR (archived page snapshot of

Required information

  • Registry hostname
  • Account username and password

Use credentials to obtain an auth token