Sunday, 12 November 2023

Docker cheatsheet

Attach to a running container
docker exec -i -t <container> /bin/bash
Run networking tools
docker run -d praqma/network-multitool --name netshoot
docker exec -it netshoot /bin/bash
Test network connectivity
apt update
apt install net-tools
apt install curl
curl -kv
      
To stop all docker containers in PowerShell
docker ps -a -q | ForEach { docker stop $_ }
      
Show the logs for a container
docker logs <container>
      
Show networks
docker inspect <container>
      

Thursday, 9 November 2023

Git cheatsheet

Tags

Create a taggit tag -a 1.0.0 -m "First release"
Delete a remote taggit push --delete main 1.0.0

Commits

Remove all commit history and set the code as the only commit
git checkout --orphan newBranch
git add -A  # Add all files and commit them
git commit
git branch -D master  # Deletes the master branch
git branch -m master  # Rename the current branch to master
git push -f origin master  # Force push master branch to github
git gc --aggressive --prune=all     # remove the old files


Thursday, 2 November 2023

Durable Functions vs Bespoke Event Sourcing

 You can write an application that uses Event Sourcing using code like the asos-eventsourcing and SimpleEventStore.

However, you can take advantage of the built-in event sourcing capabilities of Durable Functions.