Skip to content

Instantly share code, notes, and snippets.

View xpepper's full-sized avatar
💭
😏

Pietro Di Bello xpepper

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

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 '
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:

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
tags
kata

ATM kata

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

The ATM main features:

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?