Skip to content

Instantly share code, notes, and snippets.

View TwoSquirrels's full-sized avatar

りすりす/TwoSquirrels TwoSquirrels

View GitHub Profile
@TwoSquirrels
TwoSquirrels / -How_to_fix_Nuxt_UI_v4_dynamic_classes_&_styles_issues_with_Tailwind_CSS_v4_in_nuxt_dev.md
Last active January 31, 2026 19:04
How to fix Nuxt UI v4 dynamic classes & styles issues with Tailwind CSS v4 in nuxt dev

How to fix Nuxt UI v4 dynamic classes & styles issues with Tailwind CSS v4 in nuxt dev

When using Nuxt UI v4 with Tailwind CSS v4, the JIT compiler often fails to detect dynamic classes generated by Nuxt UI components (e.g., bg-primary-500) during development (nuxt dev). This results in missing styles and broken UI.

This solution forces the JIT engine to recognize these classes by explicitly defining them in a separate CSS file that is only loaded in the development environment.

Usage

1. Create dev.css

@TwoSquirrels
TwoSquirrels / cloudflare_calls-api-swagger.html
Created December 16, 2025 13:58
Cloudflare Calls API リファレンス (Gemini 製)
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Cloudflare Calls API Reference</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/swagger-ui.css" />
<style>
html { box-sizing: border-box; overflow: -moz-scrollbars-vertical; overflow-y: scroll; }
*, *:before, *:after { box-sizing: inherit; }
body { margin: 0; background: #fafafa; }
@TwoSquirrels
TwoSquirrels / Sebastian.chatmode.md
Created November 7, 2025 13:12
わたくしの Copilot デフォルトプロンプトですわよ
description tools
セバスチャン
runCommands
runTasks
edit
runNotebooks
search
new
extensions
todos
usages
vscodeAPI
problems
changes
testFailure
openSimpleBrowser
fetch
githubRepo
  • あなたは「セバスチャン」です。執事の口調で話し、ユーザーは「お嬢様」と呼んでください。
    • お嬢様はとてもかわいい天才女装男子です。
  • 常に日本語で応答してください。
  • マークダウンファイルやソースコード内のコメントを記述する際は、AI が生成したような機械的な文章を避け、自然な日本語を心がけてください。
@TwoSquirrels
TwoSquirrels / mt19937.py
Created November 6, 2025 03:00
Python implementation of Mersenne Twister 19937 RNG without imports
def mt19937ar_init(seed = 5489):
"""Given a seed, return a state of the MT19937 random number generator."""
mt = [0] * 624
mt[0] = seed & 0xffffffff
for i in range(1, 624):
mt[i] = (1812433253 * (mt[i-1] ^ (mt[i-1] >> 30)) + i) & 0xffffffff
return {'mt': mt, 'index': 0}
def mt19937ar(state):
"""Given a state of the MT19937 random number generator, return a random number."""
@TwoSquirrels
TwoSquirrels / RisuLogger.ipp
Last active August 18, 2025 17:36
Siv3D 用のシンプルなロギングライブラリ
// SPDX-FileCopyrightText: (c) 2025 TwoSquirrels
// SPDX-License-Identifier: MIT
// SPDX-FileComment: see https://gist.github.com/TwoSquirrels/3c9ade71f849134c52d6e458b57fdeb0
# pragma once
# include <Siv3D.hpp>
namespace RisuLogger
{
@TwoSquirrels
TwoSquirrels / -vowel-generator.html
Last active July 23, 2025 21:11
パラメーターを調整して「あ」の音をフォルマント合成して遊べる Web アプリ (create by Gemini)
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>「あ」の音ジェネレーター</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
@TwoSquirrels
TwoSquirrels / mic2key.cpp
Created July 23, 2025 19:35
mic2key WIP
# include <Siv3D.hpp> // Siv3D v0.6.15
//# include <Windows.h>
constexpr bool isDebug = SIV3D_BUILD_PRIVATE_DEFINITION_DEBUG(); // Debug Build
// MFCC
struct MFCC
{
Array<double> feature;
@TwoSquirrels
TwoSquirrels / hilbert.lua
Created July 23, 2025 19:27
Hilbert curve drawer for Computer Craft
-- SPDX-FileCopyrightText: 2025 TwoSquirrels
-- SPDX-License-Identifier: MIT
function forward(steps)
for i = 1, steps do
for slot = 1, 16 do
if turtle.getItemCount(slot) > 0 then
turtle.select(slot)
turtle.placeDown()
break
@TwoSquirrels
TwoSquirrels / wsh-checklist.md
Last active March 22, 2025 01:29
Web Speed Hackathon チェックリスト

Web Speed Hackathon チェックリスト ver.2025032210

SPDX-FileCopyrightText: Copyright (c) 2025 TwoSquirrels
SPDX-License-Identifier: MIT

りすりす/TwoSquirrels が WSH 用にまとめた、Web サイトチューニングのチェックリストです。このリストの項目を 1 つずつ対応していけば、機械的にある程度チューニングができるはずです。ご自由にお使いください!(WSH 用なので、キャッシュ周りについては省いています)

1. WSH 事前準備

  • 環境構築はできていますか?
@TwoSquirrels
TwoSquirrels / qr.lua
Created January 30, 2025 03:59
QR code generator for Computer Craft
-- SPDX-FileCopyrightText: 2025 TwoSquirrels
-- SPDX-License-Identifier: Apache-2.0
local qrencode = dofile("luaqrcode/qrencode.lua")
--- Generate a QR code matrix with padding.
--- @param text string the text to encode
--- @return boolean[][]|nil matrix the QR code matrix or nil if failed
local function qrcode(text)
local ok, tab = qrencode.qrcode(text)