Skip to content

Instantly share code, notes, and snippets.

View cybaj's full-sized avatar

Minseok Kim cybaj

View GitHub Profile
@cybaj
cybaj / .vimrc
Created October 7, 2019 06:01
.vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@cybaj
cybaj / dynamic_class.py
Last active September 24, 2019 01:12
In Python, 'class' is also object
"""
referenced from https://stackoverflow.com/questions/100003/what-are-metaclasses-in-python/6581949#6581949
"""
"""
1.
"""
def choose_class(name):
if name == 'foo':
class Foo(object):
@cybaj
cybaj / main.js
Created August 22, 2019 13:35
CommonJS JS file Scope
var module = require('./module.js')
val_main_global = 10000;
var val_main_var = 100000;
// console.log(val_mod_var); // ReferenceError
console.log("module.val_mod_var", module.val_mod_var); // undefined
console.log("val_mod_global", val_mod_global); // 10
console.log("module.val_mod_global", module.val_mod_global); // undefined
// console.log(val_mod_let); // ReferenceError