Skip to content

Instantly share code, notes, and snippets.

View Kira9204's full-sized avatar

Erik Welander Kira9204

View GitHub Profile
@Kira9204
Kira9204 / cert.sh
Last active September 2, 2026 17:56
ACME.SH Hetzner DNS Docker script
#!/usr/bin/env bash
set -Eeuo pipefail
on_error() {
local exit_code=$?
local line=$1
local cmd=$2
echo "\e[31m[ERROR]\e[0m Command failed at line $line with exit code $exit_code: $cmd"
exit "$exit_code"
}
# syntax=docker/dockerfile:1
#
# Dependencies
#
FROM node:26-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
#
@Kira9204
Kira9204 / gist:f55ad07dab58c5fa354e04e04bffe049
Last active September 3, 2024 08:32
@nonull checks Java Jakarta vs Lombok
The `@NotNull` annotation from Jakarta Bean Validation (formerly Javax Validation) and the `@NonNull` annotation from Lombok serve similar but distinct purposes in Java development. Here's a breakdown of the key differences:
### 1. **Purpose and Usage**
- **Jakarta `@NotNull`**:
- **Purpose**: It is a validation constraint used primarily in Java EE or Spring applications to enforce that a particular field or method parameter should not be `null`.
- **Usage**: Typically used on fields, method parameters, or method return types. It is part of the Bean Validation API, which means it's used in contexts where objects are validated, such as when data is being processed by a framework like Spring or Hibernate.
- **Effect**: Triggers a validation error if the annotated element is `null`, often used in combination with a validation framework that checks these constraints at runtime.
```java