I hereby claim:
- I am richarvey on github.
- I am ric_harvey (https://keybase.io/ric_harvey) on keybase.
- I have a public key whose fingerprint is B9A6 97CD 5941 9EC2 45F4 BCF2 961E DD64 9D0F CA37
To claim this, I am signing this object:
#!/usr/bin/python | |
import urllib2, httplib, sys | |
from BeautifulSoup import BeautifulSoup | |
site = "<YOUR URL>" | |
page = urllib2.urlopen('http://' + site) | |
soup = BeautifulSoup(page) | |
tags=soup.findAll('img') |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
import boto3, argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-b','--bucket', help='Name of your S3 Bucket', required=True) | |
parser.add_argument('-o','--object', help='Name of the object + prefix in your bucket', required=True) | |
parser.add_argument('-t','--time', type=int, help='Expirery in seconds Default = 60', default=60) | |
args = vars(parser.parse_args()) |
docker rm $(docker ps -a -q)
This will remove all stopped containers by getting a list of all containers with docker ps -a -q and passing their ids to docker rm. This should not remove any running containers, and it will tell you it can’t remove a running image.
docker rmi $(docker images -q --filter "dangling=true")
coreos() { | |
if [ "$1" == "" ]; then | |
echo "please specify a regions (eg: eu-west-1)" | |
else | |
aws ec2 describe-images --region=$1 --owner=595879546273 --filters "Name=virtualization-type,Values=hvm" "Name=name,Values=CoreOS-stable*" --query 'sort_by(Images,&CreationDate)[- 1].{id:ImageId}' | |
fi | |
} |