Skip to content

Instantly share code, notes, and snippets.

View lazaronixon's full-sized avatar

Lázaro Nixon lazaronixon

View GitHub Profile
@lazaronixon
lazaronixon / WebSecurityFilter.java
Last active June 19, 2019 00:02
SpringBoot Simple Secure API
import java.io.IOException;
import java.util.Objects;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
@lazaronixon
lazaronixon / address.rb
Last active September 4, 2018 13:26
Simple Form Object
# name, state, city
class Address < ApplicationRecord
has_one :location, as: :locable, dependent: :destroy
end