Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
😏

Pietro Di Bello xpepper

💭
😏
View GitHub Profile
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional, and may contain IDs of the task / user story we are changing the code for (e.g. SELL-123)

Example

@xpepper
xpepper / asvagrant.sh
Created Dec 30, 2021
A shell script to execute a command on a vagrant machine (e.g. ./asvagrant.sh ls)
View asvagrant.sh
(
relativeDir=""
while [[ ! -d ".vagrant" ]]; do
if [[ "$(pwd)" == "/" ]]; then
echo "Not a valid path"
exit
fi
relativeDir="${PWD##*/}/$relativeDir"
cd ..
View Docker as a dev tool.md

Docker aliases

(full article by Andrew Welch here: https://nystudio107.com/blog/dock-life-using-docker-for-all-the-things)

alias composer='docker run --rm -it -v `pwd`:/app -v ${COMPOSER_HOME:-$HOME/.composer}:/tmp composer '
alias composer1='docker run --rm -it -v `pwd`:/app -v ${COMPOSER_HOME:-$HOME/.composer}:/tmp composer:1 '

alias node='docker run --rm -it -v `pwd`:/app -w /app node:16-alpine '
View Another precious TDD exercise by Kent Beck.md
tags
TDD, testing

Another precious TDD exercise by Kent Beck

Let's say you interested in TDD but you just can't figure out how to write a test before you write the code. Here's a foolproof exercise that let's you experience the TDD workflow in spite of that block:

View A curated list of programming kata.md
tags disqus
kata
pierodibello

A curated list of programming kata

IDE automation skills

  • Refactoring Golf katas (easy...medium), to learn how to use the IDE at its best
View ATM kata.md
tags
kata

ATM kata

You have to develop an Automated Teller Machine (ATM) allowing cash withdrawals.

The ATM main features:

View Powerful questions for a Scrum Team.md
View Refactoring Legacy Code katas.md
title tags
Refactoring Legacy Code katas
refactoring, kata

Pietro Di Bello, [28 Sep 2020 at 22:59:43]:

voi cosa consigliereste come kata per aiutare un team a fare pratica con il refactoring (abituarsi a cercare di esprimere il codice in modo più chiaro e parlante partendo da una codebase piuttosto "offuscata") ? a me vengono in mente tennis kata (un po' noioso forse), gilded rose? ugly trivia? o anche il mitico goose game refactoring kata?