Skip to content

Instantly share code, notes, and snippets.

View stfsy's full-sized avatar
💭
I may be slow to respond.

Stefan Pfaffel stfsy

💭
I may be slow to respond.
  • Allianz Technology
  • Barcelona, Spain
  • X @stfsy
View GitHub Profile
Supplier<String> supplier = () -> service.sayHelloWorld(param1);
String result = Decorators.ofSupplier(supplier)
.withBulkhead(Bulkhead.ofDefaults("name"))
.withCircuitBreaker(CircuitBreaker.ofDefaults("name"))
.withRetry(Retry.ofDefaults("name"))
.withFallback(asList(CallNotPermittedException.class, BulkheadFullException.class),
throwable -> "Hello from fallback")
.get()
import { getTraceIdFromLocalStorage } from "./local-storage.js"
export default async (name, callback) => {
const now = Date.now()
const result = callback.apply()
if (result && typeof result.finally === 'function') {
return result.finally(logExecutionTime(now, name))
} else {
logExecutionTime(now, name)
[
{
"alias": "Developer machine - pun intended"
"created_at": "2023-07-01",
"created_by": "2585cf7c-0561-4f40-9186-1e5380f20e49",
"expires_at": "...",
"permissions": {
"api_keys": {
"action": "read",
"targets": []
{
"alias": "Developer machine - pun intended"
"created_at": "...",
"created_by": "...",
"expires_at": "...",
"permissions": {
"api_keys": {
"action": "read",
"targets": [
"2c62c6ef-4704-431c-b27b-d587af614898",
{
"first_name": "Max",
"second_name": "%%$$&&",
"birthday": "drop database"
}
deployments/
├── france/
│ ├── stage-dev/
| │ ├── checkout/
│ │ │ └── application.yml
│ │ ├── dashboard/
│ │ │ └── application.yml
│ │ ├── login/
| │ | └── application.yml
| | └── tracking.csv
@stfsy
stfsy / jsconfig.json
Created January 8, 2022 07:28
JSConfig for VSCode with Vetur with Vue.js
{
"include": [
"./src/**/*"
],
"compilerOptions": {
"checkJs": true,
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
@stfsy
stfsy / folder-structure.txt
Last active January 5, 2022 17:28
Folder structure for GitOps approach to global deployments
deployments/
├── france/
│ ├── checkout/
│ │ └── application.yml
│ ├── dashboard/
│ │ └── application.yml
│ └── login/
│ └── application.yml
├── germany/
│ ├── checkout/
@stfsy
stfsy / dashboard-frontend.yml
Last active January 5, 2022 17:46
Description of a deployment artifact with release version, team members and links to documentation
version: 1
application:
name: portfolio-dashboard
group: example.com
version: 1.2.3
repository: libs-releases
team:
product-owner: captain@example.com
developers:
- john@example.com
@stfsy
stfsy / dependabot.yml
Created December 29, 2021 14:57
Dependabot configuration for Github Actions. Will check NPM dependencies and GitHub actions versions weekly and send a PR for outdated ones.
version: 2
updates:
- package-ecosystem: npm
assignees:
- stfsy
directory: /
schedule:
interval: weekly
versioning-strategy: increase