Skip to content

Instantly share code, notes, and snippets.

View fracasula's full-sized avatar
🏋️‍♂️
One pomodoro after another

Francesco Casula fracasula

🏋️‍♂️
One pomodoro after another
View GitHub Profile
@fracasula
fracasula / encrypt_decrypt.go
Last active July 17, 2025 09:12
A simple example with Golang that uses AES-128 to encrypt and decrypt messages.
package mycrypto
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"io"
"time"
)
@fracasula
fracasula / .vimrc
Last active April 4, 2020 08:10
My .vimrc configuration
set nocompatible " don't try to be compatible with vi
syntax enable
set number " show line numbers
set noerrorbells " no sound on error
set visualbell
set encoding=utf-8
set wrap
set expandtab " spaces instead of tabs
set tabstop=4 " 1 tab = 4 spaces
set history=1000
@fracasula
fracasula / mongouuid.go
Created February 15, 2022 13:02
Golang MongoDB UUID
package mongouuid
import (
"fmt"
"github.com/google/uuid"
"go.mongodb.org/mongo-driver/bson/bsontype"
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)
@fracasula
fracasula / hs_err_pid1.log
Created June 13, 2023 17:15
Pulsar broker hs_err_pid1.log file
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fbddfd00632, pid=1, tid=203
#
# JRE version: OpenJDK Runtime Environment (17.0.5+8) (build 17.0.5+8-Ubuntu-2ubuntu120.04)
# Java VM: OpenJDK 64-Bit Server VM (17.0.5+8-Ubuntu-2ubuntu120.04, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xae2632]
#