Skip to content

Instantly share code, notes, and snippets.

View ak-git's full-sized avatar

ak-git

View GitHub Profile
@ak-git
ak-git / SecondSaturdayOfMonth.java
Created February 18, 2024 18:28
Как получить вторую субботу текущего месяца используя Date Time API?
package com.ak.app;
import org.junit.jupiter.api.Test;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;
class SecondSaturdayOfMonth {
@Test
@ak-git
ak-git / docker-compose.yaml
Created October 12, 2024 17:37
Actuator healthcheck
services:
spring-petclinic:
image: spring-petclinic:latest
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1
interval: 30s
timeout: 5s
start_period: 30s
retries: 5
@ak-git
ak-git / bash.shell
Created December 20, 2024 06:42
Dynamo db export to csv
aws dynamodb scan \
--table-name CyberBase \
--select ALL_ATTRIBUTES \
--page-size 500 \
--max-items 100000 \
--output json | \
jq -r '
def extract_value:
if type == "object" then
if .N != null then .N