Skip to content

Instantly share code, notes, and snippets.

View kdaisho's full-sized avatar

Daisho Komiyama kdaisho

View GitHub Profile
@kdaisho
kdaisho / home.nix
Last active April 10, 2025 02:42
home.nix (Ubuntu)
{ config, pkgs, ... }:
{
home.username = "kali";
home.homeDirectory = "/home/kali";
home.stateVersion = "24.11";
home.packages = [
pkgs.deno
@kdaisho
kdaisho / home.nix
Last active April 26, 2025 17:50
home.nix (Kali)
{ config, pkgs, ... }:
{
home.username = "kali";
home.homeDirectory = "/home/kali";
home.stateVersion = "24.11";
home.packages = [
pkgs.deno
@kdaisho
kdaisho / .vimrc
Last active March 15, 2025 18:08
Minimal vimrc
set number
set wrap
syntax enable
set smartindent
set autoindent
set tabstop=4
set shiftwidth=4
set expandtab
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