Skip to content

Instantly share code, notes, and snippets.

View xpepper's full-sized avatar
💭
😏

Pietro Di Bello xpepper

💭
😏
View GitHub Profile
@xpepper
xpepper / How to uninstall older versions of JDK on a OSX machine.md
Last active January 24, 2024 10:10
How to uninstall older versions of JDK on a OSX machine

How to cleanly uninstall older versions of JDK on a OSX machine

Say you want to remove the JDK 1.8.0_161:

Check that's installed with ls -1 /Library/Java/JavaVirtualMachines

for example:

$ ls -1 /Library/Java/JavaVirtualMachines
jdk1.7.0_80.jdk
@xpepper
xpepper / scrum.master.toolbox.podcasts.scraper.rb
Created May 17, 2017 20:54
Extracts all the URL of the scrum master toolbox podcast, so that I can listen to all of them :)
require 'rubygems'
require 'mechanize'
STARTING_URL = "http://scrum-master-toolbox.org/2015/06/podcast/ben-linders-on-retrospectives-as-a-systems-thinking-tool/"
def go_to_next_url(url, agent)
page = agent.get(url)
page.links_with(css: '.nav-next a').each do |f|
puts f.href
go_to_next_url(f.href, agent)
@xpepper
xpepper / Some tools and tweaks on Mac OS X.md
Last active December 13, 2023 11:33 — forked from g3d/gist:2709563
Some tools and tweaks on Mac OS X
@xpepper
xpepper / Massive file upload using JQueryUpload + Nginx + Rails + Sidekiq.md
Last active December 13, 2023 01:00
Massive file upload using JQueryUpload + Nginx + Rails + Sidekiq

Massive file upload using JQueryUpload + Nginx + Rails + Sidekiq

The goal: Upload several files (virtually big files) to a Rails application without compromising the user experience.

Architecture

jQuery File Upload + Nginx + Rails (Carrierwave) + Sidekiq

  1. jQuery File Upload (http://blueimp.github.io/jQuery-File-Upload/)
@xpepper
xpepper / universal-switcher.md
Created November 24, 2023 07:56 — forked from jthodge/universal-switcher
Show macOS app switcher across all monitors
defaults write com.apple.dock appswitcher-all-displays -bool true && killall Dock
@xpepper
xpepper / LondonVsChicago.md
Last active November 4, 2023 22:57
London vs Chicago, Comparative Case Study - Sandro Mancuso and Uncle Bob

My notes on the video series "London vs Chicago TDD styles" by Uncle Bob And Sandro Mancuso

The git repo of the kata is here: https://github.com/sandromancuso/cleancoders_openchat/

The "starting-point" branch is where both implementations began: https://github.com/sandromancuso/cleancoders_openchat/tree/starting-point

  • The 🇬🇧 "openchat-outside-in" branch captures the tomato by tomato history of the London approach.
  • The 🇺🇸 "openchat-unclebob" branch captures the tomato by tomato history of the Chicago approach.

What I like about Sandro's style 👍

@xpepper
xpepper / ktor.kt
Created November 2, 2023 15:41
Testing Ktor response validation
import com.casavo.gluglu.core.infrastructure.http.installLoggingConfiguration
import com.casavo.gluglu.core.infrastructure.http.installUserAgentConfiguration
import io.ktor.client.HttpClient
import io.ktor.client.request.get
import io.ktor.client.request.url
import io.ktor.http.isSuccess
import kotlinx.coroutines.runBlocking
val client = HttpClient {
expectSuccess = true
@xpepper
xpepper / map.md
Created October 10, 2023 10:30
The Ultimate Guide to Developer Counter-Productivity
@xpepper
xpepper / Single Responsibility Principle.md
Last active March 23, 2023 21:05
Uncle Bob on the Single Responsibility Principle

(from SOLID Principles with Uncle Bob - Robert C. Martin - http://www.hanselminutes.com/145/solid-principles-with-uncle-bob-robert-c-martin)

Single Responsibility Principle, what does it mean? It means that a software module should have one reason to change, then that's what I call a responsibility, a reason to change.

So for example, take a payroll application, if there's an employee class in that payroll application, you could imagine that it might have methods for calculate pay or perhaps another method for print a report, perhaps another method in the employee object for save me to the database, and what's unfortunate about these three methods existing in the same class is that they have all three completely different reasons to change. The payroll, the calculate pay will change if the accountants decides on a new way of calculating pay. The report generator will change if the people who consume the reports want the format of the reports to change. The save function will change if the DBA's decid

@xpepper
xpepper / What's the difference between a Junior Intermediate Senior developer.md
Last active December 30, 2022 15:12
What's the difference between a Junior, an Intermediate and a Senior developer?

(https://www.quora.com/Whats-the-difference-between-a-Junior-Intermediate-Senior-developer)

What's the difference between a Junior / Intermediate / Senior developer?

Junior is capable but needs someone with more experience to teach, mentor, guide, or direct them. They are still learning, on the job, and you should expects the risks associated with such a person.

Intermediate can work on their own but isn't ready to lead, manage, mentor, or teach. These are the core of any team. They are proficient in their respective language and are probably learning others.

Senior devs are those beyond the bounds of a skillset. They may be leaders, teachers, or mentors in your organization. They can direct the priorities, roadmap, and business related to the development of your product. They are likely proficient in more than one technology, not necessarily other programming languages; perhaps they are familiar with database architecture, search algorithms and science, hardware and scalability, et