Skip to content

Instantly share code, notes, and snippets.

@alexfdz
alexfdz / postmortem_template.md
Created June 8, 2022 12:00
Postmortem template

YYYYMMDD INCIDENT_NAME

What happened?

Include a timeline

  • Input - when the bug(s) reached production
  • Detection - when the incident was detected. It initiates the incident management process (e.g. SLA for incident resolution starts).
  • Resolution - when the incident was resolved (e.g. through a workaround, final fix, rollback, etc). This is the end of incident management (e.g. SLA for incident resolution ends)

What was the impact?

@alexfdz
alexfdz / _new_live_template.md
Last active October 25, 2017 09:38
IntelliJ live template for mocked delegates
  1. Add a custom.xml file to:
  • Windows: <your_user_home_directory>.IntelliJ IDEA<version_number>\config\templates
  • Linux: ~IntelliJ IDEA/config/templates
  • macOS: ~/Library/Preferences/IntelliJ IDEA/templates
  1. Add the content (next snippet)
  2. Restart IntelliJ

gif

@alexfdz
alexfdz / CustomerStepDefinitions.java
Created June 8, 2013 12:48
Cucumber + Spring MVC Test: Multiple step definitions entities with a shared context
@WebAppConfiguration
@ContextConfiguration("classpath:cucumber.xml")
public class CustomerStepDefinitions {
@Autowired
protected StepDefinitionsContext context;
@When("^I search for all the exisiting resources and format \"([^\"]*)\"$")
public void I_search_for_all_the_exisiting_resources_and_format(String mediaType) throws Throwable {
MediaType requestedMediatype = MediaType.parseMediaTypes(mediaType).get(0);
@alexfdz
alexfdz / ELEntity.java
Created January 20, 2013 19:42
JSP Expression Language: Variable input arguments and custom methods declaration
package com.example;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;