Skip to content

Instantly share code, notes, and snippets.

View kdby-io's full-sized avatar
🥑
Higher Order Avocado

Sangwon Kim kdby-io

🥑
Higher Order Avocado
View GitHub Profile
@kdby-io
kdby-io / init.vim
Last active May 21, 2017 09:52
Neovim Configuration
language en_US
set nocompatible " be iMproved, required
filetype off " required
call plug#begin('~/.dotfiles/nvim/bundle')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'yssl/QFEnter'
Plug 'bling/vim-airline'
@kdby-io
kdby-io / .zshrc
Last active May 21, 2017 09:50
Zsh Configuration
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/v/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="bullet-train"
@kdby-io
kdby-io / express-jwt-example.js
Created July 23, 2017 10:26
[blog] /2017-jwt-authentication-on-expressjs
const express = require('express');
const bodyParser = require('body-parser');
const passport = require('passport');
const JwtStrategy = require('passport-jwt').Strategy;
const ExtractJwt = require('passport-jwt').ExtractJwt;
const jwt = require('jsonwebtoken');
const SECRET = 'SECRET';
/*
@kdby-io
kdby-io / express-facebook-example.js
Created July 30, 2017 03:27
[blog] /2017-third-party-oauth-authentication-on-expressjs
const express = require('express');
const passport = require('passport');
const FacebookStrategy = require('passport-facebook');
/*
* Server
*/
const app = express();
@kdby-io
kdby-io / graphql-typescript-typeorm.ts
Last active July 3, 2018 03:50
An example for graphql-typescript with typeorm
import { Entity, Column, PrimaryGeneratedColumn, getRepository, CreateDateColumn, UpdateDateColumn } from 'typeorm'
import { Type, Field, ID, String, Mutation } from 'graphql-typescript'
class CreateUserArguments {
@Field(String) username: string
@Field(String) password: string
}
@Entity({ name: 'User' })
@Type
@kdby-io
kdby-io / custom-domain-feature-with-express.js
Last active July 26, 2022 19:03
Example of custom domain feature with Express.js
const express = require('express')
const app = express()
const port = 80
const users = [
{
username: 'alice',
name: 'Alice',
domain: 'alice.com',
},
🌞 Morning 254 commits ██████▉░░░░░░░░░░░░░░ 33.0%
🌆 Daytime 382 commits ██████████▍░░░░░░░░░░ 49.7%
🌃 Evening 120 commits ███▎░░░░░░░░░░░░░░░░░ 15.6%
🌙 Night 13 commits ▎░░░░░░░░░░░░░░░░░░░░ 1.7%