Skip to content

Instantly share code, notes, and snippets.

View afolarin's full-sized avatar

Amos Folarin afolarin

  • Kings College London / SLaM NHS Trust
  • London, UK
View GitHub Profile
@afolarin
afolarin / resource_alloc_docker.md
Last active March 18, 2024 17:01
Resource Allocation in Docker

#Container Resource Allocation Options in docker-run

now see: https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.

##Dynamic CPU Allocation -c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)

@afolarin
afolarin / docker-log-gist.md
Last active March 16, 2023 13:02
docker-logs
@afolarin
afolarin / gist:79b6c588e2949be9f9e5f52039962f4e
Last active September 14, 2021 11:19
Dump github org repositories into a CSV using Github CLI tool https://github.com/cli/cli
#using https://github.com/cli/cli and jq.
gh repo list -L 80 --json name,description,isArchived,createdAt,updatedAt,url --jq '.[] | [.name, .description, .createdAt, .isArchived, .url]' RADAR-base > radar-base-repos.csv
@afolarin
afolarin / gist:326bc4429c7c28d07a703d075189f8de
Last active December 15, 2017 16:36
List AWS Instances By Region
#DESC: Providing a overview of all the Instances running across the individual regions, something not readily available in AWS web UI :-/
# Install AWS CLI https://aws.amazon.com/cli/
#--------------------------------------------------------------------------------------
# List all aws instances in all regions, parse out response JSON
# Props to: https://github.com/aws/aws-cli/issues/1777
#--------------------------------------------------------------------------------------
function aws-ls-ec2-vm
{
@afolarin
afolarin / docker-on-GCE.md
Last active August 29, 2015 14:07
Docker on Google Compute Engine