Skip to content

Instantly share code, notes, and snippets.

@sakupi01
sakupi01 / browser-compat-version.ts
Created October 18, 2025 12:16
Baseline Browser Compatible Version
import { getCompatibleVersions } from 'baseline-browser-mapping';
// Automatically fetch the latest Baseline Widely Available browser versions
const compatibleVersions = await getCompatibleVersions();
// Check if the current browser meets Baseline criteria
function shouldShowWarning(userAgent) {
const browserInfo = parseUserAgent(userAgent);
return browserInfo.version < compatibleVersions[browserInfo.name];
}
@tak-dcxi
tak-dcxi / typography.md
Last active August 9, 2026 12:16
タイポグラフィCSS

タイポグラフィ

font-family

  • フォントは Web サイトの印象に直結するため、一概にこれが良いとは言えない。
  • 特にこれと言った指定がされていない場合は font-family: sans-serif のみで良い。
    • Windows 11/10 では 2025 年のアップデートにより Noto Sans JP が標準搭載された。色々と問題があった游ゴシックの呪縛から解放されたのは大きい。
    • Android はメーカーにより削除されている可能性はあるが、そうでない場合は原則的に Noto Sans CJK JP が適用される。
    • Mac/iOS はヒラギノ角ゴ ProN が適用される。
  • アップデートによるフォントの変更の懸念はあるものの、ディスレクシアの方々は UD デジタル教科書体などの読みやすいフォントを設定している可能性があるため、アクセシビリティの観点では font-family: sans-serif の指定を推奨する。
@startuml
UA -> App: /login
UA <-- App: Redirect
UA -> 認可サーバー: /auhorize
UA <- 認可サーバー: ログインページ表示
UA -> 認可サーバー: ログイン
UA <- 認可サーバー: 認可(AppにXXXを許可しますか?
UA -> 認可サーバー: OK
UA <-- 認可サーバー: Redierct
UA -> App: /callback?code=xxx&state=xxx
@voluntas
voluntas / loadtest.rst
Last active August 10, 2026 04:03
負荷試験コトハジメ
@ihsgnef
ihsgnef / colorize_text.py
Last active July 12, 2025 06:46
Visualize attention over text with background colors
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
def colorize(words, color_array):
# words is a list of words
# color_array is an array of numbers between 0 and 1 of length equal to words
cmap = matplotlib.cm.get_cmap('RdBu')
template = '<span class="barcode"; style="color: black; background-color: {}">{}</span>'
colored_string = ''
@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active April 9, 2026 05:34
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@mvoelk
mvoelk / resnet-152_keras.py
Last active March 11, 2022 08:06
Resnet-152 pre-trained model in TF Keras 2.x
# -*- coding: utf-8 -*-
import cv2
import numpy as np
from tensorflow.keras.layers import Input, Dense, Conv2D, MaxPool2D, AvgPool2D, Activation
from tensorflow.keras.layers import Layer, BatchNormalization, ZeroPadding2D, Flatten, add
from tensorflow.keras.optimizers import SGD
from tensorflow.keras.models import Model
from tensorflow.keras import initializers
Japanese English French Spanish German Italian Korean MandarinChinese CantoneseChinese
0 あくしゅう Stench Puanteur Tanfo Duftnote Hedor 악취 恶臭 惡臭
1 あめふらし Drizzle Crachin Piovischio Niesel Llovizna 잔비 降雨 降雨
2 かそく Speed Boost Turbo Acceleratore Temposchub Impulso 가속 加速 加速
3 カブトアーマー Battle Armor Armurbaston Lottascudo Kampfpanzer Armadura Batalla 전투무장 战斗盔甲 戰鬥盔甲
4 がんじょう Sturdy Fermeté Vigore Robustheit Robustez 옹골참 结实 結實
5 しめりけ Damp Moiteur Umidità Feuchtigkeit Humedad 습기 湿气 濕氣
6 じゅうなん Limber Échauffement Scioltezza Flexibilität Flexibilidad 유연 柔软 柔軟
7 すながくれ Sand Veil Voile Sable Sabbiavelo Sandschleier Velo Arena 모래숨기 沙隐 沙隱
8 せいでんき Static Statik Statico Statik Elec. Estática 정전기 静电 靜電
@sskwwskwww
sskwwskwww / Inv.vb
Created December 12, 2016 15:16
SM孵化最下位bit列から元の乱数列を計算する奴
Public Module Inv
Private ReadOnly invlist() As ULong = {&HAF630C9B9374B832UL, &H5FC1AAB2E39C4434UL, &HBD3BDA1869A675F1UL, &H1085296E28C0425AUL, &H2C23BA331C3BE6FCUL, &H31C7020BDEBC413DUL, &H69E216E9BBD26EC9UL, &H224AEB96ADD37392UL, &H7E22D643E79CD92EUL, &H2A335AD5F6E13D06UL, &HDEB7E9E63117D9ABUL, &H2EC75958BA057AD8UL, &HE769C722C8A18CB0UL, &H2CD358B8CFE73970UL, &H53582C1F25385E43UL, &H2DEB94943D604BB2UL, &H347150FC3CB5F0FEUL, &H2D6C077E2A7A2373UL, &H2FF951D9B993151UL, &H2D2343FDB9BAB82AUL, &H2F551181AE422688UL, &H5D237E3D6F7DCB49UL, &HDECC07E80CC01041UL, &H30C48335335FEB7FUL, &HA925A653684A5D01UL, &H4B79F55CC2563B50UL, &H16F3746C77F1BD4DUL, &H668CDA849CD2E78CUL, &H1E6349B08F0545C8UL, &H40160FF7C6DB891DUL, &HFA7967F7689DD586UL, &H32F3516717ECA59FUL, &H4A3130D70705F98CUL, &H7DA1B0D3E68B56C3UL, &HA827F3266CCF66A6UL, &H26822282FAD804BUL, &HEC6D5D890574B761UL, &H71441643F3F1F14EUL, &H90C1691508849DD0UL, &H4C66DA6DF0F8D52DUL, &H342643143AFBB98CUL, &H68D2E0330E2D5AB6UL, &H18913AE950077189UL, &H3869A1AD6FF21DBD
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.