Skip to content

Instantly share code, notes, and snippets.

@strayge
strayge / docker-clean.md
Created April 26, 2022 14:59 — forked from kuznero/docker-clean.md
Cleanup docker images and containers after failed builds

Cleanup docker images and containers after failed builds

Sometimes, there are some untagged images left behind after failed builds. In order to get rid of those, this script can be used.

#!/bin/bash
docker rm $(docker ps -aq)
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
@strayge
strayge / ssh-copy-id.py
Last active October 9, 2018 04:42 — forked from ceilfors/ssh-copy-id.py
ssh-copy-id for Windows
"""ssh-copy-id for Windows.
Example usage: python ssh-copy-id.py ceilfors@my-remote-machine
This script is dependent on msysgit by default as it requires scp and ssh.
For convenience you can also try that comes http://bliker.github.io/cmder/.
origin url: https://gist.github.com/ceilfors/fb6908dc8ac96e8fc983
"""
import argparse, os
from subprocess import call, PIPE