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
{ | |
"keepWaitingPipelines": false, | |
"lastModifiedBy": "[email protected]", | |
"limitConcurrent": true, | |
"parameterConfig": [], | |
"stages": [ | |
{ | |
"baseLabel": "release", | |
"baseOs": "bionic", | |
"cloudProvider": "gce", |
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
aws ec2 --region us-east-1 describe-images --query 'reverse(sort_by(Images, &CreationDate))[0].ImageId' --output text |
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
while read line; do | |
branch=$(echo $line | awk '{print $1}') | |
message=$(echo $line| sed 's/origin[^ ]* //') | |
commits=$(git log origin/master --format=oneline --grep "$message") | |
if [ -n "$commits" ]; then | |
echo "$branch - $message" | |
echo "-" | |
echo "$commits" | |
echo "" | |
fi |
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
import boto3 | |
ec2 = boto3.client('ec2', region_name='us-east-2') | |
addresses = ec2.describe_addresses()['Addresses'] | |
for address in addresses: | |
if 'InstanceId' not in address: | |
continue |
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 | |
from google.cloud import monitoring_v3 | |
# # Using a service account with credentials in a json file: | |
# JSON_CREDS = 'monitoring.json' | |
# from oauth2client.service_account import ServiceAccountCredentials | |
# scopes = ["https://www.googleapis.com/auth/monitoring",] | |
# credentials = ServiceAccountCredentials.from_json_keyfile_name( | |
# JSON_CREDS, scopes) |
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 | |
# | |
# Script for disabling all alerts on a device | |
# chmod to make executable, then ./toggleSubjectAlerts.py -s [SubjectID] -t [SubjectType] -a [APIToken] -e [True/False] -g [groupName] | |
import requests | |
import json | |
import argparse | |
parser = argparse.ArgumentParser(description='This is a script for enabling / disabling all alerts on a device') |
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 bash | |
NAMESPACE=${1} | |
POD=${2} | |
COMMAND=${3:-sh} | |
USER=${4:-root} | |
KUBECTL=kubectl | |
NEW_POD_NAME=exec-user-${POD} | |
NEW_POD_NAME=${NEW_POD_NAME:0:63} # max len allowed |
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_id=$(ec2metadata --instance-id) | |
availability_zone=$(ec2metadata --availability-zone) | |
region=${availability_zone::-1} | |
asg_name=$(aws --region $region --output text autoscaling describe-auto-scaling-instances --instance-ids $instance_id --query 'AutoScalingInstances[0].AutoScalingGroupName') | |
first_instance_id=$(aws --region $region --output text autoscaling describe-auto-scaling-groups --auto-scaling-group-names $asg_name --query "AutoScalingGroups[].Instances[?HealthStatus == 'Healthy'].InstanceId" | sort | head) |
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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: spinnaker-ingress | |
namespace: spinnaker | |
annotations: | |
ingress.gcp.kubernetes.io/pre-shared-cert: "GOOGLE_MANAGED_CERT" | |
kubernetes.io/ingress.global-static-ip-name: "spinnaker" | |
kubernetes.io/ingress.allow-http: "false" | |
spec: |
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
;;; align-string.el --- align string components over several lines | |
;; Copyright (c) 2001 Markus Bjartveit Krüger | |
;; Author: Markus Bjartveit Krüger <[email protected]> | |
;; Created: 20-Sep-2001 | |
;; Version: 0.1 | |
;; Keywords: convenience | |
;; X-URL: http://www.pvv.org/~markusk/align-string.el |