Skip to content

Instantly share code, notes, and snippets.

View afrikaan-official's full-sized avatar
💭
I may be slow to respond.

Kaan afrikaan-official

💭
I may be slow to respond.
View GitHub Profile
@afrikaan-official
afrikaan-official / docker-things.sh
Last active January 30, 2017 09:51 — forked from tugberkugurlu/docker-things.sh
Docker CLI Cheatsheet
# List all stopped containers
docker ps --filter "status=exited"
# Remove all stopped containers
docker rm $(docker ps --filter "status=exited" -aq --no-trunc)
# Remove all unused images (http://stackoverflow.com/a/32723127)
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
#Remove dangling Images
@afrikaan-official
afrikaan-official / ab post with body
Created August 18, 2022 08:19 — forked from kelvinn/cmd.sh
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/