모든 내용을 그대로 따라지 마세요. 시간이 지나 변경된 내용도 있음. 아래
따라 해보기
내용을 참고하세요.
This file contains 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 | |
##################################################################### | |
# REFERENCES | |
# - https://cloud.google.com/run/docs/multiple-regions | |
# - https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups | |
# - https://cloud.google.com/load-balancing/docs/https/setup-global-ext-https-compute | |
# - https://cloud.google.com/load-balancing/docs/backend-service#named_ports | |
##################################################################### |
This file contains 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
// only works when there is no task running | |
// because we have a server always listening port, this handler will NEVER execute | |
process.on("beforeExit", (code) => { | |
console.log("Process beforeExit event with code: ", code); | |
}); | |
// only works when the process normally exits | |
// on windows, ctrl-c will not trigger this handler (it is unnormal) | |
// unless you listen on 'SIGINT' | |
process.on("exit", (code) => { |
This file contains 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
let mapleader="\<SPACE>" | |
inoremap jk <ESC> | |
nnoremap <SPACE> <Nop> | |
nnoremap <Leader>w :wa<CR> | |
nnoremap <leader>q :qa<Enter> | |
nnoremap <leader>h :set hlsearch! hlsearch?<CR> | |
" Buffer | |
nnoremap <Tab> :bnext!<Enter> | |
nnoremap <S-Tab> :bprevious!<Enter> |
This file contains 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
(defun save-framegeometry () | |
"Gets the current frame's geometry and saves to ~/.emacs.d/framegeometry." | |
(let ( | |
(framegeometry-left (frame-parameter (selected-frame) 'left)) | |
(framegeometry-top (frame-parameter (selected-frame) 'top)) | |
(framegeometry-width (frame-parameter (selected-frame) 'width)) | |
(framegeometry-height (frame-parameter (selected-frame) 'height)) | |
(framegeometry-file (expand-file-name "~/.emacs.d/framegeometry")) | |
) |
This file contains 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
/* | |
Proof of concept: Writing dual-mode (sync and async) code via generators | |
Recommendation: start by reading the example (at the end). | |
API: | |
– The API object is called `def`. | |
– Dual-mode `await`: const unwrapped = yield wrapped; | |
– Dual-mode `yield`: yield def.$one(singleValue) | |
– Dual-mode `yield*`: yield def.$all(iterable) |
This file contains 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
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- | |
;; Place your private configuration here! Remember, you do not need to run 'doom | |
;; sync' after modifying this file! | |
;; Some functionality uses this to identify you, e.g. GPG configuration, email | |
;; clients, file templates and snippets. | |
(setq user-full-name "YoungTaek Joo" | |
user-mail-address "soomtong@gmail.com") |
This file contains 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
{ | |
"title": "HHKB for macOS", | |
"rules": [ | |
{ | |
"description": "shift + esc to tilde", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "escape", |
This file contains 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
'use strict'; | |
const crypto = require('crypto'); | |
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters) | |
const IV_LENGTH = 16; // For AES, this is always 16 | |
function encrypt(text) { | |
let iv = crypto.randomBytes(IV_LENGTH); | |
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv); |
This file contains 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
{ | |
"title": "GK888B for macOS", | |
"rules": [ | |
{ | |
"description": "capslock to f16", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock" |
NewerOlder