- Readability First: Prioritize clear, self-documenting code over clever solutions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Usage: | |
# ./download-k3s-airgap-images.sh [K3S_RELEASE_TAG] [ARCH] | |
# | |
# Examples: | |
# # Download for the latest stable release, auto-detect arch | |
# ./download-k3s-airgap-images.sh | |
# | |
# # Download for a specific release and architecture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: registry-ca | |
namespace: kube-system | |
labels: | |
k8s-app: registry-ca | |
spec: | |
selector: |
Disclaimer: These commands with wrong parameters could damage your system. Take care!
Before you use any commands on this page you MUST find out the bus number for the led control on your system
Run
i2cdetect -y 0
i2cdetect -y 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define an array of remote host IPs | |
hosts=("10.199.251.11" "10.199.251.12" "10.199.251.13") | |
# Loop through each host | |
for host in "${hosts[@]}"; do | |
echo "Connecting to $host..." | |
# Execute the command remotely to get the IP address and subnet mask of ens6f0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vc2-16c-64gb | |
vc2-16c-64gb-sc1 | |
vc2-1c-0.5gb-free | |
vc2-1c-1gb | |
vc2-1c-1gb-sc1 | |
vc2-1c-2gb | |
vc2-1c-2gb-sc1 | |
vc2-24c-96gb | |
vc2-24c-96gb-sc1 | |
vc2-2c-2gb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Appliance has finished | |
description: Do something when an appliance (like a washing machine or dishwasher) | |
has finished as detected by a power sensor. | |
domain: automation | |
input: | |
power_sensor: | |
name: Power Sensor | |
description: Power sensor entity (e.g. from a smart plug device). | |
selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define variables | |
$username = "kodekloud" # Username for the VM | |
$plainPassword = "VMP@55w0rd" # Your VM password | |
$vmSize = "Standard_B1s" | |
$azureVmPublisherName = "Canonical" | |
$azureVmOffer = "0001-com-ubuntu-server-jammy" | |
$azureVmSkus = "22_04-LTS" | |
# Creating VM credential; use your own password and username by changing the variables | |
$password = ConvertTo-SecureString $plainPassword -AsPlainText -Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define variables | |
$username = "kodekloud" #username for the VM | |
$plainPassword = "VMP@55w0rd" #your VM password | |
$vmSize = "Standard_B1s" | |
#Creating VM credential; use your own password and username by changing the variables | |
$password = ConvertTo-SecureString $plainPassword -AsPlainText -Force | |
$vmCredential = New-Object System.Management.Automation.PSCredential ($username, $password); | |
$azureVmPublisherName="Canonical" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from elasticsearch import Elasticsearch | |
from faker import Faker | |
import sys | |
import argparse | |
# Create the argument parser | |
parser = argparse.ArgumentParser(description='Elasticsearch command line tool') | |
# Add the command line arguments |
NewerOlder