Skip to content

Instantly share code, notes, and snippets.

View wes5510's full-sized avatar

gihyeon.wes.lee wes5510

View GitHub Profile
import * as Y from 'yjs';
import { getModelForClass, prop, ReturnModelType } from '@typegoose/typegoose';
const Y_TYPEGOOSE = {
DEFAULT_COLLECTION_NAME: 'ydoc',
TYPE: {
STATE_VECTOR: 'sv',
UPDATE: 'update',
META: 'meta',
},
@wes5510
wes5510 / routine.jsx
Last active April 23, 2020 15:34
redux-routine
import { createAction } from 'redux-actions';
import { put, call } from 'redux-saga/effects';
import produce from 'immer';
import camelCase from 'lodash/camelCase';
import typeUtils from './type';
const STAGES = {
REQUEST: {
id: 'REQUEST',
@wes5510
wes5510 / upgradeNodeVersion.sh
Created June 17, 2019 07:00
Upgrade Node Version
sudo npm cache clean -f
sudo npm install -g n
sudo n $1
node -v
@wes5510
wes5510 / settingBashPrompt.sh
Last active June 12, 2019 05:29
script to set bash prompt
#!/bin/bash
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
echo -e "\nif [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then\n\tGIT_PROMPT_ONLY_IN_REPO=1\n\tsource $HOME/.bash-git-prompt/gitprompt.sh\nfi\n" >> ~/.bashrc
source ~/.bashrc
@wes5510
wes5510 / changeLinuxDefaultLocale.sh
Created June 9, 2019 07:49
Change linux default locale
#!/bin/bash
echo "LANG=\"C\"" > /etc/default/locale
source /etc/default/locale
@wes5510
wes5510 / converLetsencryptToUseInTomcat.sh
Created June 9, 2019 06:47
Convert certification of let's encrypt to use in tomcat
#!/bin/bash
CERT_PATH="$1"
PRIVATE_PATH="$2"
CHAIN_PATH="$3"
FULLCHAIN_PATH="$4"
function checkArg()
{
result=1