Skip to content

Instantly share code, notes, and snippets.

View kdaisho's full-sized avatar

Daisho Komiyama kdaisho

View GitHub Profile
import type { z } from 'zod';
const mySchema = z.object({
limit: z.number().default(10),
offset: z.number().default(0),
filter: z.object({
requested: z.boolean(),
pending: z.boolean(),
approved: z.boolean(),
removed: z.boolean(),
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
@kdaisho
kdaisho / reset.css
Created October 29, 2023 15:07
Minimal CSS Reset
html {
box-sizing: border-box;
font-size: 16px;
}
*, *:before, *:after {
box-sizing: inherit;
}
body, h1, h2, h3, h4, h5, h6, p, ol, ul {
{
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "ignore",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": true,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "consistent",
@kdaisho
kdaisho / iframe-responsive.html
Created October 2, 2023 01:53
responsive layout - iframe
<style>
/* scss */
.iframe-container {
overflow: hidden;
position: relative;
width: 100%;
&:after {
content: '';
display: block;
@kdaisho
kdaisho / git-global-alias.sh
Last active August 27, 2023 18:29
Git setup/delete/list aliases
# set aliases
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.st status
# list aliases
git config --get-regexp ^alias
# delete alias (e.g., delete st)
git config --global --unset alias.st
@kdaisho
kdaisho / types.ts
Last active August 27, 2023 17:37
JSON Type
type Primitive = string | number | boolean | null
type JsonObject = { [k: string]: JsonValue }
type JsonArray = JsonValue[]
export type JsonValue = Primitive | JsonArray | JsonObject
@kdaisho
kdaisho / docker-exec.sh
Last active August 27, 2023 17:37
docker exec to fontend-community-simple db
docker exec -u postgres -it fc_db psql -d frontend_community