Skip to content

Instantly share code, notes, and snippets.

View nnsense's full-sized avatar
💭
Docendo discimus

nnsense nnsense

💭
Docendo discimus
View GitHub Profile
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Matteo Migliaccio",
"label": "Cloud Architect",
"picture": "https://www.matteomigliaccio.it/mm.jpg",
"url": "https://matteomigliaccio.it",
@nnsense
nnsense / keyring-test.py
Created June 5, 2022 12:32
Testing the keyring usage with python
# !/usr/bin/env python3
# -*- coding: utf-8 -*-
import keyring
from keyring.backends import macOS
import platform
from getpass import getpass
from os import getenv
from keyrings.cryptfile.cryptfile import CryptFileKeyring
# Generate certificates suitable for a local deployment including .p12 and base64 for k8s usage
# It can also creates java keystore certs, delete/comment out related lines at the end of main to remove it. Make sure java is installed.
# To make this a bit more silent some command has stdout/stderr redirected to /dev/null, remove it to get full output
# Uncomment to get debug info
# set -Eexuo pipefail
trap 'declare rc=$?; >&2 echo "Unexpected error executing $BASH_COMMAND at ${BASH_SOURCE[0]} line $LINENO"; exit $rc' ERR
cert_extfile () {
@nnsense
nnsense / multi-pane.py
Created June 2, 2021 18:29
Python3 and curses: Multi-window test
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from threading import Thread
import curses, time, subprocess, io
commands = {'output': ""}
def input_window(window, r, c, prompt_string):
window.clear()
@nnsense
nnsense / 3dprintingNotes.md
Last active February 26, 2020 00:21
Unsorted notes about a journey into 3D printing by an absolute beginner
### Keybase proof
I hereby claim:
* I am nnsense on github.
* I am nnsense (https://keybase.io/nnsense) on keybase.
* I have a public key ASCDzQl82XAJyrXiJmAa5flCiC4Je81mGu2OxQXBI4tjDgo
To claim this, I am signing this object:
@nnsense
nnsense / alias.sh
Created December 29, 2018 18:28
Useful aliases to be saved in /etc/profile.d/alias.sh
#yum
alias yums='yum search'
alias yumi='yum install'
alias yumup='yum update'
#ls
alias ll='ls -Xlh --color --group-directories-first --time-style=long-iso' # -X=sort by estension, -l=extended format, -h=human readable, time-style=long-iso display time in ISO YYY-mm-dd)
alias la='ls -Xlah --color --group-directories-first' # come sopra, ma vede i file nascosti.
alias ls='ls -hF --color' # add colors for filetype recognition
alias lx='ls -lXB' # sort by extension