Skip to content

Instantly share code, notes, and snippets.

@mash
mash / review-refactoring-SKILL.md
Created July 1, 2026 16:42
review-refactoring skill (Claude Code): verifies a PR is a pure, behavior-preserving refactoring
name review-refactoring
description リファクタリングPR/ブランチを第三者視点で批判的にレビューし、各変更が純粋リファクタリングか動作変更を含むかを評価する
argument-hint base branch is <branch-name>
context fork
disable-model-invocation true
allowed-tools Bash(git:*), Bash(mkdir), Bash(ls), Read, Grep, Glob, Write, Agent(Explore)

Refactoring Reviewer Agent

@mash
mash / SKILL.md
Created April 21, 2026 15:20
math-worksheet-refresh-latex skill
name math-worksheet-refresh-latex
description PDFのワークシートを、難易度を保ったまま少し新しい類題に差し替え、LaTeXで数式を正しく組版した新しいPDFとして作り直す skill。平方根、分数、指数、不等式など、手描きではなく数式組版の品質が重要な教材に使う。

Math Worksheet Refresh LaTeX

概要

ユーザーがワークシートPDFを渡し、「似た難易度で新しい問題にしたい」と求めたときに使う。最終成果物は、数式を手描きで近似するのではなく、LaTeXで正しく組版したPDFを優先する。

@mash
mash / index.tx
Created December 14, 2011 05:17
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
</head>
<body>
<script>
$( function() {
$.getScript("http://platform.twitter.com/widgets.js", function(){
package main
import (
"fmt"
"log"
"net"
"net/http"
"os"
)
@mash
mash / main.go
Last active February 13, 2022 21:47
atmega32u4が品切れだった時に電子部品サイトの在庫をscrapeするくん
package main
import (
"fmt"
"github.com/PuerkitoBio/goquery"
"net/url"
"os"
"regexp"
"strconv"
"strings"
@mash
mash / prettyprintgist.md
Created July 1, 2016 08:38 — forked from magnetikonline/README.md
Bookmarklet to pretty print Gist pages without the usual page chrome, just content. Handy for Markdown document printing.

Pretty print bookmarklet helper for Gist pages

Create a new bookmark somewhere handy in your browser with the following URL:

javascript:var el=document.createElement('style');el.media='print';el.innerHTML='#header,.pagehead.repohead,.gist-description.container,.file-box .meta,#comments,.js-comment-form,.gist-header,.file-header,.gisthead,#footer{display:none;}.file-box{border:0!important;}';document.getElementsByTagName('head')[0].appendChild(el);alert('Now, cmd+p to print');
  • Navigate to your Gist of choice
  • Hit the bookmarklet
  • Now print
@mash
mash / Makefile
Created November 4, 2014 09:59
udp server sample using libuv
LIBUV_HOME := $(HOME)/src/github.com/joyent/libuv
LIBUV := $(LIBUV_HOME)/build/Release/libuv.a
INC = $(LIBUV_HOME)/include
all:
gcc -o main -I$(INC) -Wall main.c $(LIBUV)
PHONY: all
@mash
mash / audio.swift
Created September 22, 2017 10:50
audio stuff on macOS
//
// File.swift
// AudioSwitcher
//
// Created by Masakazu Ohtsuka on 2017/09/22.
// Copyright © 2017 maaash.jp. All rights reserved.
//
import Foundation
import Cocoa
<html>
<head>
<script src="keyserializer.js"></script>
<script type="text/javascript">
console.log( keyserializer.serialize({
security : keyserializer.SECURITY_WPA_WPA2,
ssid : "IRKitTester",
password : "irkitone",
devicekey : "0123456789ABCDEF0123456789ABCDEF"
}) );
@mash
mash / gist:281e8e5ee7188a659213c7ecc363e3b2
Last active April 8, 2020 13:25
An architecture design for tracking COVID-19 proximity that incorporates privacy
Backend publishes 2 APIs
1. Fetch Near-to-Infected list
Near-to-Infected list entry consists of:
- userIDs that have been near to an infected person
- Time when the userID was near an infected person
This can be a static text file that gets updated when E-2 happens.
2. Append Near-to-Infected list
This is going to be called when a person was diagnosed as positive.
See E.