KategoryKommandMiniscriptionActions
linux
cat file.json | jq ". | length"
get json object count
docker
docker ps -a
List all containers including stopped
docker
docker compose up --build
Rebuild images and start services
docker
docker compose restart app
Restart a specific service
docker
docker exec -it <container> /bin/bash
Open shell in running container
docker
docker logs <container> -f
Follow container logs live
docker
docker system prune -a
Remove all unused Docker resources
git
git log --oneline
Compact one-line commit history
docker
docker compose run -it --rm web ./bin/rails console
Rails console inside Docker
docker
docker compose run --rm web ./bin/rails db:migrate
Run migrations inside Docker
docker
docker compose run --rm web ./bin/rails runner "<ruby code>"
Run Ruby code in Rails context
git
git pull
Fetch and merge remote changes
git
git push origin main --force
Force push to main branch
git
git reset --hard HEAD~1
Undo last commit discard changes
git
git remote -v
Show remote repository URLs
docker
docker images
List local Docker images
git
git checkout -b <branch-name>
Create and switch to new branch
git
git stash
Temporarily save uncommitted changes
git
git stash pop
Apply most recent stash
git
git diff --staged
Show staged changes before commit
git
git clone --depth 1 <url>
Shallow clone single commit history
aws-cli
aws sso login --profile <profile>
Authenticate with AWS SSO
aws-cli
aws s3 cp s3://<bucket>/<file> ./ --profile <profile>
Download file from S3 bucket
aws-cli
aws s3 sync --delete . s3://<bucket>/ --profile <profile>
Sync local directory to S3
docker
docker compose down
Stop and remove containers