This file contains 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 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 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 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 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 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 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 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 |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"github.com/hashicorp/nomad/api" | |
"github.com/sirupsen/logrus" | |
) |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"time" | |
"github.com/hashicorp/nomad/api" | |
"github.com/sirupsen/logrus" | |
) |
NewerOlder