Skip to content

Instantly share code, notes, and snippets.

View sujak's full-sized avatar

Hyunsoo Lee sujak

  • Seoul, Republic of Korea
View GitHub Profile
@sujak
sujak / toss-frontend-rules.mdc
Created April 23, 2025 05:40 — forked from toy-crane/toss-frontend-rules.mdc
토스 프론트엔드 가이드라인 기반으로 만든 Cursor rule
# Frontend Design Guideline
This document summarizes key frontend design principles and rules, showcasing
recommended patterns. Follow these guidelines when writing frontend code.
# Readability
Improving the clarity and ease of understanding code.
@sujak
sujak / how-to-write-by-markdown.md
Created March 2, 2021 05:04 — forked from ihoneymon/how-to-write-by-markdown.md
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

1. 마크다운에 관하여

1.1. 마크다운이란?

Markdown은 텍스트 기반의 마크업언어로 2004년 존그루버에 의해 만들어졌으며 쉽게 쓰고 읽을 수 있으며 HTML로 변환이 가능하다. 특수기호와 문자를 이용한 매우 간단한 구조의 문법을 사용하여 웹에서도 보다 빠르게 컨텐츠를 작성하고 보다 직관적으로 인식할 수 있다. 마크다운이 최근 각광받기 시작한 이유는 깃헙(https://github.com) 덕분이다. 깃헙의 저장소Repository에 관한 정보를 기록하는 README.md는 깃헙을 사용하는 사람이라면 누구나 가장 먼저 접하게 되는 마크다운 문서였다. 마크다운을 통해서 설치방법, 소스코드 설명, 이슈 등을 간단하게 기록하고 가독성을 높일 수 있다는 강점이 부각되면서 점점 여러 곳으로 퍼져가게 된다.

1.2. 마크다운의 장-단점

1.2.1. 장점

@sujak
sujak / gh-pages-deploy.sh
Created September 23, 2020 01:23 — forked from georgegach/gh-pages-deploy.sh
Script to deploy a target directory to `gh-pages` branch and force server-side cache to update
#!/bin/bash
directory=_site
branch=gh-pages
build_command() {
jekyll build
}
echo -e "\033[0;32mDeleting existing $branch...\033[0m"
git push origin --delete $branch
git branch -D $branch
@sujak
sujak / gh-pages-deploy.sh
Created September 23, 2020 01:23 — forked from georgegach/gh-pages-deploy.sh
Script to deploy a target directory to `gh-pages` branch and force server-side cache to update
#!/bin/bash
directory=_site
branch=gh-pages
build_command() {
jekyll build
}
echo -e "\033[0;32mDeleting existing $branch...\033[0m"
git push origin --delete $branch
git branch -D $branch
@sujak
sujak / mobile-viewport-100vh.css
Last active April 27, 2020 02:17
CSS trick to handle that annoying mobile viewport bug with 100vh in WebKit (iOS Safari)
body {
min-height: 100vh;
min-height: -webkit-fill-available;
}
const controller = new AbortController();
const signal = controller.signal;
function doSomethingAsync({ signal }) {
if (signal.aborted) {
return Promise.reject(new DOMException('Aborted', 'AbortError'));
}
return new Promise((resolve, reject) => {
// ...
signal.addEventListener('abort', () => {
// ...
@sujak
sujak / findUser.js
Created November 12, 2019 01:23 — forked from paigen11/findUser.js
Passport local and Passport JWT authentication with custom callbacks examples with a user registration MERN service.
import passport from 'passport';
module.exports = app => {
app.get('/findUser', (req, res, next) => {
passport.authenticate('jwt', { session: false }, (err, user, info) => {
if (err) {
console.log(err);
}
if (info != undefined) {
console.log(info.message);
@sujak
sujak / npm-using-https-for-git.sh
Created June 4, 2019 01:06 — forked from taoyuan/npm-using-https-for-git.sh
Force git to use https:// instead of git://
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
import React, { Component } from 'react';
import PropTypes from 'prop-types';
/**
* Component that alerts if you click outside of it
*/
export default class OutsideAlerter extends Component {
constructor(props) {
super(props);
import React from 'react';
import ReactDOM from 'react-dom';
class CalendarPopup extends React.Component {
componentWillMount() {
// add event listener for clicks
document.addEventListener('click', this.handleClick, false);
}
componentWillUnmount() {