Skip to content

Instantly share code, notes, and snippets.

View shubhamdhingra38's full-sized avatar
🎯

Shubham Dhingra shubhamdhingra38

🎯
View GitHub Profile
@npearce
npearce / install-docker.md
Last active July 27, 2024 07:34
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@chids
chids / 256kb.json
Last active March 18, 2024 16:07
Roughly 256kb of indented JSON i.e. AWS SNS and AWS SQS message limit and a hint not to publish pretty printed JSON ;)
[
{
"id": 0,
"guid": "1b8c3019-c0b6-44f9-b35c-5b1b2729551a",
"isActive": true,
"balance": "$3,163.00",
"picture": "http://placehold.it/32x32",
"age": 32,
"name": "Saunders Sosa",
"gender": "male",