This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { RedisClient, createClient } from "redis"; | |
| const API = "api"; | |
| export class RedisACL { | |
| private client: RedisClient; | |
| constructor(private password: string) { | |
| this.client = createClient({ password }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dayjs(new Date().toLocaleString("en-US", {timeZone: "Asia/Seoul"})).format('YYYY-MM-DD HH:mm:ss') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| uname_out="$(uname -s)" | |
| case "${uname_out}" in | |
| Linux*) machine=Linux;; | |
| Darwin*) machine=Mac;; | |
| CYGWIN*) machine=Cygwin;; | |
| MINGW*) machine=MinGw;; | |
| *) machine="UNKNOWN:${uname_out}" | |
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { https } from "firebase-functions"; | |
| import * as express from "express"; | |
| import { ApolloServer, gql } from "apollo-server-express"; | |
| const typeDefs = gql` | |
| # Comments in GraphQL strings (such as this one) start with the hash (#) symbol. | |
| # This "Book" type defines the queryable fields for every book in our data source. | |
| type Book { | |
| title: String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| await (() => new Promise((resolve) => setTimeout(() => resolve(true), 100)))(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div id="app"> | |
| <div> | |
| <input type="file" @change="previewFile" /> | |
| <br /> | |
| <img src height="200" alt="이미지 미리보기..." /> | |
| <button @click="doConvert">다운로드</button> | |
| </div> | |
| </div> | |
| </template> |