Skip to content

Instantly share code, notes, and snippets.

@tompere
tompere / Oh my (customized) checkbox.markdown
Last active May 17, 2016 15:11
Oh my (customized) checkbox

Oh my (customized) checkbox

A customized checkbox with a standard layout (input nested inside label). Use scss variables to customize.

A Pen by tomp on CodePen.

License.

conosle.log('hello npxgist!')
@tompere
tompere / JsonRpcEndpoint.ts
Last active January 2, 2023 13:26
a simple toolkit for creating openrpc-based nestjs controller
import { Controller, Post, HttpCode, HttpStatus, Body, UseGuards, CanActivate } from "@nestjs/common";
import { Router as RpcEndpoint } from "@open-rpc/server-js";
import type { JSONRPCRequest } from "@open-rpc/server-js/build/transports/server-transport";
import type { OpenrpcDocument } from "@open-rpc/meta-schema";
type Constructor = { new (...args: any[]): any };
type Config = { openrpcDocument: object; version: string; basePath?: string; authGuard?: CanActivate };
export function JsonRpcEndpoint({