Skip to content

Instantly share code, notes, and snippets.

@sksat
sksat / README.md
Last active September 21, 2024 17:10
オタク向け yaml_cvのstyle.txt

オタク向けのyaml_cvのstyle.txt.

実はみなさんが必要なのは連絡先・顔写真・学歴/職歴,免許/資格の欄だけだったりする.

@LeeDDHH
LeeDDHH / typescript-code-snippets.md
Last active October 18, 2023 09:17
typescriptで他のプロジェクトでも流用できそうなコードを集めておく

ファイルの存在をチェックする

const isExistFile = (filePath: string) => {
  try {
    fs.statSync(filePath);
  } catch (e) {
    if (e.code === 'ENOENT') {
      console.log('file is not exists');
    }
@azu
azu / TypeScriptの設定の良し悪し.md
Last active July 1, 2025 02:49
TypeScriptの設定の良し悪し

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

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

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

@sindresorhus
sindresorhus / esm-package.md
Last active November 21, 2025 09:14
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@upbit
upbit / README.md
Last active November 7, 2025 16:40 — forked from ZipFile/README.md
Pixiv OAuth Flow (with Selenium)

Retrieving Auth Token (with Selenium)

  1. Setup, install Selenium/ChromeDriver
pip install selenium
# download chromedriver from https://chromedriver.storage.googleapis.com/index.html?path=91.0.4472.101/
# eg: wget https://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_mac64.zip && unzip chromedriver_mac64.zip
@ZipFile
ZipFile / README.md
Last active November 22, 2025 11:21
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@qsona
qsona / 0_README.md
Last active November 13, 2022 05:20
How to write polymorphic code with JavaScript's plain objects and functions (objects are immutable)

How to write polymorphic code with JavaScript's plain objects and functions (objects are immutable)

概要

JavaScript の Plain Object (ただの) と、関数のみを利用して、Polymorphism を実現したい。

とはいえ Polymorphism の定義は人によって違うので、以下の仕様とルールを満たすものとしたい。

そもそもそれは Polymorphism ではない、あるいは意味をなさない、というような反論があればそれも歓迎。

@yarakos95
yarakos95 / Insert-figtbl-latex.md
Created January 4, 2021 10:50
図表を挿入する
@mala
mala / 202012_smooz.md
Last active October 6, 2022 14:28
Smoozサービス終了に寄せて

Smoozサービス終了に寄せて

前置き

  • この文章と、それに含まれる考察や各サービスへの脆弱性報告などはmala個人の活動であり、所属している企業とは関係ありません。
  • 一方で私は、企業が閲覧履歴を収集して何をしたいのか、所属してる企業や他社事例について、ある程度詳しい当事者でもあります。
  • 一般論として書けることは書けるが、(業務上知り得た知識で開示されてないものなど)個別具体的なことは書けないこともあり、また観測範囲に偏りがある可能性もあります。

Smoozに報告した脆弱性2件

@andrebrait
andrebrait / keychron_linux.md
Last active November 20, 2025 20:20
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.