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 / ubuntu.sh
Last active October 28, 2019 09:49
creco's ubuntu
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common build-essential vim git curl net-tools openssh-server zsh direnv
# zsh
sudo chsh -s /bin/zsh
# git
git config --global user.name "CreatiCoding"
@CreatiCoding
CreatiCoding / List.vue
Last active October 10, 2019 15:37
vue slots scope custom component
<template>
<div>
<div v-for="(content, index) in contents" :key="`key_${identifier}_${index}`">
<slot name="List" :content="content"></slot>
</div>
</div>
</template>
<script>
export default {
@CreatiCoding
CreatiCoding / RedisACL.ts
Last active August 29, 2019 20:25
typescript redis api acl manage with promise to async/await
import { RedisClient, createClient } from "redis";
const API = "api";
export class RedisACL {
private client: RedisClient;
constructor(private password: string) {
this.client = createClient({ password });
}
@CreatiCoding
CreatiCoding / purewatch.js
Created August 23, 2019 17:43
javascript pure watch
// standard watch
const watch = (obj, key, defalut_value, callback) => {
Object.defineProperty(obj, key, {
get() {
return this._value || defalut_value;
},
set(value) {
this._value = value;
callback(this._current);
},
const _ = require('lodash');
var obj = [
{ x: 1, x1: 123, a: 2, b: 3 },
{ x: 2, x1: 5432, a: 4, b: 23 },
{ x: 1, x1: 123, a: 123, b: 324 },
];
var common_column = ['x', 'x1'];
var result = _.chain(obj)
.groupBy('x')
@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
@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 / 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 / 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;