Skip to content

Instantly share code, notes, and snippets.

View gionn's full-sized avatar
⚔️

Giovanni Toraldo gionn

⚔️
View GitHub Profile
@gionn
gionn / graviton.yaml
Last active March 11, 2024 14:47
Helm values for installing Alfresco on EKS with Graviton nodes with Helm Charts v8.x.x
alfresco-control-center:
nodeSelector:
"kubernetes.io/arch": arm64
ingress:
hosts:
- host: FQDN
paths:
- path: /control-center
pathType: Prefix
tls:
#!/usr/bin/env bash
namespace=${1-fleet-default}
delete_before_timestamp=${2-2000-01-01T00:00:00Z}
jsonPath='{range .items[*]}{@.metadata.creationTimestamp}{"_"}{@.metadata.name}{"_"}{@.spec.clusterLabels.management\.cattle\.io/cluster-name}{"\n"}{end}'
cluster_regs=$(kubectl get clusterregistration -o=jsonpath="$jsonPath" -n $namespace | sort)
read -ra regs -d '' <<< "${cluster_regs}"
last_idx=$(( ${#regs[@]} - 1 ))
for (( i = 0; i < $last_idx; i+= 1 )); do
@gionn
gionn / sources.list
Created June 16, 2023 19:45
Debian 12 Bookwork sources.list
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb http://security.debian.org/ bookworm-security non-free contrib main non-free-firmware
deb http://deb.debian.org/debian/ bookworm-updates non-free contrib main non-free-firmware
deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware
@gionn
gionn / components.yaml
Last active January 23, 2023 11:10
Patched metrics-server v0.6.2 to make it work on EKS
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@gionn
gionn / macos-fix.md
Created May 4, 2022 07:42
How to make macos working for the average Linux user

MacOs Fix

This is a reminder for all the things I changed to improve my experience using MacOs as a Linux user.

  • External (third-party) mouse scrolling is broken due to accelleration. Fix it with Mac Mouse Fix
  • Clipboard manager with handy history dialog. See Maccy
@gionn
gionn / opera-prune.service
Created January 9, 2022 10:36
Fantom opera systemd service for node and pruning
[Unit]
Description=FTM Node daemon for Pruning Snapshot
[Service]
User=peastew
Type=oneshot
WorkingDirectory=/usr/local/bin
ExecStart=/usr/local/bin/opera --genesis /home/peastew/.opera/mainnet.g --cache 16384 --config /home/peastew/.opera/config.toml --datadir /home/peastew/.opera snapshot prune-state
PIDFile=/home/peastew/.opera/ftmnodeprune.pid
Restart=no
@gionn
gionn / gist:cb1a60e15b8cbfeeeec4dc5aafddc75b
Created August 30, 2021 07:32
Check the expiration date of an SSL certificate exposed by a local webserver (nginx, SNI, letsencrypt)
openssl s_client -connect localhost:443 -servername server.domain.tld | openssl x509 -noout -dates
@gionn
gionn / crs_download.py
Last active October 18, 2020 07:44
J.CRS - Centro Regionale Sangue - Script per scaricamento dati automatico
import requests
import time
# J.CRS Credentials
username = ''
password = ''
# Export interval
date_from = '01-09-2020'
date_to = '17-10-2020'
# Downloaded file name: {association_id}{location_id}.zip
@gionn
gionn / snapshot.sh
Last active September 3, 2020 06:57
Grab snapshot (single frame) from RTSP ipcam and publish to S3
#!/bin/bash -e
# Move inside a tmpfs directory
cd /dev/shm
# Grab a snapshot of the RTSP source and save on current folder
# rtsp_transport tcp to avoid packet loss (truncated image)
# qscale:v to adjust jpeg quality (2 is best, 31 worst)
ffmpeg -loglevel panic -y -rtsp_transport tcp -i rtsp://192.168.199.91 -vframes 1 -qscale:v 4 snapshot.jpg
@gionn
gionn / .Xresources.hidpi
Created May 30, 2020 15:29
i3 automatic HiDPI on login when external monitor is detected
Xft.dpi: 192
! These might also be useful depending on your monitor and personal preference:
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb