Monday, September 18, 2023

SVG to JSX converter

 use:

https://svg2jsx.com/


It will convert svg to JSX for react


How to edit SVG?

use: https://boxy-svg.com/

Friday, September 8, 2023

Script to build and launch Spring boot

 cd webapp

config="dev"

JVMMaxHeapSize="1512"

echo "Parameter passed to run the server for $config configuration"

echo "Max heap size defined $JVMMaxHeapSize MB "

mvn clean install "-Dhk.conf=$config" "-Dhk.jvm.memory=$JVMMaxHeapSize"

cd ..

cd sb-web

#mvn -e -X exec:exec "-Dhk.conf=$config" "-Dhk.jvm.memory=$JVMMaxHeapSize" -Dgpg.skip

./mvnw spring-boot:run

cd ..

sample s3 policies

 {

    "Version": "2012-10-17",

    "Statement": [

        {

            "Sid": "PublicReadGetObject",

            "Effect": "Allow",

            "Principal": "*",

            "Action": "s3:GetObject",

            "Resource": "arn:aws:s3:::bn/*"

        }

    ]

}


cors:

[

    {

        "AllowedHeaders": [

            "*"

        ],

        "AllowedMethods": [

            "GET",

            "PUT",

            "POST",

            "DELETE"

        ],

        "AllowedOrigins": [

            "*"

        ],

        "ExposeHeaders": [

            "ETag"

        ]

    }

]


{

    "Version": "2012-10-17",

    "Statement": [

        {

            "Sid": "PublicReadGetObject",

            "Effect": "Allow",

            "Principal": "*",

            "Action": "s3:GetObject",

            "Resource": "arn:aws:s3:::bn/*",

            "Condition": {

                "StringLike": {

                    "aws:Referer": "https://*.x.com/*"

                }

            }

        },

        {

            "Sid": "PublicReadGetObject2",

            "Effect": "Allow",

            "Principal": {

                "AWS": "arn:aws:iam::7788:user/suser"

            },

            "Action": "s3:GetObject",

            "Resource": "arn:aws:s3:::bn/*",

            "Condition": {}

        }

    ]

}