Skip to content

Instantly share code, notes, and snippets.

@sonota88
sonota88 / langserver.rb
Last active April 15, 2025 09:34
Rubyで簡単な言語サーバー
require "json"
require "logger"
REQUEST_TABLE = {}
NOTIFICATION_TABLE = {}
LOGGER = Logger.new(File.join(__dir__, "debug.log"))
def log(msg) LOGGER.info(msg) end
def read_header
@sonota88
sonota88 / test.html
Last active January 19, 2025 13:35
Web Audio API: GainNode の調査
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>GainNode test</title>
<script src="test.js"></script>
</head>
<body style="background: #f8f8f8; padding: 1rem;">
<p>ページのどこかをクリック、またはスペースキー押下で再生開始</p>
<pre style="
@sonota88
sonota88 / align_regexp.html
Created December 3, 2022 05:24
HTML + JavaScript で Emacs の align-regexp
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>align-regexp</title>
<style>
* {
font-family: Firge, monospace;
}
@sonota88
sonota88 / Json.bas
Last active November 5, 2020 00:19
vm2gol-v2-libreoffice-basic
rem -*- mode: basic -*-
Option Explicit
rem --------------------------------
function parse_json(json)
dim parse_result
parse_result = _parse_json(json)
parse_json = parse_result(0)
@sonota88
sonota88 / README.md
Created June 18, 2020 11:52
bhatena-hcalendar.user.js
@sonota88
sonota88 / README.md
Last active December 28, 2019 05:05
LibreOffice Drawのodgファイルから図形の情報を抜き出して使うサンプル
@sonota88
sonota88 / 1.adoc
Last active March 23, 2023 22:37
asciidoc test
ああああ \
いいいい
ああああ いいいい
— うううう
#!/usr/bin/env ruby
# coding: utf-8
require "pp"
CS_JAR_PATH = "checkstyle-8.12-all.jar"
CS_CONFIG_PATH = "google_checks.xml"
class DiffRange
def initialize(from, len)
@sonota88
sonota88 / erb_context.rb
Created February 8, 2016 11:45
erb context
class ErbContext
def initialize params
@params = params
end
def method_missing name, *args
if @params.has_key? name
@params[name]
else
raise "unknown key (#{name})"
MANUAL_INDEX
http://www.aozora.gr.jp/KOSAKU/MANU_IND.html
旧マニュアル?
青空文庫・外字注記辞書
http://www.aozora.gr.jp/gaiji_chuki/
外字注記辞書のPDF
実 → 實
7 . 說 ※[#「言+兌」]→[包摂適用 説 ] 15