Skip to content

Instantly share code, notes, and snippets.

View alabdulaal's full-sized avatar

Ahmed Al Abdulaal alabdulaal

View GitHub Profile
import { withAuthUserTokenSSR, AuthAction, type AuthUser } from "next-firebase-auth";
import { NextApiRequest, NextApiResponse } from "next";
const checkServerSideAuth =
typeof window !== "undefined"
? () => {} // "withAuthUserTokenSSR" can only be called server-side.
: withAuthUserTokenSSR({
whenAuthed: AuthAction.RENDER,
whenUnauthed: AuthAction.REDIRECT_TO_LOGIN,
authPageURL: "401",
@alabdulaal
alabdulaal / lineType.h
Created March 16, 2017 07:49
Find slope, and point of intersection of two points
#ifndef LINETYPE_H
#define LINETYPE_H
class Line{
private:
double a;
double b;
double c;