Skip to content

Instantly share code, notes, and snippets.

@wtnabe
wtnabe / gist:03419571caec92d4bfb0a897c31dd15a
Last active December 3, 2023 08:52
Web Speech synthesis 上の Google Voice の制限

https://mdn.github.io/dom-examples/web-speech-api/speak-easy-synthesis/ を試す。

一定以上の長さになると途中で speak が切れる現象が発生する。

完了 OS ブラウザ Voice
failure macOS 13.6 Chrome 119 Google 日本語 ( ja-JP )
success macOS 13.6 Chrome 119 Kyoko ( ja-JP )
success macOS 13.6 Safari 17.0 Kyoko ( ja-JP )
success Android 10 Chrome 119 Google 日本語 ( ja-JP )
@wtnabe
wtnabe / glob.js
Last active October 21, 2023 22:35
globby negate behavior
import { globby } from 'globby'
const IGNORE = [
'!node_modules/**/*.*',
'!bower_components/**/*.*',
'!**/*.test.{js,ts}',
'!**/*.suite.{js,ts}',
'!**/*.config.{js,ts}',
'!**/*.d.ts',
];
@wtnabe
wtnabe / README.md
Last active September 27, 2023 11:54
StorybookでCustomElementsの情報をいい具合に出す
@wtnabe
wtnabe / javascript-pseudo-local-date-object.md
Last active August 28, 2023 02:22
JavaScript local "Date" object
@wtnabe
wtnabe / gist:eeb77935e8fd4363d10919a9ac55cf38
Last active February 21, 2024 23:22
特定の Intel Mac + macOS Ventura で rbenv + ruby-build では Ruby が install できない、できたとしてもまともに動かない問題

環境

  • MacBook Pro 16" ( Intel Core i9 )
  • macOS Ventura 13.4.1 ( Darwin Kernel Version 22.5.0 )
  • Homebrew 4.1.3
  • Apple clang version 14.0.3 (clang-1403.0.22.14.1)
  • rbenv 1.2.0
  • ruby-build 20230717
  • ruby-install 0.9.0
  • llvm 15 && 16
@wtnabe
wtnabe / svg2png.sh
Created July 8, 2023 22:18
resvgを使ってSVGからPNGを作るテンプレ
#! /bin/sh
SRC=$1
DEST=`basename ${SRC} .svg`.png
resvg --dpi 350 --zoom 2 --background '#ffffff' $SRC $DEST
@wtnabe
wtnabe / docx.sh
Last active July 8, 2023 22:25
asciidoctorとasciidoctor-diagramとpandocを使ってasciidocからdocxを作る
#! /bin/sh
asciidoctor -r asciidoctor-diagram --backend docbook --out-file - $1 | \
pandoc --from docbook --to docx --reference-doc simple-doc.docx --output `basename $1 .adoc`.docx
@wtnabe
wtnabe / coding-programming-design-levels.md
Last active March 5, 2023 23:48
IT / Web作り手ざっくりレベル感

実際の「評価」になるとこの中のレベル2とレベル3の中がかなり細分化される。

IT / Web作り手ざっくりレベル感
レベル 習得スキル(ツール寄り) 習得スキル(業務寄り) メモ
#! /usr/bin/awk -f
BEGIN {
filename = ""
}
/<markuplint> ([^:])+: (.)/ { # filename
sub(/\:$/, "", $2)
if ($3 == "") {
filename = ""