Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Krzysztof Szyper ChristophShyper

🏠
Working from home
View GitHub Profile
@ChristophShyper
ChristophShyper / UBC125XLT-Polish-Aviation.txt
Last active May 25, 2021
UBC125XLT - Scan125 Scanner Data File - Polish aviation - more at https://shyper.pro/ubc125xlt.html
View UBC125XLT-Polish-Aviation.txt
! Scan125 Scanner Data File - #scan125# - #full#
! Scan125 Control Program © Nick Bailey 2013-2020 V3.3.0.0 http://www.nick-bailey.co.uk
! Comments added To this file will be removed!
! PLEASE Do Not EDIT Or MESS With THIS FILE
MDL=UBC125XLT
VER=!Version 1.01.00
VOL=12
SQL=3
CNT=8
BLT=AF
@ChristophShyper
ChristophShyper / Account_details.md
Last active Feb 17, 2021
Filter AWS accounts for Terraform
View Account_details.md

Reading and fitlering AWS accounts' attributes with Terraform

To fix https://github.com/hashicorp/terraform-provider-aws/issues/17656 I created a simple script using external data source for Terraform.

Using it I'm able, for example, to list all ACTIVE accounts with IDs or emails.

Usage

local {
  accounts_emails = split(",", data.external.accounts.result.Outputs)
@ChristophShyper
ChristophShyper / Timeouts.md
Last active Jul 19, 2020
Terraform timeouts
View Timeouts.md

Terraform timeouts

Resource

Will be executed only on trigger change

resource "null_resource" "first" {
}

resource "null_resource" "sleep" {
  provisioner "local-exec" {
@ChristophShyper
ChristophShyper / Metadata_DynamoDB.md
Last active Feb 17, 2021
Pass metadata between Terraform modules using DynamoDB. Only scalar values are possible. Maps or sets will cause issues. Much faster than remote state.
View Metadata_DynamoDB.md

Save metadata in DynamoDB

resource "aws_dynamodb_table_item" "organization" {
  table_name = "my-dyn-db-table"
  hash_key = "KeyName"
  item = jsonencode({
    KeyName = {
      S = "organization"
    }
    Outputs = {
@ChristophShyper
ChristophShyper / Metadata_S3.md
Last active Nov 13, 2020
Pass metadata between Terraform modules using S3. Much faster than remote state.
View Metadata_S3.md

Save outputs from a resource to a YAML file:

# Module Alpha
# https://www.terraform.io/docs/providers/aws/r/s3_bucket_object.html
resource "aws_s3_bucket_object" "outputs" {
  bucket = local.metadata_bucket
  key    = "${local.key_path}/organization.yml"
  content = yamlencode({
    "organization_arn" : aws_organizations_organization.default.arn
    "organization_id" : aws_organizations_organization.default.id
@ChristophShyper
ChristophShyper / interesting_repos.md
Last active Apr 27, 2020
List of some repos I find interesting
View interesting_repos.md
Repo Description Link
alphagov/aws-auth AWS authentication wrapper to handle MFA and roles https://github.com/alphagov/aws-auth
beezz/elastalert-lambda Lambda handler for Yelp's ElastAlert https://github.com/beezz/elastalert-lambda
blueimp/aws-lambda Collection of functions for AWS Lambda https://github.com/blueimp/aws-lambda
cloudposse/tfmask Terraform utility to mask select output from terraform plan and terraform apply https://github.com/cloudposse/tfmask
cytopia/awesome-ci Awesome Continuous Integration - Lot's of tools for git, file and static source code analysis. https://github.com/cytopia/awesome-ci
cytopia/docker-terraform-docs Alpine-based multistage-build version of terraform-docs and terraform-docs-replace in multiple versions to be used for CI and other reproducible automations https://github.com/cytopia/docker-terraform-docs
cytopia/docker-terragrunt Alpine-based multistage-build version of Terragrunt and Terr
@ChristophShyper
ChristophShyper / check_ip_and_cidr.ipynb
Last active May 26, 2020
Google Colab notebook getting external IP plus CIDR and network name from Whois. Great for figuring out CIDR blocks to whitelist for databases access by Colab.
View check_ip_and_cidr.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChristophShyper
ChristophShyper / keybase.md
Last active Mar 12, 2020
My Keybase proof on GitHub
View keybase.md

Keybase proof

I hereby claim:

  • I am ChristophShyper on github.
  • I am biotyk (https://keybase.io/biotyk) on keybase.
  • I have a public key whose fingerprint is 7B58 8495 C657 E51B 054B 2085 C9A1 2AA4 E28D AFF1

To claim this, I am signing this object:

@ChristophShyper
ChristophShyper / wsl2-docker.md
Last active Sep 13, 2021
Instruction how to set up WSL2 to work with Docker in Windows 10
View wsl2-docker.md

On Windows 10 build 18917 or higher

Win / Enable WSL and VMP

PowerShell:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

Win / Set WSL 2 as default