Skip to content

Instantly share code, notes, and snippets.

View xpepper's full-sized avatar
💭
😏

Pietro Di Bello xpepper

💭
😏
View GitHub Profile
@stuart-warren
stuart-warren / CreateJob.sh
Last active March 8, 2024 16:20
Create a job in Jenkins (or folder) using the HTTP API
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# create folder

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

Some info about Rust

RUST came out from Firefox to solve problem related to: performance and security.

Why Rust is "faster" compared to C++, C or other compiled language?

  • Similar to these languages
  • Strong Type System
  • Rust compiler uses LLVM suite: Rust compiles to LLVM bytecode and then to assembly language
  • You can write less code compared to other programming language
@acolyer
acolyer / service-checklist.md
Last active January 30, 2024 17:39
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@ValentinaServile
ValentinaServile / CleanCode-it.md
Last active May 2, 2023 14:00
Appunti sui principi del Clean Code

Clean Code ITA

Nomi

  • Tutte le variabili, costanti, funzioni, classi etc devono avere un nome significativo. Se il nome ha bisogno di un commento per essere spiegato non è abbastanza significativo.

  • Sono da evitare nomi che possano sviare dal vero significato della variabile

# MODEL
class Case < ActiveRecord::Base
include Eventable
has_many :tasks
concerning :Assignment do
def assign_to(new_owner:, details:)
transaction do
@xpepper
xpepper / whiteboardClean.sh
Created June 3, 2015 14:17
whiteboard effect
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"%
@henrik
henrik / rules.md
Last active May 23, 2022 12:31
Sandi Metz' four rules from Ruby Rogues episode 87. Listen or read the transcript: http://rubyrogues.com/087-rr-book-clubpractical-object-oriented-design-in-ruby-with-sandi-metz/
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done. And your view can only know about one instance variable.

You can break these rules if you can talk your pair into agreeing with you.

@xpepper
xpepper / CI Alternatives.md
Last active April 17, 2022 12:41
CI, alternative a confronto :-)

Continuous Integration - Know your opportunities

Continuous Integration in a nutshell

Continuous Integration (CI) is an important practice every team should adopt in order to detect defects and errors early and solve integration problems easily. Roughly speaking we may say that CI is a practice that allows the growth of solid software by giving greater confidence to the developers and better products to the final customers.

The concept behind CI is fairly simple: the codebase is owned by several developers that continuously integrate their changes to a common version control system. For each integration the system runs a predefined set of tasks automatically; these tasks may vary from running all the tests to building all the components.

interface GameRulesInputBoundary
void moveSouth()
end
interface GameRulesOutputBoundary
void moveSouthSucceed()
end
class GameRules implements GameRulesInputBoundary
def init(GameRulesOutputBoundary outputBoundary)