Skip to content

Instantly share code, notes, and snippets.

View pot-code's full-sized avatar
💻
Idle

Potpot pot-code

💻
Idle
View GitHub Profile
@pot-code
pot-code / main.js
Last active May 17, 2021 07:59
[storybook Chakra UI] #frontend #storybook #template
const path = require('path');
module.exports = {
stories: [
'../stories/**/*.stories.mdx',
'../stories/**/*.stories.@(js|jsx|ts|tsx)',
'../components/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
'@storybook/addon-links',
@pot-code
pot-code / cmd.sh
Created May 6, 2021 08:30
[kibana docker] #docker
docker network create ecs
docker run -d --name elasticsearch --network ecs -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.12.1
docker run -d --name kibana --network ecs -p 5601:5601 kibana:7.12.1
@pot-code
pot-code / font-family.css
Created April 30, 2021 14:40
[css] #frontend #style
{
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell,
Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
@pot-code
pot-code / .prettierrc
Created April 16, 2021 09:58
[prettier]
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
}
@pot-code
pot-code / babel.config.js
Last active May 17, 2021 07:59
[jest] #frontend #template
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}], '@babel/preset-typescript'],
};
@pot-code
pot-code / bin
Last active May 17, 2021 08:00
[nodejs bin] #nodejs
#!/usr/bin/env node
require('xxx')
@pot-code
pot-code / .eslintrc.js
Last active May 17, 2021 07:59
[typescript] #template #frontend
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.base.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'import'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
root: true,
env: {
@pot-code
pot-code / initializer.go
Created March 25, 2021 08:49
[go-wire]
//+build wireinject
package api
import (
"github.com/google/wire"
"github.com/pot-code/go-producer/api/notification"
ut "github.com/pot-code/go-producer/api/notification/transport"
"github.com/pot-code/go-producer/pkg/db"
"github.com/pot-code/go-producer/pkg/uuid"
@pot-code
pot-code / notification.sql
Last active April 13, 2021 07:25
[postgres] #pgsql
CREATE TABLE notification (
"id" VARCHAR(32),
"action_type" SMALLINT NOT NULL,
"obj_type" VARCHAR(16) NOT NULL,
"obj" VARCHAR(32) NOT NULL,
"actor" VARCHAR(32) NOT NULL,
"create_at" timestamp DEFAULT (now() at time zone 'utc'),
"updated_at" timestamp DEFAULT (now() at time zone 'utc'),
"status" SMALLINT NOT NULL DEFAULT 1,
PRIMARY KEY ("id"),
@pot-code
pot-code / nextjs
Last active April 13, 2021 07:24
[frontend starter] #frontend #starter
yarn create next-app
npx create-next-app