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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: bucket | |
Resources: | |
Bucket: | |
Type: AWS::S3::Bucket |
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 | |
CHECKOUT_DIR=/tmp/checkout | |
COMMIT_MESSAGE= | |
BRANCH_NAME= | |
UPDATE_SCRIPT= | |
SEARCH= | |
GROUP_NAME= | |
PUSH=no |
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 | |
# | |
# Copyright 2022 - Binx.io B.V. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
--- | |
name: Create and publish a Docker image | |
"on": | |
push: | |
tags: | |
- '*' | |
branches: | |
- 'main' |
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 botocore | |
from typing import Optional | |
def get_boto_caller_client_meta() -> Optional[botocore.client.ClientMeta]: | |
""" | |
returns the ClientMeta of the boto calling boto client. | |
""" | |
for frame in map(lambda f: f.frame, inspect.stack()): | |
s = frame.f_locals.get('self') | |
if s and hasattr(s, "meta") and isinstance(s.meta, botocore.client.ClientMeta): |
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 | |
# | |
# NAME | |
# gcp-least-privileged - lists all Google IAM roles which contain the specified permission | |
# | |
# EXAMPLE | |
# gcp-least-privileged compute.disks.delete | |
# | |
main() { | |
local permission |
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
gcloud compute networks subnets list --network default --format 'value(region)' | \ | |
sed -e 's^.*regions/^^' | \ | |
xargs -P 8 -n 1 gcloud compute networks subnets update default --enable-private-ip-google-access --region |
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 http from 'k6/http'; | |
import { | |
sleep, | |
check | |
} from 'k6'; | |
import {Trend} from 'k6/metrics'; | |
import privatebin from 'k6/x/privatebin'; | |
let createMetric = new Trend('01 - create-paste'); | |
let getMetric = new Trend('02 - get-paste'); |
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
from locust import SequentialTaskSet, HttpUser, between, task | |
from locust.contrib.fasthttp import FastHttpUser | |
from pbincli.api import PrivateBin | |
from pbincli.format import Paste | |
class SequenceOfTasks(SequentialTaskSet): | |
def on_start(self): | |
self.payload = "hello world" | |
self.url = None |
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
variable "region" { | |
type = string | |
default = "europe-west4" | |
} | |
variable "project" { | |
type = string | |
} | |
variable "image" { |
NewerOlder