Skip to content

Instantly share code, notes, and snippets.

View tokuhirom's full-sized avatar
💖
Focusing

Tokuhiro Matsuno tokuhirom

💖
Focusing
View GitHub Profile
@tokuhirom
tokuhirom / blog.md
Created October 7, 2026 06:20
Support testing and approval before tagging- #416 の解説

リリースタグを作る前に、ちゃんとテストして承認したい!

リリースPRをマージしたら、すぐタグが作られてリリースへ——。
便利だけど、「そのコミット、リリース前にテストしたい!」と思うこともありますよね。

tagpr に、そんなときのための タグ作成をあとに回す機能が加わりました。

@tokuhirom
tokuhirom / symbolize.raku
Created July 30, 2026 02:15
symbolize.raku - 任意の Raku コードを「記号だけ」のプログラムに変換する
#!/usr/bin/env raku
# symbolize.raku - 任意の Raku コードを「記号だけ」のプログラムに変換する
#
# 使い方:
# raku symbolize.raku 'say "hello"' # 引数で payload を渡す
# echo 'say 6 * 7' | raku symbolize.raku # stdin で渡す
#
# 仕組み:
# - 記号3つの XOR (A ~^ B ~^ C) で任意バイト列(= payload と "EVAL")を構築
# - payload を $_ に入れ、間接メソッド呼び出し $_."{...}"() で .EVAL を起動
@tokuhirom
tokuhirom / README.md
Last active November 6, 2025 03:12
smem

Mirror of smem.

This code is based on 1.5 version, that supports python3. smem authors doesn't release 1.5 version tar ball, yet.

https://www.selenic.com/smem/

You can download this by: curl -L -o smem http://bit.ly/4qLPHjK

smem requires python3.

---
openapi: 3.0.3
info:
title: Example
version: 1.0.0
servers:
- url: 'https://example.com/'
paths:
/callback:
@tokuhirom
tokuhirom / ploc
Created January 24, 2020 23:24
ploc
#!/usr/bin/env perl
use strict;
&main; exit;
sub main {
my %white = map { $_ => 1 } qw/
kt java pl js rb py
/;
self.addEventListener('message', function(e){
setInterval(function(){
self.postMessage('tick');
}, 1000);
}, false);
@tokuhirom
tokuhirom / .vimrc
Created November 28, 2017 02:09
.vimrc
" *************************************************************************
" tokuhirom's .vimrc file.
"
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"
"
" :e ++enc=cp932
"
" *************************************************************************
@tokuhirom
tokuhirom / update_curl.sh
Created January 31, 2017 06:26 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@tokuhirom
tokuhirom / README.md
Last active January 25, 2017 06:38
Bulk generate beta distribution random number generator in XS

Calling a XS function many times makes overhead. I recommend to run a for-loop in XS. It makes 155% faster than original implementation. (I want to generate a lot of β dsitribution random numbers)

@tokuhirom
tokuhirom / bench.p6
Created December 5, 2016 15:57
p6 benchmark
use v6;
use Crust::Runner;
my $app = sub ($env) {
return 200, [], ['hello'];
};
my $runner = Crust::Runner.new;
$runner.parse-options(@*ARGS);