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 | |
NODESAPI=/api/v1/nodes | |
function getNodes() { | |
kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name' | |
} | |
function getPVCs() { | |
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\ |
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
import SwiftUI | |
let dateFormatter = DateFormatter() | |
struct NoteItem: Codable, Hashable, Identifiable { | |
let id: Int | |
let text: String | |
var date = Date() | |
var dateText: String { | |
dateFormatter.dateFormat = "MMM d yyyy, h:mm a" |
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
Method 1 – Using /etc/environment - Set up http proxy permanently using /etc/environment | |
====================================================================== | |
http_proxy="http://myproxy.server.com:8080/" | |
https_proxy="http://myproxy.server.com:8080/" | |
ftp_proxy="http://myproxy.server.com:8080/" | |
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" | |
HTTP_PROXY="http://myproxy.server.com:8080/" | |
HTTPS_PROXY="http://myproxy.server.com:8080/" | |
FTP_PROXY="http://myproxy.server.com:8080/" | |
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com" |
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
{ | |
"start": "-PT3H", | |
"widgets": [ | |
{ | |
"height": 15, | |
"width": 24, | |
"y": 22, | |
"x": 0, | |
"type": "explorer", | |
"properties": { |
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
{ | |
"start": "-PT3H", | |
"widgets": [ | |
{ | |
"height": 15, | |
"width": 24, | |
"y": 22, | |
"x": 0, | |
"type": "explorer", | |
"properties": { |
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
{ | |
"widgets": [ | |
{ | |
"height": 15, | |
"width": 24, | |
"y": 22, | |
"x": 0, | |
"type": "explorer", | |
"properties": { | |
"metrics": [ |
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
{ | |
"widgets": [ | |
{ | |
"height": 15, | |
"width": 24, | |
"y": 21, | |
"x": 0, | |
"type": "explorer", | |
"properties": { | |
"metrics": [ |
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
{ | |
"Comment": "A description of my state machine", | |
"StartAt": "RaiseJiraTicket", | |
"States": { | |
"RaiseJiraTicket": { | |
"Type": "Task", | |
"Parameters": { | |
"DocumentName": "AWS-CreateJiraIssue", | |
"Parameters": { | |
"IssueSummary": [ |
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 | |
from __future__ import print_function | |
import boto3 | |
print('Loading function') | |
#set region | |
REGION = 'us-west-2' | |
#set the SNS topic ARN you want to alert on | |
SNS_TOPIC_ARN = 'arn:aws:sns:REGION:ACCOUNT_ID:TOPIC_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
import os | |
import json | |
import boto3 | |
class QueueMessageSender: | |
def __init__(self) -> None: | |
self.s3_client = boto3.client("s3") | |
self.sqs_client = boto3.client("sqs") |
NewerOlder