Skip to content

Instantly share code, notes, and snippets.

View qvil's full-sized avatar

Taesu Hyeon qvil

View GitHub Profile
@qvil
qvil / request-success-failure-pattern-reducer.js
Created August 8, 2021 03:48
Example reducer for request, success, failure pattern
const initialState = {
isLoading: false,
data: null,
error: null,
};
const reducer = (state = initialState, action) => {
switch (action.type) {
case "GET_DATA_REQUEST":
return {
@qvil
qvil / request-success-failure-pattern-actions.js
Created August 8, 2021 03:48
Example actions for request, success, failure pattern
const GET_DATA_REQUEST = "GET_DATA_REQUEST";
const GET_DATA_SUCCESS = "GET_DATA_SUCCESS";
const GET_DATA_FAILURE = "GET_DATA_FAILURE";
const getDataRequest = (data) => ({
type: GET_DATA_REQUEST,
data,
});
const getDataSuccess = (data) => ({
type: GET_DATA_SUCCESS,
@qvil
qvil / .prettierrc
Last active June 3, 2021 05:32
Prettier default config.
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
@qvil
qvil / useSticky.ts
Created April 9, 2021 05:50
Check sticky with offset
import { useState, useEffect, Dispatch, SetStateAction } from "react";
interface UseStickyReturnType {
isSticky: boolean;
setIsSticky: Dispatch<SetStateAction<boolean>>;
}
/**
* @description Check sticky with offset
* @param offset
* @example

Core Changes

  • Fix something: #1234

Documentation Changes

  • Fix “A” typo in doc: #5678

Example Changes

@qvil
qvil / 2017.c
Created August 26, 2018 11:01
Teacher appointment exam 2017
#include <stdio.h>
#define SIZE 5
void func(int *, int);
int main(void)
{
int ary[SIZE] = {1, 7, 3, 9, 5};
func(ary, SIZE);
@qvil
qvil / README.md
Last active August 15, 2021 05:58
README.md Example for github
@qvil
qvil / teacher-appointment-exam-2017.c
Created November 5, 2017 12:04
teacher-appointment-exam-2017.c
#include <stdio.h>
void func(int *w, int *x, int *y, int *z);
void main()
{
int data[3] = {3, 70, 700};
int a, sum, *pa, *pb, *pc;
a = 6;
pa = &a;
pb = &data[0];
pc = data + 1;
@qvil
qvil / teacher-appointment-exam-2017.c
Last active November 5, 2017 11:35
teacher-appointment-exam-2017.c
#include <stdio.h>
#define SIZE 5
void func(int *, int);
int main(void)
{
int ary[SIZE] = {1, 7, 3, 9, 5};
func(ary, SIZE);
@qvil
qvil / license-badges.md
Created August 2, 2017 07:14 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français