Skip to content

Instantly share code, notes, and snippets.

View serafdev's full-sized avatar
🌍
الله اكبر

فارس بالسرور serafdev

🌍
الله اكبر
View GitHub Profile
@serafdev
serafdev / MicroCephSetup.md
Last active July 18, 2024 16:35
MicroCeph with Internal Network Interface

Command on the "master" node

I've had issues where my VM setup has multiple network interfaces but only 1 interface should be used for my nodes to communicate with eachother. MicroCeph kept using the external IP and external subnet during setup, the following command overrides the defaults to use the correct IP (here using the 10.10.103.0/24 subnet to communicate internally)

sudo microceph cluster bootstrap --microceph-ip 10.10.103.218 --mon-ip 10.10.103.218 --public-network 10.10.103.0/24 --cluster-network 10.10.103.0/24

After that simply run the usual microceph init or microceph add-node, the correct IP will be assigned to the token

@fracasula
fracasula / encrypt_decrypt.go
Last active January 27, 2025 10:04
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"
)
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
import sys
import traceback
import praw
BOT_USERNAME = ''
BOT_PASSWORD = ''
BOT_CLIENT_ID = ''
BOT_CLIENT_SECRET = ''