Skip to content

Instantly share code, notes, and snippets.


Giovanni Toraldo gionn

View GitHub Profile
gionn / components.yaml
Last active January 23, 2023 11:10
Patched metrics-server v0.6.2 to make it work on EKS
View components.yaml
apiVersion: v1
kind: ServiceAccount
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
kind: ClusterRole
gionn /
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 / opera-prune.service
Created January 9, 2022 10:36
Fantom opera systemd service for node and pruning
View opera-prune.service
Description=FTM Node daemon for Pruning Snapshot
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
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)
View gist:cb1a60e15b8cbfeeeec4dc5aafddc75b
openssl s_client -connect localhost:443 -servername server.domain.tld | openssl x509 -noout -dates
gionn /
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 /
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:// -vframes 1 -qscale:v 4 snapshot.jpg
gionn / .Xresources.hidpi
Created May 30, 2020 15:29
i3 automatic HiDPI on login when external monitor is detected
View .Xresources.hidpi
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
gionn / dynatrace-soft-restart.rb
Created April 10, 2020 08:53
Chef recipe to automatically restart docker containers or generic services affected by an update of dynatrace agent
View dynatrace-soft-restart.rb
ruby_block "check-restart-dynatrace" do
block do
headers = {:Authorization => "Api-Token #{provider['api_key']}"}
client =['url'])
processes = JSON.parse(client.get('/processes?includeDetails=true', headers))
hosts = JSON.parse(client.get('/hosts?includeDetails=true', headers))
host_found = { |host| host['discoveredName'] == node['hostname'] }.first
if host_found
host_id = host_found['entityId'] { |process| process['fromRelationships']['isProcessOf'].include?(host_id) }
View radio_italiane_streaming.txt
Da usare per lettori come VLC e similari.
RTL Best:
RTL ItalianStyle:
gionn / wireless
Last active February 18, 2018 20:03
Increase wifi speed on Gargoyle router (TP-Link TL-WR1043N/ND v1)
View wireless
root@router:~# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'platform/qca955x_wmac'
option htmode 'HT40-'
option noscan '1'
option channel '7'