Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
tags="TagSet=[{Key=Terraform,Value=false},{Key=Environment,Value=global} ]"
aws s3api put-bucket-tagging --bucket gitlab-upload-backup --tagging $tags
@dasgoll
dasgoll / gist:d3f3e374e5552f210c7e877756f91d46
Created November 12, 2023 01:27
sonarqube docker-compose.yaml
version: '2'
services:
sonarqube:
image: sonarqube
ports:
- '9000:9000'
networks:
- sonarnet
environment:
@dasgoll
dasgoll / gist:390c933d00ae7f3490433d8db8c49d63
Created October 26, 2023 11:03
delete image tag on ecr repo
# delete image tag on ecr
aws ecr batch-delete-image --repository-name nginx --image-ids imageTag=1.24-alpine-slim-v1
@dasgoll
dasgoll / gist:5599435741eb95243d9b05c81725d68a
Created October 17, 2023 08:39
force delete S3 bucket in aws
export AWS_PROFILE=k2k
bucket_name="k2k-dev-vpc-flow-logs-s3serverlogs"
aws s3api put-bucket-versioning --bucket ${bucket_name} --versioning-configuration Status=Enabled --region eu-central-1
delete-bucket -p k2k -f -b ${bucket_name} -r eu-central-1 ; aws s3 rm s3://${bucket_name} --region eu-central-1
An error occurred (NoSuchBucket) when calling the PutBucketVersioning operation: The specified bucket does not exist
kind load docker-image example-app-1:0.1.0 --name fluxcd
docker exec -it fluxcd-control-plane bash
crictl images |grep example-app
username='[email protected]'
echo $username | sed -f url_escape.sed
# url_escpape.sed
s:%:%25:g
s: :%20:g
s:<:%3C:g
s:>:%3E:g
@dasgoll
dasgoll / gist:2c8ef980e9a8f1fb1f7782487edc300a
Created August 27, 2023 09:57
Connect sqlcmd to SQL Server
sqlcmd -S openbanking-dev.jay.com -U admin -P F00B00T00 -C
select name from sys.databases
GO
@dasgoll
dasgoll / gist:36723448163c4ac6d0b7203c482ee16a
Created August 18, 2023 14:27
jq parse with dot in the field
jq -r '.payload."kubernetes.io".namespace'
@dasgoll
dasgoll / gist:707386c7c14f5f7d972c3ec6cedc8f35
Last active July 11, 2023 07:31
bash - Create environment variable with dot
env "my.home=/tmp/someDir" zsh
env "my.home=/tmp/someDir" mvn spring-boot:run
env "my.name=Foo Bar Baz" bash -c "printenv my.name"
# Source: https://gist.github.com/0466cff59d08cabb5276f593ca2e513d
#########################################
# Skaffold #
# How to Build and Deploy In Kubernetes #
# https://youtu.be/qS_4Qf8owc0 #
#########################################
#########
# Setup #