Skip to content

Instantly share code, notes, and snippets.

@candoom
candoom / resticheat.md
Created March 6, 2023 08:12 — forked from perfecto25/resticheat.md
Restic cheatsheet

Restic backup application - commands cheatsheet

Installation & config

  1. add Retic repo
  2. yum install restic

add a Restic credential file to root

vim /root/.restic
@candoom
candoom / create_user_and_kubeconfig_rancher2.sh
Created May 25, 2022 07:29 — forked from superseb/create_user_and_kubeconfig_rancher2.sh
Create local user and generate kubeconfig in Rancher 2 via API
#!/bin/bash
RANCHERENDPOINT=https://your_rancher_endpoint/v3
# The name of the cluster where the user needs to be added
CLUSTERNAME=your_cluster_name
# Username, password and realname of the user
USERNAME=username
PASSWORD=password
REALNAME=myrealname
# Role of the user
GLOBALROLE=user
@candoom
candoom / Excel Password Generator
Created July 22, 2021 09:12 — forked from coccoinomane/Excel Password Generator.md
Copy this formula into an Excel cell to generate a random 9-character password
Copy this formula into an Excel cell to generate a random 9-character password. Then
Copy & Paste Special (as value) in place in order to avoid the cell being continuosly
re-evaluated. Formula taken from:
http://ficility.net/2013/04/26/easy-excel-based-password-generator/.
=CHAR(RANDBETWEEN(65;90))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(65;90))&RANDBETWEEN(1000;9999)&CHAR(RANDBETWEEN(42;43))
>>> If it does not work, try like this (commas instead of semicolons):
=CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(1000,9999)&CHAR(RANDBETWEEN(42,43))
@candoom
candoom / docker-nfs-volumes.md
Created March 23, 2021 19:34 — forked from ruanbekker/docker-nfs-volumes.md
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
  mysql-test-1
#!/bin/bash
# Proof of concept of running playbooks in AWX and recording them in ARA
# From a vanilla CentOS8 image: https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2
# Add local bin directory to PATH so we can use things installed with "pip install --user"
export PATH=$PATH:~/.local/bin
dnf -y update
# Install Ansible and Python3
@candoom
candoom / install-kubernetes-flannel-centos7.md
Created December 11, 2020 13:01 — forked from rkaramandi/install-kubernetes-flannel-centos7.md
Installing Kubernetes with the Flannel Network Plugin on CentOS 7

Install Prerequisites on ALL (Worker and Master) Nodes

Let's remove any old versions of Docker if they exist:

sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine