Skip to content

Instantly share code, notes, and snippets.

View ioggstream's full-sized avatar

Roberto Polli ioggstream

View GitHub Profile
@ioggstream
ioggstream / ansc.yaml
Last active February 21, 2025 17:15
ansc.yaml
openapi: 3.0.0
info:
title: Data model per evento
version: '1.29.0'
paths:
"/":
get:
description: Metodo di default
responses:
"200":
#
# Useful aliases for docker to be placed in /etc/profile.d
#
dip(){
# Show docker ips
local arg=${1}
if [ -z "$arg" ]; then
arg=$(docker ps -q)
fi
docker inspect --format ' {{.Name}} {{.NetworkSettings.IPAddress}} {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $arg
openapi: 3.0.3
info:
title: Schema del Servizio di Notifica Generalità
description: |-
Lo schema dati del servizio che viene invocato per ottenere le generalità, l’esistenza in vita, la residenza, l’eventuale domicilio digitale presenti in ANPR per un cittadino, alla data di riferimento della richiesta
Pattern Model applicati:
- [AUDIT_REST_02 ] Inoltro dati tracciati nel dominio del Fruitore REST con correlazione
- [BLOCK_REST] Blocking REST
- [INTEGRITY_REST_02] Integrità del payload messaggio REST in PDND
version: '1.0.0'
components:
schemas:
PuntoDiContattoOnline:
title: Punto di Contatto Online
description: |
Questa classe rappresenta un punto di contatto online. Essa raggruppa un insieme di tipi di canali di contatto online come account di social network, email, siti web, ecc.
type: object
x-jsonld-type: "https://w3id.org/italia/onto/SM/OnlineContactPoint"
x-jsonld-context:
"@vocab": "https://w3id.org/italia/onto/SM/"
openapi: 3.0.3
info:
title: Schema del Servizio di Notifica Generalità
description: |-
Lo schema dati del servizio che viene invocato per ottenere le generalità, l’esistenza in vita, la residenza, l’eventuale domicilio digitale presenti in ANPR per un cittadino, alla data di riferimento della richiesta
Pattern Model applicati:
- [AUDIT_REST_02 ] Inoltro dati tracciati nel dominio del Fruitore REST con correlazione
- [BLOCK_REST] Blocking REST
- [INTEGRITY_REST_02] Integrità del payload messaggio REST in PDND
version: '1.0.0'
@ioggstream
ioggstream / resident-person-schema.yaml
Created June 13, 2024 13:59
Resident Person schema
#
# ## Welcome!
# Edit the following schema examples in this semantic editor
# based on Swagger Editor.
#
openapi: 3.0.3
components:
schemas:
EducationLevel:
x-jsonld-context:
@ioggstream
ioggstream / ssh-fido-sk.md
Created November 16, 2023 13:11
Using ssh with FIDO secure keys

@here Ciao a tutti! Se avete una chiavetta FIDO, potete securizzare il vostro ssh creando una coppia di chiavi apposita come segue. Questo permette di accedere con un 2FA al server git anche senza particolari configurazioni lato server, che potrebbe però rifiutare chiavi non -sk.

  1. Plug your FIDO key
  2. create the ssh keypair based on a sk spec (e.g., ed25519-sk or ecdsa-sk)
# Try with ed25519-sk first...
$ ssh-keygen -t ed25519-sk -f ~/.ssh/id_ed25519_sk
Generating public/private ed25519-sk key pair.
You may need to touch your authenticator to authorize key generation.
@ioggstream
ioggstream / zipdiff.py
Last active March 21, 2023 08:31
Print differences between two zip/jar files.
import zipfile
import yaml
import sys
def zipdiff(z1, z2):
"""A function that compares the files of two zip files and returns a list of files that are result."""
files1 = z1.namelist()
files2 = z2.namelist()
result = []
for file in files1:
@ioggstream
ioggstream / devspace.yaml
Created January 12, 2023 18:24
Super SAST on devspaces
version: v2beta1
name: docker-compose
# This is a list of `deployments` that DevSpace can create for this project
deployments:
super-sast:
helm:
# Under `values` we can define the values for this Helm chart used during `helm install/upgrade`
# You may also use `valuesFiles` to load values from files, e.g. valuesFiles: ["values.yaml"]
values: