Skip to content

Instantly share code, notes, and snippets.

@kawanet
kawanet / string_to_buffer.js
Last active May 16, 2024 10:35
String と ArrayBuffer の相互変換 JavaScript
// 文字列から ArrayBuffer への変換
function string_to_buffer(src) {
return (new Uint16Array([].map.call(src, function(c) {
return c.charCodeAt(0)
}))).buffer;
}
// ArrayBuffer から文字列への変換
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 16, 2024 07:53
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example