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: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: service-no-type-load-balancer-enforce-extention | |
spec: | |
validationFailureAction: enforce | |
background: false | |
rules: | |
- name: default | |
match: |
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
# Given a string, split the string into two substrings at every possible point. | |
# The rightmost substring is a suffix. The beginning of the string is the prefix. | |
# Determine the lengths of the common prefix between each suffix and the original string. | |
# Sum and return the lengths of the common prefixes. Return an array where each element i is the sum for string i. | |
# Complete the 'commonPrefix' function below. | |
# The function is expected to return an INTEGER_ARRAY. | |
# The function accepts STRING_ARRAY inputs as parameter. | |
# Let's break this problem down in several stages to make it easier to solve: |
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 React from 'react'; | |
import { AuthenticationState, AzureAD } from 'react-aad-msal'; | |
import ReactDOM from 'react-dom/client'; | |
import { BrowserRouter } from 'react-router-dom'; | |
import App from './App'; | |
import './index.css'; | |
import reportWebVitals from './reportWebVitals'; | |
import { LoginType, MsalAuthProvider } from 'react-aad-msal'; | |
// Msal Configurations |
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 | |
def maximum_sequential_difference(numbers): | |
"""Return the maximum difference between 2 numbers in a List where the index of the smallest number is greater than the index of the largest number, calculated with linear complexity.""" | |
# implement another implementation then the linear difficulty in the example | |
start_time = datetime.now() | |
current_difference = 0 | |
lenght = len(numbers) |
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
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo *Click* |
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 { SNSEvent } from 'aws-lambda'; | |
import superagent from 'superagent'; | |
function envkey(key: string): string { | |
if (!process.env[key]) { | |
throw new Error(`Missing mandatory environment variable: ${key}`); | |
} | |
return process.env[key] as string; | |
} |
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
const profile = pm.collectionVariables.get("aws_profile") | |
if (!profile) { | |
console.log('No aws_profile variable set, using aws_profile: default') | |
pm.collectionVariables.set("aws_profile", "default"); | |
} | |
const a = pm.collectionVariables.get("aws_access_key") | |
const b = pm.collectionVariables.get("aws_secret_key") | |
if (!a && !b) { | |
console.log('Using nn-auth served aws_access_key and aws_secret_key at collection level') |
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
const eventExporterHelmChart = new eks.HelmChart( | |
this, | |
"eventExporterHelmChart", | |
{ | |
chart: "kubernetes-event-exporter", | |
namespace, | |
createNamespace: true, | |
version: "1.4.2", | |
cluster: props.cluster, | |
release: "kubernetes-event-exporter", |
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 botocore.signers import RequestSigner | |
import boto3 | |
import re | |
import base64 | |
import requests | |
import json | |
import sys | |
import sigv4 | |
import urllib3 |
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 constructs import Construct, IConstruct | |
import jsii | |
from aws_cdk import App, Stack, SecretValue, Aspects, IAspect, CfnResource | |
from aws_cdk import ( | |
aws_iam as iam, | |
) | |
# This is an example Aspect that adds a permissions boundary to an IAM Role | |
# I didn't clean imports sorry |