유니코드에서 한글을 어떻게 다루는지를 정리하였다.
- 유니코드(Unicode)는 전 세계의 모든 문자를 컴퓨터에서 일관되게 표현하고 다룰 수 있도록 설계된 산업 표준 (위키 백과)
- 단순히 문자마다 번호를 붙임
- 계속 업데이트되며 현재는 Unicode Version 9.0.0 이 최신이다.
- 유니코드를 실제 파일 등에 어떻게 기록할 것인지를 표준화한 것이다.
#!/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 | |
##################################################################### |
// 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) => { |
(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")) | |
) |
/* | |
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) |
'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); |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
#!/usr/bin/env node | |
if (process.mainModule === module) setImmediate(() => main(process.argv).catch(e => console.log(e.stack) && process.exit(1))) | |
async function main(argv) { | |
console.log(argv.slice(2)) | |
} |
# require 'active_support/all' | |
def korean_topic_marker(str) | |
k = str[-1] # last one char | |
return '는' if k.mb_chars.decompose.size < 3 # 종성이 없는 경우 | |
return '은' | |
end | |
def korean_subject_marker(str) | |
k = str[-1] # last one char |
from: http://www.meandmark.com/keycodes.html | |
Virtual Keycodes for the Mac QWERTY Layout | |
Keycodes are in hexadecimal. A blank entry means either there is no key assigned to that keycode or I was unable to find the assigned key. | |
Keycode Key | |
0x00 A | |
0x01 S | |
0x02 D | |
0x03 F |
유니코드에서 한글을 어떻게 다루는지를 정리하였다.