Skip to content

Instantly share code, notes, and snippets.

View straiforos's full-sized avatar
🎩

Stephen Traiforos straiforos

🎩
View GitHub Profile
@straiforos
straiforos / resume.json
Last active April 5, 2024 20:43
resume.json
{
"basics": {
"name": "Stephen Traiforos",
"image": "https://www.gravatar.com/avatar/2802aa3aba37aee55d3baf94b42e90bf",
"label": "Fullstack Software Engineer",
"email": "stephen@traiforos.com",
"phone": "(508) 494-5048",
"summary": "Passionate full stack engineer seeking a highly collaborative team environment with a variety of architectures and technical challenges. Self driven developer with a proven track record of providing innovative solutions while leading by example through a thoughtful understanding of the customer experience, business priorities, and market opportunity.",
"location": {
"postalCode": "MA 02119",
@straiforos
straiforos / EnumValidator.java
Created February 16, 2022 14:35 — forked from fuxingloh/EnumValidator.java
Java Enum, @ValidEnum with Constraint that supports JsonIgnoreProperties if not registered. Basically: how to handle unknown enum values in swift & java.
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* Created by: Fuxing
*/
public class EnumValidator implements ConstraintValidator<ValidEnum, Enum> {
@Override
public boolean isValid(Enum value, ConstraintValidatorContext context) {
if (value == null) return false;
@gbzarelli
gbzarelli / AspectSpringBootEndpoints
Last active January 13, 2022 03:02
Aspect Spring Boot Endpoints
https://stackoverflow.com/questions/33744875/spring-boot-how-to-log-all-requests-and-responses-with-exceptions-in-single-pl
Currently Spring Boot has the Actuator feature to get the logs of requests and responses.
But you can also get the logs using Aspect(AOP).
Aspect provides you with annotations like: @Before, @AfterReturning, @AfterThrowing etc.
@Before logs the request, @AfterReturning logs the response and @AfterThrowing logs the error message, You may not need all endpoints' log, so you can apply some filters on the packages.
@pavankjadda
pavankjadda / How to select Spring boot profile from maven.md
Last active December 18, 2023 13:07
How to select Spring boot profile from maven.md

How to select Spring boot profile from maven?

  1. Define following profiles in pom.xml
<profiles>
   <profile>
        <id>dev</id>
        <properties>
            <activatedProperties>dev</activatedProperties>
        </properties>
        <activation>
@fuxingloh
fuxingloh / EnumValidator.java
Created June 25, 2019 19:13
Java Enum, @ValidEnum with Constraint that supports JsonIgnoreProperties if not registered. Basically: how to handle unknown enum values in swift & java.
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* Created by: Fuxing
*/
public class EnumValidator implements ConstraintValidator<ValidEnum, Enum> {
@Override
public boolean isValid(Enum value, ConstraintValidatorContext context) {
if (value == null) return false;
@julianpoemp
julianpoemp / inline-web-worker-typescript.md
Last active March 4, 2024 10:52
Easy inline web worker with Typescript

Easy web worker with Typescript

This code makes use of two classes: TsWorker and TsWorkerJob. TsWorker initializes an inline worker and runs one job. The TsWorker class needs to be initialized with a function and the function's arguments as an array.

Example:

 const tsWorker = new TsWorker();

 // create a new job. You can create a sub class of TsWorker so that you don't have to add the function any time.
@maksim-tolo
maksim-tolo / formatjs-examples.md
Last active June 11, 2024 13:31
Custom angular wrapper for format.js & react-intl PoC examples

Simple text

Angular

<h2
  translate="KIBANA-DISCOVER-SEARCHING"
  default-message="Searching"
></h2>
@fleeto
fleeto / keycloak.yaml
Created April 8, 2018 18:37
Keycloak sidecar
---
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: httpbin-proxy
data:
proxy.json: |-
{
"target-url": "http://localhost:8000",
@karmanov
karmanov / gist:499e0dfdf8e5ce119ad4
Created July 20, 2014 08:07
spring.jpa.hibernate.ddl-auto values
validate: validate the schema, makes no changes to the database.
update: update the schema.
create: creates the schema, destroying previous data.
create-drop: drop the schema at the end of the session.
@staltz
staltz / introrx.md
Last active June 29, 2024 15:58
The introduction to Reactive Programming you've been missing