Skip to content

Instantly share code, notes, and snippets.

View vreality64's full-sized avatar
🀠
Happy

Ian Park vreality64

🀠
Happy
View GitHub Profile
@vreality64
vreality64 / .bash_profile
Created May 4, 2017 08:28
예쁜 κΉƒ
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@vreality64
vreality64 / jekyll-and-liquid.md
Last active August 5, 2017 15:51 — forked from magicznyleszek/jekyll-and-liquid.md
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@vreality64
vreality64 / const-enum.ts
Last active June 1, 2018 09:37
Typescript const enum vs enum ([email protected])
// Declare
const enum CommandType {
FOO = 1,
BAR = 2
};
// Usage
const commandType = CommandType.FOO
// Transpiled (inlining)

JSX Spread Attributes

If you know all the properties that you want to place on a component a head of time, it is easy to use JSX:

  var component = <Component foo={x} bar={y} />;

Mutating Props is Bad, mkay

@vreality64
vreality64 / caution.md
Last active October 21, 2021 15:58
GraphQL μ£Όμ˜μ‚¬ν•­

DB μŠ€ν‚€λ§ˆμ™€ GraphQL Type 과의 μ—°κ΄€μ„±

κ²°λ‘ λΆ€ν„° λ§ν•˜μžλ©΄, μ „ν˜€ μ—†λ‹€.

DB μŠ€ν‚€λ§ˆλ‘œλΆ€ν„° GraphQL Type 을 μžλ™μœΌλ‘œ λ§Œλ“€μ–΄ λ‚Ό μˆ˜λŠ” μžˆλ‹€. μ΄λŠ” GraphQL Type 을 μž‘μ„±ν•˜λŠ” λ…Έλ ₯을 쀄이고, ν•˜λ‚˜μ˜ μŠ€ν‚€λ§ˆλ‘œλΆ€ν„° λ™μΌν•œ κ°œλ…μ„ μƒμ„±ν•˜κ² λ‹€λŠ”λ° λͺ©μ μ΄ μžˆλ‹€.

그런데 잘 μƒκ°ν•΄λ³΄μž. 이게 μ˜³μ€ 것인가?

μ„œλ²„μ—μ„œ DB μŠ€ν‚€λ§ˆλ₯Ό λ³€ν™˜ν•œ λ‚΄μš©μœΌλ‘œ, Query λ₯Ό μ •μ˜ν•΄ API μ—”λ“œν¬μΈνŠΈλ₯Ό μ—΄μ–΄λ‘μ—ˆλ‹€κ³  μƒκ°ν•΄λ³΄μž.

@vreality64
vreality64 / clean-up.sh
Created November 28, 2019 01:39
Clean up node_modules directory
# Show all node_modules folder information in current working directory
alias show-all-node-modules="find . -name 'node_modules' -type d -prune -print | xargs du -chs"
# Remove all node_modules folder in current working directory
alias remove-all-node-modules="show-all-node-modules && find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;"