Skip to content

Instantly share code, notes, and snippets.

View CreatiCoding's full-sized avatar
❤️
Maybe busy by something

정석호 CreatiCoding

❤️
Maybe busy by something
View GitHub Profile
@CreatiCoding
CreatiCoding / service.sh
Created October 6, 2018 03:25
start nodemon with nohup without output file
# in service.sh
nohup ./start.sh </dev/null >/dev/null 2>&1 &
#1 make ssh key
cd ~
ssh-keygen
#2 regist ~/.ssh/id_rsa.pub to github account
cat ~/.ssh/id_rsa.pub
#3 add remote url if already exist repository
git remote set-url origin git@github.com:username/your-repository.git
@CreatiCoding
CreatiCoding / js_sort.js
Last active October 27, 2018 19:41
js sort solution 완주하지 못한 선수
// https://programmers.co.kr/learn/courses/30/lessons/42576
function solution(p, c) {
var size = c.length;
// 이렇게 하면 오류 발생
// p.sort((a,b)=>(a < b));
// 이렇게 하면 속도 느림
// p.sort((a,b)=>(a.localeCompare(b)));
// 속도 제일 빠르고 정확함
p.sort((a,b)=>(a < b ? -1 : (a > b ? 1 : 0)));
c.sort((a,b)=>(a < b ? -1 : (a > b ? 1 : 0)));
@CreatiCoding
CreatiCoding / feconf-css-animation-rocket-intro-with-scene-js.markdown
Created November 3, 2018 05:48
FEConf CSS Animation Rocket Intro with scene.js
@CreatiCoding
CreatiCoding / .bashrc
Created November 7, 2018 07:52
ubuntu bash color mode with git branch
# 생략
# ~
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
@CreatiCoding
CreatiCoding / typescript-intersection-type-simple.ts
Created January 27, 2019 07:02
TypeScript - intersection types simple example
// From https://gist.github.com/Ibro/262ee343ea3a2a244ec76b44f6723713#file-typescript-intersection-type-simple-ts
// Origin code is error code. So I fix it by referencing https://www.typescriptlang.org/docs/handbook/interfaces.html
interface IStudent {
id: string;
age: number;
}
interface IWorker {
companyId: string;
@CreatiCoding
CreatiCoding / ubuntu.sh
Last active April 20, 2019 11:17
ubuntu docker spring deploy environment
# docker run -it -p 8080:8080 -v "/Users/creco/git/spring-boot-project/spring-boot-project:/root/spring-boot-project" ubuntu
# apt-get update && apt-get install wget -y
# wget -O - https://gist.githubusercontent.com/CreatiCoding/1320bab655cdd04ee53f3dd6aac2d245/raw/ | bash
apt-get install software-properties-common -y
add-apt-repository ppa:webupd8team/java -y
add-apt-repository ppa:cwchien/gradle -y
apt-get update
apt-get install openjdk-8-jdk vim git -y
@CreatiCoding
CreatiCoding / queryStr2queryObj.js
Created April 18, 2019 11:33
query string to query object
const queryStr2queryObj =
(queryStr) => queryStr !== ''
? queryStr
.split('&')
.map((e) => ({ [e.split('=')[0]]: e.split('=')[1] }))
.reduce((a, c) => {
return { ...a, ...c };
})
: {};
@CreatiCoding
CreatiCoding / android_nox_config.readMe.md
Last active August 26, 2021 08:10
Connect NOX and Android Studio in Mac OS

Connect NOX and Android Studio in Mac OS

cd ~/Library/Android/sdk/platform-tools

or

export PATH=~/Library/Android/sdk/tools:$PATH