This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Nodejs snippet to get presigned url for uploading and viewwing a object in AWS S3 bucket. | |
import { | |
GetObjectCommand, | |
PutObjectCommand, | |
S3Client, | |
} from "@aws-sdk/client-s3"; | |
import { | |
getSignedUrl, | |
S3RequestPresigner, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. reverse an array | |
let a = [1, 2, 3, 4]; | |
let len = a.length; | |
for (let i = 0; i < len / 2; i++) { | |
let startIndex = i; | |
let endIndex = len - 1 - i; | |
let temp = a[startIndex]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Lato } from 'next/font/google' | |
import { DM_Sans } from 'next/font/google' | |
const lato = Lato({ | |
weight: ['100', '300', '400', '700', '900'], | |
subsets: ['latin'], | |
variable: '--font-lato', | |
}) | |
const dm_sans = DM_Sans({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select version(); | |
---MOVIES TABLE--- | |
select * from movies; | |
--- insert rows --- | |
INSERT INTO movies (movie_id, movie_name, genre) | |
VALUES (101, 'rocket', 'comedy'), | |
(102, 'intersteller','horror' ); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.