Skip to content

Instantly share code, notes, and snippets.

@LeeDDHH
LeeDDHH / nodejs-standard-module.md
Created April 16, 2022 03:02
JavaScriptを補完する Node.jsの標準モジュール

JavaScriptを補完する Node.jsの標準モジュール

モジュール名 requireのモジュール名 説明
Assertion assert テストに使用する
Async Hooks async_hooks 非同期処理をするときに使用する
Buffer バイナリデータ用ストリームオブジェクトを扱うときに使用する
C++ Addons C++で書いた動的にリンクした共有オブジェクトを使用できる
Child Processes child_process 外部プログラムの実行など子プロセスを実行、管理する
Cluster cluster 複数の子プロセスを実行、管理する
@LeeDDHH
LeeDDHH / programming-language-playground.md
Created April 10, 2022 23:07
プログラミングのプレイグラウンド一覧
@LeeDDHH
LeeDDHH / calculate-browser-localstorage.md
Last active April 7, 2022 00:53
ブラウザのlocalStorageの容量を確認する
let ls = window.localStorage;
let string = "";
let currentSize = 0;
let currentKey  = 0;

const _clearStorage = () => {
  ls.clear();
  currentSize = 0;
  currentKey  = 0;
@LeeDDHH
LeeDDHH / vscode-csharp-snippets.md
Last active March 27, 2022 23:10
VSCodeでC#を扱うときに使っているスニペット
{
  "add main method": {
    "prefix": "mainmethod",
    "body": [
      "static void Main(string[] args)",
      "{",
      "    $1",
      "}",
    ],
@LeeDDHH
LeeDDHH / rust-practice.md
Created February 23, 2022 11:35
rustの勉強をしてわかったこと

rustup

Rustインストーラー、バージョン管理ツール

rustup update

Rustの最新版をインストールする

rustc

@LeeDDHH
LeeDDHH / react-use-charts-library.md
Created February 3, 2022 05:44
reactでチャートライブラリを使うために調査をした件
@LeeDDHH
LeeDDHH / typescript-css-module.md
Created January 29, 2022 04:52
TypeScriptでCSSの参照の型定義をする

型定義

  • styleのオブジェクトをインデックスシグネチャで参照するように型定義をする
// cssModule.d.ts のようなファイルとして生成
declare module '*.css' {
  interface IClassNames {
    [className: string]: string
 }
@LeeDDHH
LeeDDHH / react-ts-hot-reload-webpack-setting-template.md
Last active January 28, 2022 04:30
React + TypeScript + Webpack構成でHot Reloadさせるときの設定

概要

  • webpackdevServerHot Reload を設定する
  • できるだけ webpack の拡張機能で実装する

構成前提

パッケージ バージョン
react 17.0.2