Skip to content

Instantly share code, notes, and snippets.

@mayhems1
mayhems1 / mongodb.md
Last active May 4, 2022 08:42
MongoDB cheat sheet

MongoDB cheatsheet

Replica Set

Perform Maintenance on Replica Set Members

@mayhems1
mayhems1 / apt.md
Last active September 24, 2021 16:05
Linux cheat sheet

APT cheat sheet

apt or apt-get

apt install and --reinstall
    remove
    purge or --purge
    upgrade
 update

MySQL

Check version

mysql -V
SHOW VARIABLES LIKE "%version%";
@mayhems1
mayhems1 / hostfile.md
Last active August 11, 2020 04:30
MacOS

Info about host file at MacOS

Clear DNS cache

sudo killall -HUP mDNSResponder

MacOS 10.5 and 10.6

@mayhems1
mayhems1 / drafts_zabbix.md
Last active August 12, 2020 03:04
Zabbix

Zabbix cheat sheet

Errors

  • Cannot adopt OID in NET-SNMP

On Ubuntu 16/18 install snmp-mibs-downloader

apt install snmp-mibs-downloader
@mayhems1
mayhems1 / rsync.md
Created October 2, 2020 16:49
Rsync cheat sheet

Rsync cheat sheet

copy with progress

rsync -ah --progress source destination
@mayhems1
mayhems1 / encrypt.md
Last active October 2, 2020 18:11
encrypt files

encrypt files in Linux cheat sheet

7z

Install

$ sudo apt-get install p7zip-full
# yum install p7zip-full
@mayhems1
mayhems1 / hardware.md
Last active September 24, 2021 16:06
Hardware info

Info about hardware in Linux

Network

lshw -class network
lshw -class network -short
ethtool eno1
cat /sys/class/net/eno1/carrier

Ceph: Configuring Ceph

Some examples

Set backfill for a OSD

ceph tell 'osd.*' injectargs '--osd-max-backfills 1'