Skip to content

Instantly share code, notes, and snippets.

package br.com.zeroth.zth_product_srv.config;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.concurrent.TimeUnit;
version: "3"
services:
db:
image: mysql:5.7
platform: linux/x86_64
environment:
MYSQL_DATABASE: "db"
MYSQL_USER: "jpauser"
MYSQL_PASSWORD: "jpapwd"
MYSQL_ROOT_PASSWORD: "pwd"
INSERT INTO product (id, name, description, price) VALUES
(1, 'Smartwatch', '4-slice with variable browning control', 478.0),
(2, 'Refrigerator', '10000mAh with fast charging', 323.65),
(3, 'External Hard Drive', 'Oscillating with remote control', 651.1),
(4, 'Printer', 'Oscillating with remote control', 100.8),
(5, 'Router', 'Double door with water dispenser', 217.6),
(6, 'Coffee Maker', '30-pint with continuous drain', 1124.45),
(7, 'Tablet', '24-inch Full HD', 753.66),
(8, 'Router', 'Energy-efficient 12000 BTU', 781.7),
(9, 'Laptop', '1080p HD projection', 379.12),
@guaracyalima
guaracyalima / readme.md
Last active November 12, 2024 16:56
Desafio 0 to Hero Academy #L1

0 to Hero Academy

Level: L1

Implementação em breve no YouTube

Desafio: Calculadora de Juros Compostos

Você precisa criar uma calculadora de juros compostos que ajudará usuários a estimar o saldo de uma aplicação ao longo do tempo. A calculadora deve ter os seguintes métodos principais:

spring:
resources:
cache:
cachecontrol:
max-age: 3600
no-transform: true
cache-public: true
package br.com.zeroth.zth_product_srv.config;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.concurrent.TimeUnit;
server:
port: 8001
spring:
application:
name: zth-config-srv
banner:
location: classpath:banner.txt
cloud:
config:
@guaracyalima
guaracyalima / SecurityConfigProperties.java
Created October 27, 2024 02:43
SecurityConfigProperties
@Component
@ConfigurationProperties(prefix = "security.config")
@Data
public class SecurityConfigProperties{
private int maxLoginAttempts;
private int sessionTimeOut;
private boolean enableTwoFactor;
}
name: Code Coverage 0th
on:
pull_request:
branches: [ "feature/jacoco" ]
push:
branches: [ "feature/jacoco" ]
jobs:
build:
function ftx() {
console.log(
"%cAdvanced Tracking © 2024 all rights reserved \n Instagram https://www.instagram.com/ke.advancedtracking/ \n WhatsApp.: https://api.whatsapp.com/send?phone=556196288506&text=Olá%20pessoal%20da%20Advanced%20Tracking \nAcesse nosso site: www.advancedtraking.com.br",
"font-size:20px;color:green;"
);
setTimeout(() => {
let cta = document.getElementById("bt_pre_cta");