Skip to content

Instantly share code, notes, and snippets.

View L4Ph's full-sized avatar
💭
I may be slow to respond.

Katsuyuki Karasawa L4Ph

💭
I may be slow to respond.
View GitHub Profile
@L4Ph
L4Ph / workflow.json
Created November 18, 2023 07:45
LCM LoRA + stable-fast + SDXLで使うWorkflow
{
"last_node_id": 67,
"last_link_id": 178,
"nodes": [
{
"id": 16,
"type": "PrimitiveNode",
"pos": [
-297,
90
@L4Ph
L4Ph / extensions.ts
Last active March 5, 2024 15:14
install vscode extensions
import { $ } from "bun"
async function installVscodeExtensions() {
const EXTENSIONS_FILE = ".vscode/extensions.json"
try {
const { recommendations } = await $`cat ${EXTENSIONS_FILE}`.json()
if (!recommendations || recommendations.length === 0) {
console.error("Can not find your recommendations extensions list.")
@L4Ph
L4Ph / sample.ts
Created August 31, 2024 03:58
Chrome 130
const assistant = await window.ai.assistant.create({ topK: 5, temperature: 0.8 });
try {
const response = await assistant.prompt("What is your name");
console.log(response);
} catch (error) {
console.error("Error during prompt:", error);
}
@L4Ph
L4Ph / index.ts
Created January 24, 2025 11:13
Qiita記事で、投稿日から最終更新日が3年以上離れている投稿を取得する
import ky from 'ky';
interface QiitaArticle {
created_at: string;
updated_at: string;
}
const accessToken = process.env.QIITA_ACCESS_TOKEN;
if (!accessToken) {
@L4Ph
L4Ph / markdown-it-rss.xml
Created April 28, 2025 14:03
markdown-it vs render()
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Fuwari</title><description>Demo Site</description><link>https://fuwari.vercel.app/</link><language>en</language><item><title>Markdown Extended Features</title><link>https://fuwari.vercel.app/posts/markdown-extended/</link><guid isPermaLink="true">https://fuwari.vercel.app/posts/markdown-extended/</guid><description>Read more about Markdown features in Fuwari</description><pubDate>Wed, 01 May 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;GitHub Repository Cards&lt;/h2&gt;
&lt;p&gt;You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.&lt;/p&gt;
&lt;p&gt;::github{repo=&quot;Fabrizz/MMM-OnSpotify&quot;}&lt;/p&gt;
&lt;p&gt;Create a GitHub repository card with the code &lt;code&gt;::github{repo=&quot;&amp;lt;owner&amp;gt;/&amp;lt;repo&amp;gt;&quot;}&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;::githu
@L4Ph
L4Ph / todo.md
Last active May 19, 2025 12:21
azooKey-Windowsビルドメモ
@L4Ph
L4Ph / remark-lite-youtube.ts
Last active May 30, 2026 18:52
remark plugin
import { visit } from "unist-util-visit";
import type { Root, Text, HTML, Link, PhrasingContent } from "mdast";
const extractYouTubeVideoID = (url: string): string | undefined => {
try {
const { hostname, pathname, searchParams } = new URL(url);
if (/(^|\.)youtube\.com$/.test(hostname)) {
if (pathname === "/watch") {
return searchParams.get("v") ?? undefined;
@L4Ph
L4Ph / before_rss.xml
Last active June 4, 2025 13:16
fuwari rss output
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Fuwari</title><description>Demo Site</description><link>https://fuwari.vercel.app/</link><language>en</language><item><title>Markdown Extended Features</title><link>https://fuwari.vercel.app/posts/markdown-extended/</link><guid isPermaLink="true">https://fuwari.vercel.app/posts/markdown-extended/</guid><description>Read more about Markdown features in Fuwari</description><pubDate>Wed, 01 May 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;GitHub Repository Cards&lt;/h2&gt;
&lt;p&gt;You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.&lt;/p&gt;
&lt;p&gt;::github{repo=&quot;Fabrizz/MMM-OnSpotify&quot;}&lt;/p&gt;
&lt;p&gt;Create a GitHub repository card with the code &lt;code&gt;::github{repo=&quot;&amp;lt;owner&amp;gt;/&amp;lt;repo&amp;gt;&quot;}&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;::githu
! LINE
||im.c.yimg.jp^
||a.line.me^
||obs.line-scdn.net^
||gw.line.naver.jp^
||ad.line-scdn.net^
||scdn.line-apps.com^
||linevoom.line.me^
||voom-assets.line-scdn.net^
||voom-obs.line-scdn.net^
@L4Ph
L4Ph / issues.ts
Created June 16, 2026 11:45
issue管理
#!/usr/bin/env node
// Local issue management script. Invoke via `vp run issues <subcommand>`.
// Conventions live in .claude/rules/issues.md.
import { readFileSync, writeFileSync, readdirSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const ISSUES_DIR = dirname(fileURLToPath(import.meta.url));