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 | |
qm create 9999 --name "ubuntu24lts-template" --memory 1024 --cores 1 --net0 virtio,bridge=vmbr1 | |
qm importdisk 9999 /mnt/pve/local-sas/template/iso/noble-server-cloudimg-amd64.img local-zfs | |
qm set 9999 --ide2 local-zfs:cloudinit | |
qm set 9999 --scsihw virtio-scsi-pci --scsi0 local-zfs:vm-9999-disk-0 | |
qm set 9999 --boot order=scsi0 | |
qm set 9000 --serial0 socket | |
qm set 9999 --ipconfig0 ip=dhcp | |
qm set 9999 --ciuser ubuntu --cipassword 'XXXXX' |
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
// This script merges all incoming items into a single object. | |
const combinedObject = {}; | |
// Loop through each item that flows into this node. | |
for (const item of items) { | |
// Merge the properties of the current item's JSON into our single object. | |
// Object.assign() copies all properties from the source (item.json) | |
// to the target (combinedObject). | |
// If a key already exists, it will be overwritten by the last one found. |
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 | |
# Elasticsearch credentials | |
ELASTIC_USER="elastic" | |
ELASTIC_PASSWORD="elasticpassword" | |
ELASTIC_URL="http://10.1.1.1:9200" | |
# File containing index names | |
INDEX_FILE="filtered-index.txt" |
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 | |
set -e | |
# YAML config file path | |
CONFIG_FILE="./x-disks-labels.yaml" | |
while read disk_name <&3 | |
do | |
echo "Disk: $disk_name" |
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 python | |
import argparse | |
import re | |
from os import walk | |
from os.path import join | |
def get_patterns(patterns_dir): | |
patterns = {} | |
for (dirpath, _, filenames) in walk(patterns_dir): | |
for name in filenames: |
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 | |
projects=$(gcloud projects list --format="value(projectId)") | |
for project in $projects; do | |
echo "Checking project: $project" | |
if ! gcloud services list --project "$project" --enabled | grep -q compute.googleapis.com; then | |
echo "Compute Engine API not enabled for $project. Skipping..." | |
echo "--------------------" |
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
--- | |
helmfiles: | |
- "../controller/helmfile.yaml" | |
repositories: | |
- name: ghcr-actions | |
url: ghcr.io/actions/actions-runner-controller-charts | |
oci: true | |
releases: |
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 | |
echo "Github CLI script to rerun checks for PRs" | |
# used for loadtesting github arc runner scale set - autoscaler | |
export GH_PAGER="" | |
export REPO_PREFIX="xxx-" | |
export LIMIT="10" | |
export PR_SEARCH_QUERY="is:pr is:open draft:false created:>=2024-06-01" | |
export REPO_SORT="updated" #best-match|forks|help-wanted-issues|stars|updated |
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 | |
# Set the project ID | |
PROJECT_ID="XXXXXXXXX" | |
# Get instance information in JSON format | |
gcloud compute instances list \ | |
--project "${PROJECT_ID}" \ | |
--format="json" > ./instances.json |
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 | |
instance_list="instances.cfg" | |
date=$(date +'%FT%TZ') | |
mkdir -pv $(pwd)/cronjob-logs | |
mkdir -pv $(pwd)/cronjob-logs/$date | |
while read instance_name <&3 | |
do | |
echo "----------------------------------------------" 2>&1 | tee -a $(pwd)/cronjob-logs/$date/$instance_name-cronjob.log |
NewerOlder