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
| # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
| # Initialization code that may require console input (password prompts, [y/n] | |
| # confirmations, etc.) must go above this block; everything else may go below. | |
| if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
| source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
| fi | |
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH |
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
| #!/usr/bin/env bash | |
| # brew-setup.sh — 새 Mac에 Homebrew 환경을 재현하는 설치 스크립트 | |
| # 생성일: 2026-07-04 (marantz@gmail.com 의 환경 기준) | |
| set -euo pipefail | |
| # ────────────────────────────────────────────── | |
| # 색상 출력 헬퍼 | |
| # ────────────────────────────────────────────── | |
| GREEN='\033[0;32m'; YELLOW='\033[1;33m'; RED='\033[0;31m'; NC='\033[0m' |
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
| [ | |
| { | |
| "_id": 1, | |
| "texts": [ | |
| { "language": "english", "text": "hello" }, | |
| { "language": "german", "text": "hallo" }, | |
| { "language": "french", "text": "bonjour" } | |
| ] | |
| }, … | |
| ] |
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
| package org.project; | |
| import com.mongodb.ConnectionString; | |
| import com.mongodb.MongoClientSettings; | |
| import com.mongodb.client.*; | |
| import com.mongodb.client.model.Filters; | |
| import com.mongodb.client.model.UpdateOptions; | |
| import com.mongodb.client.model.changestream.ChangeStreamDocument; | |
| import com.mongodb.client.model.changestream.FullDocument; | |
| import com.mongodb.client.result.UpdateResult; |
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
| appname := myapp | |
| CXX := g++ | |
| CXXFLAGS := -Wall -g | |
| srcfiles := $(shell find . -maxdepth 1 -name "*.cpp") | |
| objects := $(patsubst %.cpp, %.o, $(srcfiles)) | |
| all: $(appname) |
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
| 1) json_object | |
| 2) json_objectagg | |
| 3) json_array | |
| 4) json_arrayagg | |
| SELECT JSON_OBJECT ( | |
| KEY 'deptno' IS d.department_id FORMAT JSON, | |
| KEY 'deptname' IS d.department_name FORMAT JSON | |
| ) "Department Objects" | |
| FROM departments d |
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/sh | |
| export MONGODB_HOME=/opt/mongodb | |
| export MONGODB_BIN=${MONGODB_HOME}/bin | |
| export MONGO="${MONGODB_BIN}/mongo --host centos --port 27018 --quiet" | |
| export MONGODUMP="${MONGODB_BIN}/mongodump --host centos --port 27018" | |
| export BACKUP_DIR=${MONGODB_HOME}/data/backup | |
| echo "BACKUP DATABASE" | |
| _DB_LIST=(`echo "show dbs" | $MONGO | grep -v admin | grep -v config | awk {'print $1'}`) |
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
| // sample | |
| db.test_collection.insert({field01:"A", field02:"a", field03:1}) | |
| db.test_collection.insert({field01:"A", field02:"a", field03:2}) | |
| db.test_collection.insert({field01:"A", field02:"a", field03:3}) | |
| /* | |
| 'view_sum_naver':{ $cond:{ if: {$eq:['naver','$origin']}, then:1, else:0, } }, | |
| 'view_sum_naver':{ $cond:{ if: {$eq:['naver','$origin']}, then:1, else:0, } }, | |
| 'view_sum_naver':{ $cond:{ if: {$eq:['naver','$origin']}, then:1, else:0, } }, | |
| 'view_sum_naver':{ $cond:{ if: {$eq:['naver','$origin']}, then:1, else:0, } }, |
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
| // Remove Duplicates | |
| function removeDuplicates(array) { | |
| return array.sort().filter((a, b) => array.indexOf(a) === b) | |
| }; | |
| // Add CIDR Address on User | |
| addUserClientSource = function(user,dbname,cidr) { | |
| var nsAdmin = "admin." + user; | |
| var res = db.system.users.aggregate([ | |
| {$match:{"_id" : nsAdmin, "user" : user, "db" : dbname}}, |
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
| CFLAGS=-stdlib=libc++ pip install jpype1-py3 | |
| tar -xzvf mecab-0.996-ko-0.9.2.tar.gz | |
| cd mecab-0.996-ko-0.9.2 | |
| ./configure | |
| make;sudo make install | |
| MACOSX_DEPLOYMENT_TARGET=10.15 pip install mecab | |
| python |
NewerOlder