Skip to content

Instantly share code, notes, and snippets.

View u1f992's full-sized avatar

Koutaro Mukai u1f992

View GitHub Profile
<style> @page { size: A4; margin-block: 15mm; } :root { counter-reset: section; }
# autotrace.dockerfile
# Copyright (C) 2025 Koutaro Mukai
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@u1f992
u1f992 / example.html
Last active April 12, 2025 03:08
float: bottom;は脚注エリアを考慮した本文領域の下部に表示されることを確認するデモ
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
@page {
size: A5;
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>Vivliostyle CLI+rehypeプラグインによる原稿の前処理</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
type="text/css"
href="themes/packages/css/style.css"
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>CSS組版完全に理解した</title>
<style>
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:[email protected]&display=swap");
:root {
font-family: "Noto Sans JP";
@u1f992
u1f992 / .js
Created December 3, 2024 14:17
/**
* https://drafts.csswg.org/css-color-5/#device-cmyk
*
* @param {string} input
* @returns {{c:number,m:number,y:number,k:number,a:number}|null}
*/
function parseDeviceCmyk(input) {
/**
* https://www.w3.org/TR/css-syntax/#newline
*/
@u1f992
u1f992 / .md
Last active June 1, 2024 13:00

Qingpiの製造方法メモ

Pokémon Past Generation Advent Calendar 2023、185日目の記事です。売り切れ御礼の3DS LL合意なし秘密さわさわ基板Qingpiの製造についてかんたんに書きます。

QingpiはGPLv3で公開されています。ライセンスに従って自由に製造していただいて構いません。なおNew 3DS LLに対応する新作を開発中です。よほどでなければ気長にお待ちいただくのがよいでしょう。3DS LLに対応するかは未定です。

PCB

Qingpiのプリント基板は、JLCPCBでの製造を前提にKiCadで開発されています。もろもろの具体的な手順は他所のサイトを参考にしてください。

import fs from "node:fs";
import vm from "node:vm";
import jsdom from "jsdom";
type PrismContext = vm.Context & { PrismContext: never };
type PrismPlugin = "autolinker"
| "autoloader"
| "command-line"
| "copy-to-clipboard"
import argparse
def figure_6_v_o(n: int, d: int, d_3: int) -> float:
"""
Voltage divider calculation based on the approach shown in Figure 6.
Args:
n (int): The resolution of the RDACs in bits.
d (int): The data bits of `U_1` and `U_2`.
import math
import time
import typing
import serial
from Commands.PythonCommandBase import ImageProcPythonCommand
import qingpi
from qingpi import * # type: ignore