Skip to content

Instantly share code, notes, and snippets.

@azu
azu / TypeScriptの設定の良し悪し.md
Last active July 18, 2024 08:52
TypeScriptの設定の良し悪し

tsconfig.json の設定についてのメモ書きです。

Node.jsのバージョンごとの設定

target は 変換後のコードのECMAScriptバージョンを指定する たとえば、Node.js 14はES2020をサポートしている。そのため、Node.js 14向けのコード(サーバなど)ならtarget: "ES2020"を指定することで、余計なTranspileが省かれててコードサイズや実行時間が最適化される。

/* So how does this work?
I'm using ANSI escape sequences to control the behavior of the terminal while
cat is outputting the text. I deliberately place these control sequences inside
comments so the C++ compiler doesn't try to treat them as code.*/
//
/*The commands in the fake code comment move the cursor to the left edge and
clear out the line, allowing the fake code to take the place of the real code.
And this explanation uses similar commands to wipe itself out too. */
//
#include <cstdio>
@sile
sile / rfc_2113.md
Last active August 1, 2022 13:13
Rustの『RFC 2113: dynトレイト構文』の要約メモ
@mhgp
mhgp / sha2.rs
Created November 5, 2016 13:37
Rust で SHA-2 を実装してみた
use std::boxed::Box;
macro_rules! Ch {
($x:expr, $y:expr, $z:expr) => { ($x & $y) ^ (!$x & $z) };
}
macro_rules! Maj {
($x:expr, $y:expr, $z:expr) => { ($x & $y) ^ ($x & $z) ^ ($y & $z) };
}
@iwillspeak
iwillspeak / LLVM From Rust.md
Last active July 30, 2023 08:40
Example of using LLVM from Rust

An Example of Using LLVM from Rust

This example compiles a simple function using the LLVM C API through the llvm-sys crate.

@voluntas
voluntas / webrtc.rst
Last active June 27, 2024 02:25
WebRTC コトハジメ
@voluntas
voluntas / shiguredo.rst
Last active June 6, 2024 02:04
時雨堂コトハジメ
@sloria
sloria / bobp-python.md
Last active July 24, 2024 02:53
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens