Skip to content

Instantly share code, notes, and snippets.

View xpepper's full-sized avatar
💭
😏

Pietro Di Bello xpepper

💭
😏
View GitHub Profile
tap "adoptopenjdk/openjdk"
tap "aws/tap"
tap "beeftornado/rmtree"
tap "chef/chef"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-drivers"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
@xpepper
xpepper / tempmail.sh
Last active February 1, 2025 00:36
A shell script to create a temporary disposable email via command line (install w3m, curl, jq)
#!/usr/bin/env sh
#
# by Siddharth Dushantha 2020
#
# Dependencies: jq, curl, w3m
#
version=1.1.9
# By default 'tmpmail' uses 'w3m' as it's web browser to render
@xpepper
xpepper / Java8Pills.md
Created March 4, 2021 16:10 — forked from Vashy/Java8Pills.md
Java 8 pills

Java 8 Pills

Example class

@Value // Lombok annotation.
// Generates all private final fields, an all-args-constructor,
// getters (no setters), toString(), etc...
class User {

Clean-Architecture

Notes, comments and errata on Robert C. Martin's Clean Architecture

Reading the book

The book has 34 chapters, with a maximum of 22 pages (chapter 14). Even while involved as a programmer in a project, it should be possible to read one chapter per day, so you can finish the book in about 2 months.

Errata

Page 15, just before subchapter "The greater value".

@xpepper
xpepper / readme.md
Last active March 4, 2021 11:34
Calculator App Kata

Calculator App

The following is a TDD Kata, an exercise in coding, test-first and refactoring.

Before you start

  • Try not to read ahead.
  • Do one task at a time.

The kata

Question posted on Twitter

For someone with technical leadership responsibilities in a rapidly scaling product company that’s distributed across multiple time zones, what are the top 3 books you think they should read?

My Three

  1. Flow (Donald G. Reinertsen)
  2. Flow (Mihaly Csikszentmihalyi)
  3. Flow (Nonaka, Toyama, Hirata)

Twitterverse

@xpepper
xpepper / find.combinations.kt
Created July 26, 2020 13:11
given number sequence 1,2,3,4,5,6,7,8,9, find a combination of + and - to split those digits so that the result of the operation equals 100
import kotlin.math.pow
import kotlin.random.Random
val digits = listOf(1, 2, 3, 4, 5, 6, 7, 8, 9)
fun main() {
val random = Random(System.currentTimeMillis())
val validResults = mutableListOf<String>()
while (true) {
@xpepper
xpepper / mob.sh
Created June 23, 2020 19:31
A script to perform a git handover in a mob session
#!/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 June 17, 2020 15:10
script to have a mob session with two branches: mob-session-1, mob-session-2

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 February 13, 2020 09:05
prof feynman quotes

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.