Skip to content

Instantly share code, notes, and snippets.

View shmileee's full-sized avatar
🦒

Oleksandr shmileee

🦒
View GitHub Profile
@shmileee
shmileee / vim.log
Created September 25, 2020 08:10
vim-sleuth
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.012 000.012: --- VIM STARTING ---
000.119 000.107: Allocated generic buffers
001.443 001.324: locale set
001.452 000.009: GUI prepared
@shmileee
shmileee / mirror-dockerhub-repos-to-ecr.sh
Last active September 8, 2023 11:38
Mirror all private images from DockerHub organisation to ECR
#!/bin/bash
ecr_url="<account id>.dkr.ecr.<region>.amazonaws.com"
# set username, password, and organization
dockerhub_username="<user>"
dockerhub_password="<password>"
dockerhub_organization="<org>"
dockerhub_api_url="https://hub.docker.com/v2"
dockerhub_token=$(curl -s -H "Content-Type: application/json" -X POST -d \
// ==UserScript==
// @name Insert Ś
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author shmileee
// @match *://docs.google.com/spreadsheets/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
terraform {
required_version = "~> 1.0.0"
backend "s3" {
bucket = "<bucket>"
key = "admin-global/terraform.tfstate"
dynamodb_table = "terraform-state-lock"
region = "eu-west-1"
encrypt = "true"
}
@shmileee
shmileee / custom_filter.py
Last active April 16, 2022 23:47
main.yml
def custom_filter(things):
equal = set()
for thing in things:
...
return ...
class FilterModule(object):
provider "aws" {
region = "eu-west-1"
assume_role {
role_arn = var.role_arn != "" ? var.role_arn : null
}
}
provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint