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 { auth } from "auth/helpers/auth"; | |
| import { createMiddleware } from "hono/factory"; | |
| type Session = typeof auth.$Infer.Session; | |
| export function authMiddleware<Type extends "optional" | "guest" | "admin" | "required">( | |
| type: Type = "required" as Type, | |
| ) { | |
| return createMiddleware<{ | |
| Variables: Type extends "optional" |
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
| // Packages | |
| import { cache } from "react" | |
| // Types | |
| import type { z } from "zod" | |
| import type { ZodSchema } from "zod" | |
| // ------------------------------------------------- | |
| // Type | |
| // ------------------------------------------------- |
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
| // Packages | |
| import { useCallback, useReducer } from "react" | |
| // Constants | |
| const invalid = Symbol() | |
| // types | |
| type Method<State> = (prev: State, curr: Partial<State>) => State | |
| type Updater<State> = { |
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
| // ------------------------------------------------- | |
| // Properties | |
| // ------------------------------------------------- | |
| // HTML related | |
| var canvasElement = document.querySelector("canvas"); | |
| var canvas = canvasElement.getContext("2d"); | |
| var quantity = canvasElement.getAttribute("data-snow"); | |
| // Javascript related |
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
| // ------------------------------------------------- | |
| // Types | |
| // ------------------------------------------------- | |
| type Pagination<Data = any> = { | |
| data: Data; | |
| perPage: number; | |
| totalNumber: number; | |
| currentPage: number; | |
| lastPage: number; |
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
| export const getRawWord = (type) => | |
| ({ | |
| undefined: "`${[![]][!![] + ![]]}`", | |
| true: "([] + !![])", | |
| false: "([] + ![])", | |
| object: "`${{}}`", | |
| }[type]); | |
| export const getCharacter = (char) => | |
| ({ |
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
| // ------------------------------------------------- | |
| // Variables | |
| // ------------------------------------------------- | |
| let debug: boolean = false; | |
| let context: string[] = []; | |
| // ------------------------------------------------- | |
| // Debug methods | |
| // ------------------------------------------------- |
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
| <?php | |
| namespace Tests; | |
| //General | |
| use Laravel\Sanctum\Sanctum; | |
| use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
| use Model\User; |
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
| const prefix = [ | |
| "Bolso", | |
| "Bolbo", | |
| "Boldo", | |
| "Bozo", | |
| "Bolo" | |
| ]; | |
| const suffix = [ | |
| "naro", |