Skip to content

Instantly share code, notes, and snippets.

View valdemarpereira's full-sized avatar

Valdemar Pereira valdemarpereira

View GitHub Profile
@valdemarpereira
valdemarpereira / GEMINI.md
Created October 8, 2025 20:55 — forked from ksprashu/GEMINI.md
Personal GEMINI.md as on 29-07-2025

Gemini Agent: Core Directives and Operating Protocols

// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
@valdemarpereira
valdemarpereira / clean_code.md
Created January 4, 2019 09:56 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

pipeline {
// run on jenkins nodes tha has java 8 label
agent { label 'java8' }
// global env variables
environment {
EMAIL_RECIPIENTS = '[email protected]'
}
stages {
stage('Build with unit testing') {
public class OrderServiceTest {
private static final int TEST_ORDER_ID = 15;
private static final int TEST_SHOES_PRICE = 2;
private static final int TEST_SHIRT_PRICE = 1;
@InjectMocks
private OrderService testingObject;
@Spy
private PriceService priceService;