Skip to content

Instantly share code, notes, and snippets.

View apoorvmote's full-sized avatar
✍️
writing tutorials on apoorv.blog

Apoorv Mote apoorvmote

✍️
writing tutorials on apoorv.blog
View GitHub Profile
...
<input autoComplete="off" type="text" name="title" id="todoTitle" ref={register} />
...
<select name="category" id="category" ref={register} />
...
<input type="radio" name="priority" id="low" value='low' className='mr-2' defaultChecked ref={register} />
...
<input type="radio" name="priority" id="med" value='med' className='mr-2' ref={register} />
...
<input type="radio" name="priority" id="high" value='high' className='mr-2' ref={register} />
exports.handler = async (event, context, callback) => {
const request = event.Records[0].cf.request
const headers = request.headers
const user = 'my-username'
const password = 'my-password'
{
"printWidth": 120,
"proseWrap": "always",
"semi": false,
"overrides": [
{
"files": ["*.html"],
"options": {
"parser": "go-template"
}
import { HostedZone } from '@aws-cdk/aws-route53';
import { HttpsRedirect } from '@aws-cdk/aws-route53-patterns';
import * as cdk from '@aws-cdk/core';
export class HttpsRedirectStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
// The code that defines your stack goes here
///////////////////////////////
// Part 5
const hostedZone = HostedZone.fromHostedZoneAttributes(this, 'hostedZoneWithAttrs', {
hostedZoneId,
zoneName: website_domain
})
new ARecord(this, 'aliasForCloudfront', {
target: RecordTarget.fromAlias(new CloudFrontTarget(distribution)),
zone: hostedZone,
version: '3'
vars:
COMMIT_MESSAGE: added new post
tasks:
default:
cmds:
- npm update
- git add .
FROM node:14.15.1-alpine3.12
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app
COPY package-lock.json /usr/src/app
# https://taskfile.dev
version: '3'
includes:
project1:
taskfile: ./project1/Taskfile.yml
dir: ./project1
project2:
taskfile: ./project2/Taskfile.yml
package main
import (
"encoding/json"
"fmt"
)
// OptionalInt is for json unmarshal
type OptionalInt struct {
Value int