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 { Box, Image } from "@chakra-ui/react"; | |
import * as qrCode from "@zag-js/qr-code"; | |
import { useMachine, normalizeProps } from "@zag-js/react"; | |
import { useId } from "react"; | |
// @ts-ignore-next-line | |
import YEYLogoChrome from "../../../assets/imgs/yey-logo-chrome-clear.png"; | |
export default function QRCode() { |
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
[ORG 0x7C00] | |
mov ah, 0x0E | |
mov al, 'H' | |
int 0x10 | |
mov al, 'e' | |
int 0x10 | |
mov al, 'l' | |
int 0x10 | |
mov al, 'l' |
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
function bitFlip(byte, bitPosition) { | |
// Membuat mask untuk bit flip | |
const mask = 1 << bitPosition; | |
return byte ^ mask; | |
} | |
function byteToBinaryString(byte) { | |
return byte.toString(2).padStart(8, "0"); | |
} |
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
wget https://gist.githubusercontent.com/ammarfaizi2/f55dbb7c918a660776c68c50319c7882/raw/1dd37e1fb96054b31f345381273e8a1702215002/ct.c; | |
gcc -O2 ct.c -o ct -lpthread; | |
./ct $(nproc); |
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 { NestFactory } from '@nestjs/core'; | |
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; | |
import { AppModule } from './app.module.js'; | |
async function bootstrap() { | |
const app = await NestFactory.create(AppModule); | |
const config = new DocumentBuilder() | |
.setTitle('Minjem Buku Perpustakaan SMK TI Garuda Nusantara') |
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
// Handler type when `next` is NOT provided and a response is expected | |
export type HandlerWithoutNext<E extends Env = any, P extends string = any, I extends Input = BlankInput, R extends HandlerResponse<any> = any> = | |
(c: Context<E, P, I>) => R; | |
// Handler type when `next` is provided | |
export type HandlerWithNext<E extends Env = any, P extends string = any, I extends Input = BlankInput, R extends HandlerResponse<any> = any> = | |
(c: Context<E, P, I>, next: Next) => void; | |
// Union type to combine both handler types | |
export type Handler<E extends Env = any, P extends string = any, I extends Input = BlankInput, R extends HandlerResponse<any> = any> = HandlerWithoutNext<E, P, I, R> | HandlerWithNext<E, P, I, R>; |
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
{ | |
"name": "vitest-bun-hono", | |
"module": "index.ts", | |
"type": "module", | |
"devDependencies": { | |
"@types/bun": "latest" | |
}, | |
"peerDependencies": { | |
"typescript": "^5.0.0" | |
}, |
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
Show hidden characters
{ | |
"include": [ | |
"**/*.ts", | |
"**/*.tsx", | |
"**/.server/**/*.ts", | |
"**/.server/**/*.tsx", | |
"**/.client/**/*.ts", | |
"**/.client/**/*.tsx" | |
], | |
"compilerOptions": { |
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 * as readline from "node:readline"; | |
// TODO: remove code when https://github.com/oven-sh/bun/issues/10403 is fixed | |
if (process.stdin.isTTY) { | |
readline.emitKeypressEvents(process.stdin); | |
process.stdin.setRawMode(true); | |
process.stdin.on("keypress", (str, key) => { | |
if (key.ctrl && key.name === "c") process.exit(); | |
}); |