Skip to content

Instantly share code, notes, and snippets.

View kiishi's full-sized avatar

Deolu kiishi

  • Berlin, Germany
View GitHub Profile
@kiishi
kiishi / hooks.tsx
Last active September 18, 2022 22:57
react-query like Http Hooks ( with some little extras )
import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
import { useEffect, useState } from 'react';
interface IRequestHookConfig {
// request params
params?: any;
// guards are like middlewares that run when a response is returned, before the state changes
// multiple guards can be added for different kind of checks
guards?: Array<(response: any, err: AxiosError | null) => Promise<void>>;
}
@kiishi
kiishi / script.md
Created February 12, 2020 09:53
GENERATE TYPESCRIPT TYPINGS FROM PROTOCOL BUFFERS ( GRPC )

npm install protobufjs

create a bash script with this content in it

SRC_DIR= #folder containing protofiles
DEST_DIR=#destition directory

if [ ! -d "${DEST_DIR}" ]; then
@kiishi
kiishi / webpack config ts (copy and paste)
Created August 31, 2019 17:41
personal webpack config TS
# install these
-style-loader
-sass-loader
-css-loader
-wepack
-webpack-cli
-terser-webapack-plugin
#now the code (for react )
@kiishi
kiishi / docker-help.md
Created January 24, 2019 20:23 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info