Skip to content

Instantly share code, notes, and snippets.

View toughyear's full-sized avatar

Rajeev Singh Naruka toughyear

View GitHub Profile
@toughyear
toughyear / nextAPI.js
Created September 15, 2020 08:04
NextJS API with Firebase example
import { getData } from "../../helper";
export default async function(req, res) {
return new Promise((resolve, reject) => {
getData()
.then(response => {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json');
res.setHeader('Cache-Control', 'max-age=180000');
res.end(JSON.stringify(response))
@toughyear
toughyear / index.html
Created January 8, 2020 16:16
index,html boilerplate for Bootstrap enabled web page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Title</title>
<!-- all links here in head -->
<link rel="shortcut icon" type="image/png" href="img/meteor-solid.png" />
<link rel="stylesheet" href="./css/bootstrap.min.css" />
@toughyear
toughyear / different-texts-fading-in.markdown
Created January 7, 2020 13:39
Different texts fading in