Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / RDMA Cheat Sheet
Last active November 16, 2022 20:01
RDMA Cheat Sheet
RDMA verification
This work assumes there are two nodes to run iscsi target/initiator environment.
--------------------------------------------------------------------------------------------------------
Load the RDMA drivers using the following command line
/etc/init.d/openibd start
If one is using the InfiniBand transport and he doesn't have a managed switch in the subnet, he has to start the Subnet Manager (SM). Doing this in one of the machines in the subnet is enough, this can be done with the following command line
/etc/init.d/opensmd start
--------------------------------------------------------------------------------------------------------
Verify that traffic is working
@githubfoam
githubfoam / vagrant command Cheat Sheet
Last active February 25, 2025 08:03
vagrant command Cheat Sheet
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
problem:
==> vg-nagios-09: Available bridged network interfaces:
1) Intel(R) Ethernet Connection (22) I219-V
2) Hyper-V Virtual Ethernet Adapter
==> vg-nagios-09: When choosing an interface, it is usually the one that is
==> vg-nagios-09: being used to connect to the internet.
==> vg-nagios-09:
vg-nagios-09: Which interface should the network bridge to?
@githubfoam
githubfoam / Gluster Cheat Sheet
Last active February 27, 2025 08:52
Gluster Cheat Sheet
Brick –> is basic storage (directory) on a server in the trusted storage pool.
Volume –> is a logical collection of bricks.
Cluster –> is a group of linked computers, working together as a single computer.
Distributed File System –> A filesystem in which the data is spread across the multiple storage nodes and allows the clients to access it over a network.
Client –> is a machine which mounts the volume.
Server –> is a machine where the actual file system is hosted in which the data will be stored.
Replicate –> Making multiple copies of data to achieve high redundancy.
Fuse –> is a loadable kernel module that lets non-privileged users create their own file systems without editing kernel code.
glusterd –> is a daemon that runs on all servers in the trusted storage pool.
RAID –> Redundant Array of Inexpensive Disks (RAID) is a technology that provides increased storage reliability through redundancy
@githubfoam
githubfoam / Vi Vim Cheat Sheet
Last active February 7, 2025 07:52
Vi Cheat Sheet
----------------------------------------------------------------------------------------------------
Vi stands for Visual,Vim stands for Vi IMproved.
----------------------------------------------------------------------------------------------------
Type o (lower case) to insert, or open, a blank line below the current line.
Type O (upper case) to insert a blank line above the current line
----------------------------------------------------------------------------------------------------
copy is called yank (y)
cut is called delete (d)
paste is called put (p)
----------------------------------------------------------------------------------------------------
@githubfoam
githubfoam / VagrantFile Cheat Sheet
Last active February 13, 2025 07:10
VagrantFile Cheat Sheet
------------------------------------------------------------------------------------------
you are running vagrant guest debian/bookworm64 on windows 11. this is setting in vagrant file below
zabbixcluster.vm.provision :ansible do |ansible|
ansible.playbook = "zabbix72.yml" # Path to your playbook inside the guest
ansible.install = true
# ansible.install_mode = "pip"
# ansible.version = "2.10.7"
@githubfoam
githubfoam / main.yml Cheat Sheet
Last active June 15, 2022 11:44
main.yml Cheat Sheet
--------------------------------------------------------------------------------------------------------------------
# =====LOCAL NOT REMOTE SSH==== ansible_connection=local
# operations center to remote control other hosts
[clients]
remotecontrol01 ansible_host=10.217.50.13 ansible_connection=local
[masters]
k8s-master01 ansible_host=10.217.50.10 ansible_connection=ssh ansible_ssh_private_key_file=/home/vagrant/.ssh/id_rsa ansible_user=vagrant
[workers]
-----------------------------------------------------------------------------------------------------
#disable public key authentication, connect as user root via ssh
sshuser@vg-ubuntu-01:~$ ssh root@vg-ubuntu-02 -o PubkeyAuthentication=no
-----------------------------------------------------------------------------------------------------
#connect with one private key
#access ec2-23-22-230-24.compute-1.amazonaws.com with a private key located in ~/.ssh/alice.pem
$ ssh -i ~/.ssh/alice.pem [email protected]
-----------------------------------------------------------------------------------------------------
$ cat ~/.ssh/config
gpg --version
gpg (GnuPG) 2.0.22
eval $(gpg-agent --daemon) -> make sure gpg-agent is running
gpg-agent -> Check if gpg-agent is running
gpg --gen-key -> generate a GPG key pair
gpg --list-secret-keys --keyid-format LONG -> List public and private key GPG keys.
A private key is required for signing commits or tags.
gpg --delete-secret-keys 3AA5C34371567BD2 -> delete secret keys
============================================================================
$ ansible-galaxy --version
ansible-galaxy 2.4.2.0
============================================================================
ansible-galaxy install --roles-path . -r requirements.yml
ansible-galaxy --offline init role_name
============================================================================
ansible-galaxy install -r requirements.yml
ansible-playbook playbook.yml -i inventory
============================================================================
@githubfoam
githubfoam / VirtualBox Cheat Sheet
Last active April 24, 2024 10:11
VirtualBox Cheat Sheet
==========================================================================================================
# 8. VBoxManage
https://www.virtualbox.org/manual/
==========================================================================================================
# Networking Modes
https://www.virtualbox.org/manual/ch06.html#network_bridged
==========================================================================================================
Windows Host
>vboxmanage --version