Skip to content

Instantly share code, notes, and snippets.

💭
😏

Pietro Di Bello xpepper

💭
😏
View GitHub Profile
@xpepper
xpepper / mob.sh
Created Jun 23, 2020
A script to perform a git handover in a mob session
View mob.sh
#!/bin/sh
COMMAND=$1
BRANCH=$2
if [[ "$COMMAND" == "init" ]]
then
echo "INITIALIZING SESSION '$BRANCH'"
git fetch --prune
git pull --ff-only
@xpepper
xpepper / mob-session-testing-1.md
Last active Jun 17, 2020
script to have a mob session with two branches: mob-session-1, mob-session-2
View mob-session-testing-1.md

INIT SESSION (only once!)

git fetch --prune
git pull --ff-only
git checkout master
git merge origin/master --ff-only
git branch mob-session-1
git checkout mob-session-1
git push --no-verify --set-upstream origin mob-session-1
@xpepper
xpepper / proffeynman-1.md
Created Feb 13, 2020
prof feynman quotes
View proffeynman-1.md

Don't just teach your students to read.

  • Teach them to question what they read, what they study.
  • Teach them to doubt.
  • Teach them to think.
  • Teach them to make mistakes and learn from them.
  • Teach them how to understand something.
  • Teach them how to teach others.
View build.sh
#!/bin/bash
set -e
set -o pipefail
echo '***Start***'
INSTRUCTION="If you want to deploy, try running the script with 'deploy stage region profile', e.g. 'deploy dev eu-west-1 non-prod'"
if [ $# -eq 0 ]; then
echo "Missing arguments."
@xpepper
xpepper / Blue-Green deployment.md
Created Jan 26, 2020
The origins of the term "blue-green deployment" (Dan North)
View Blue-Green deployment.md

From https://gitlab.com/snippets/1846041

The origins of the term "blue-green deployment"

The blue-green story, as is so often the case, was about navigating a tricky client. The build team I was leading had figured out there were lots of differences between the test environments and production. (There were also differences between each of the test environments, but that’s another set of patterns!)

We figured the safest way to check a release was to deploy the app side-by-side onto the same physical boxes as the live system. We were running WebLogic which has the concept of a “domain”, which is just a directory full of application files. We would deploy the new version in an adjacent directory, which we called the “shadow domain” (which had a nice fantasy ring to it: “Prepare the shadow domain!” etc.), attach it to a local port, and smoke test it there by connecting directly to the port. Once we were happy with the deployment we could cut over th

View Microservices Lessons Learned.md

Microservices Lessons Learned

"People try to copy Netflix, but they can only copy what they see. They copy the results, not the process" - A.Cockcroft - AWS

Many case studies about migrating to microservices are about big organizations like Netflix, Google, Zalando, Facebook, Etsy, etc. What about smaller companies?

Each journey is different for every organization: what works for an org does not work for another. No golden-rule.

There are different circumstances:

@xpepper
xpepper / From monolith to microservices.md
Last active Nov 10, 2019
My notes on Rodrigue Schaefer's talk "From monolith to microservices" at microXchg 2016
View From monolith to microservices.md

Rodrigue Schaefer: From monolith to microservices about some of the challenges of Zalando's transition from monolith to microservices (microXchg 2016)

Zalando history

  • 2008 started with a POC with magento => starts fine but does not scale very well

  • 2010 couldn't handle the raising load and traffic with magento

  • => so in 3 months they build their own system, based on Java, Spring, Postgres DB (a monolithic application)

View design-pattern-observer-java.md

What is a Design Pattern?

Every Software Engineer certainly must have to deal with change. Change is a constant in Software Design: adding feature, changing of requirement or bug fixing.

What is a design pattern? In simplest way I can say, it is a general solution for common problems in Software Development. The purpose of design patterns is to help structure your code so it will be flexible and resilient when its changed.

There are 23 common design patterns that are being used by programmers around the world. In this chapter I am going to describe the Observer Pattern.

Introduction to Observer Pattern

You can’t perform that action at this time.