Skip to content

Instantly share code, notes, and snippets.

View nidhi-canopas's full-sized avatar

nidhi-canopas

View GitHub Profile
Resources:
ApiGateway:
Type: AWS::ApiGateway::RestApi
Properties:
Description: test API Gateway
EndpointConfiguration:
Types:
- REGIONAL
BinaryMediaTypes: ['*/*']
DisableExecuteApiEndpoint: false
Resources:
LambdaFunction:
Type: AWS::Lambda::Function
Properties:
FunctionName:
Fn::Sub: "test-lambda"
Description: Demo LambdaFunction for learning using cloudformation
Runtime: "go1.x"
Code:
S3Bucket: your_s3_bucket_name
AWSTemplateFormatVersion: 2010-09-09
Description: Deploy serverless demo application.
Resources:
LambdaExecutionRole:
Type: AWS::IAM::Role
Properties:
RoleName:
Fn::Sub: "test-lambda-role"
AssumeRolePolicyDocument:
@nidhi-canopas
nidhi-canopas / custom_chart.vue
Created August 17, 2022 03:47
Medium like bar chart with customization
<template>
<div style="width: 800px" @mouseleave="getBackOriginalChart">
<Bar
ref="chart1"
:chart-data="chartData"
:chart-options="{
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: { display: false },
<template>
<div style="width: 800px" @mouseleave="getBackOriginalChart">
<Bar
ref="chart1"
:chart-data="chartData"
:chart-options="{
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: { display: false },
<Bar
:chart-data="chartData"
:chart-options="{
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: { display: false },
title: { display: true, text: 'Customised chart title' },
},
}"
<template>
<Bar :chart-data="chartData" />
</template>
<script >
const chartData = {
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul"],
datasets: [
{
label: "Dataset 1",
<template>
<Bar />
</template>
<script >
import { Bar } from "vue-chartjs";
import {
Chart as ChartJS,
Title,
Tooltip,
package main
import (
"github.com/gin-gonic/gin"
"gorm-test/controllers"
"net/http"
)
func main() {
r := setupRouter()
package database
import (
"fmt"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)
const DB_USERNAME = "root"
const DB_PASSWORD = "root"