Skip to content

Instantly share code, notes, and snippets.

View devops-school's full-sized avatar

DevOps School devops-school

View GitHub Profile
@devops-school
devops-school / ansible-playbook-example-windows.md
Last active April 25, 2024 11:27
15 Ansible Playbooks Example for Windows Administration

1. Copying Files

---
- hosts: win

  tasks:
  - name: Copy File
    win_copy:
      src: C:\output.pdf
@devops-school
devops-school / login.php
Last active April 8, 2024 13:22
I am creating a form which would take inputs as a email id, username and password but this has to be inserted into Moodle Mysql database and when i login to moodle with the same username and passworde, it should allow login. I understand that moodle uses bcrypt with salt but i m not sure how to write this php code which would be alternate to moo…
<?php
// Moodle configuration file inclusion - adjust the path as needed
require('/path/to/your/moodle/config.php');
// User data
$email = 'example@example.com'; // Assume this comes from your form
$username = 'newusername'; // Assume this comes from your form
$password = 'newpassword'; // Assume this comes from your form, needs to be hashed
// Hash the password using bcrypt, compatible with Moodle's password hashing
@devops-school
devops-school / README.md
Created April 8, 2024 07:41
Lucene Cheatsheet
@devops-school
devops-school / gist:c7c7af6529980d89c0aa0311cb39b340
Created April 7, 2024 17:29
Google Cloud: Step by Step Tutorials for setting up Multi-cluster Ingress (MCI)
# Application Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
namespace: default
spec:
selector:
matchLabels:
app: my-app
@devops-school
devops-school / Multi-clusterIngress.yaml
Created April 7, 2024 17:15
Example Deployment YAML for Multi-cluster Ingress with FrontendConfig and BackendConfig
# Application Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-app
namespace: default
spec:
replicas: 2
selector:
matchLabels:
@devops-school
devops-school / elasticsearch.txt
Created September 21, 2022 05:37
Elasticsearch 8.X in Centos 7
Elasticsearch 8.X in Centos 7
-------------------------------
192.168.1.8
https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html
$ yum install wget unzip -y
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.4.2-linux-x86_64.tar.gz
@devops-school
devops-school / README.md
Created July 4, 2023 05:31
Sample Resume: DevOps Engineer

Your Name

Address: [Address], [City, State, ZIP]
Phone: [Phone Number]
Email: [Email Address]

Objective

Highly skilled and motivated Site Reliability Engineer (SRE) with [X] years of experience in designing, building, and maintaining highly scalable and reliable systems. Seeking a challenging position where I can leverage my expertise in automation, monitoring, incident response, and infrastructure management to ensure the availability, performance, and efficiency of critical applications and services.

Education

@devops-school
devops-school / smtp-test-1.sh
Last active April 3, 2024 16:19
Bash/Shell Script to test SMTP SES Credentials
#!/bin/bash
# Set the SMTP server name and port number
SMTP_SERVER="email-smtp.ap-south-1.amazonaws.com"
SMTP_PORT="587"
# Set the sender email address and AWS SES username and password
SENDER_EMAIL="contact@XXXXXXXX.com"
SES_USERNAME="XXXXXXXXXXX"
SES_PASSWORD="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"