Skip to content

Instantly share code, notes, and snippets.

// The following code is a result of GPT-4: Use with caution
//
// prompt:
// このソースコードにエラー処理とコメントを適切に追加し、各関数の先頭でその関数のサイクロマティック複雑度をコメントしてください。ソースコードを出力した後にソースコードについて説明する必要はありません。
package main
import (
"flag"
"fmt"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from contextlib import contextmanager
@contextmanager
def ctxmgr():
print('before')
@msmhrt
msmhrt / Install.LOG
Created August 30, 2022 18:16
build log of h2o
Script started on 2022-08-31 03:06:48+0900
]0;msmhrt@ashrose: ~/repository/h2o msmhrt@ashrose:~/repository/h2o$ git clean -fdx
Removing build/
Removing include/h2o/gitrev.h
]0;msmhrt@ashrose: ~/repository/h2o msmhrt@ashrose:~/repository/h2o$ mkdir -p build
]0;msmhrt@ashrose: ~/repository/h2o msmhrt@ashrose:~/repository/h2o$ cd build
]0;msmhrt@ashrose: ~/repository/h2o/build msmhrt@ashrose:~/repository/h2o/build$ cmake -DCMAKE_INSTALL_PREFIX=/home/msmhrt/local ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
@msmhrt
msmhrt / katakana_variants.txt
Created June 24, 2018 15:55
Katakana word list for the master branch of vim-jp/vimdoc-ja-working (2018/06/25)
エミュレータ(13)、エミュレーター(2)
キャラクタ(21)、キャラクター(1)
コンピュータ(19)、コンピューター(1)
サーバー(166)、サーバ(1)
ハンドラ(13)、ハンドラー(9)
バー(11)、バッ(1)
パス(215)、パース(33)
パラメーター(19)、パラーメーター(1)、パラメータ(1)
ファイル・ウィンドウ(1)、ファイルウィンドウ(1)
ファイル・バッファ(2)、ファイルバッファ(1)
@msmhrt
msmhrt / katakana_variants.txt
Last active July 25, 2017 00:13
Katakana word list for the master branch of vim-jp/vimdoc-ja-working (2017/07/25)
キャラクタ(21)、キャラクター(1)
コンピュータ(19)、コンピューター(1)
サーバー(163)、サーバ(1)
ハンドラ(13)、ハンドラー(9)
バー(11)、バッ(1)
パス(208)、パース(32)
パラメーター(19)、パラーメーター(1)
ファイル・ウィンドウ(1)、ファイルウィンドウ(1)
ファイル・バッファ(2)、ファイルバッファ(1)
フィルタ(69)、フィルター(8)
@msmhrt
msmhrt / katakana_variants.txt
Created November 16, 2013 22:53
Katakana word list for EPUB 3.0.1Draft (2013/11/17)
オペレーティング・システム(2)、オペレーティングシステム(2)
コンテクスト(25)、コンテキスト(12)
パッケージメタデータ(6)、パッケージ・メタデータ(4)
フローコンテンツ(2)、フロー・コンテンツ(1)
ヘッダー(4)、ヘッダ(1)
マルチ・パス(1)、マルチパス(1)
ユーザーインターフェース(3)、ユーザインタフェース(1)
ルートディレクトリ(11)、ルート・ディレクトリ(1)
ルートファイル(2)、ルート・ファイル(1)
レ(1)、リ(1)
@msmhrt
msmhrt / katakana_variants.txt
Created January 10, 2014 13:38
Katakana word list for LibreOffice (2014/01/10)
インポートフィルター(9)、インポートフィルタ(4)
ウィルス(3)、ウイルス(2)
ウイグル(4)、ウィグル(1)
オフィススイート(3)、オフィススィート(1)
カーソル(11)、カーソール(2)
キリル(32)、キリール(2)
キー(73)、キ(2)
クエリー(96)、クエリ(2)
コーサ(8)、コサ(1)
サンタル(4)、サンタール(1)
@msmhrt
msmhrt / py30.diff
Created December 28, 2013 13:07
patch to support Python 3.0 on Vim 7.4.131
diff -r 2f856c7c1d43 src/if_python3.c
--- a/src/if_python3.c Sun Dec 15 10:02:33 2013 +0100
+++ b/src/if_python3.c Sat Dec 28 14:57:26 2013 +0900
@@ -79,8 +79,9 @@
# define CODEC_ERROR_HANDLER NULL
#endif
-/* Python 3 does not support CObjects, always use Capsules */
-#define PY_USE_CAPSULE
+#if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x030100b1
@msmhrt
msmhrt / gist:7888026
Created December 10, 2013 09:33
Syntax higilight of indent (ts=8,sw=4)
syntax match MyIndentStart "^" nextgroup=MySoftIndent1,MyMixedIndent1,MyHardIndentOdd
syntax match MySoftIndent1 "____"he=s+1 contained nextgroup=MySoftIndent2,MyMixedIndent2,MyHardIndentOdd
syntax match MySoftIndent2 "____"he=s+1 contained nextgroup=MySoftIndent3,MyMixedIndent3,MyHardIndentEven
syntax match MySoftIndent3 "____"he=s+1 contained nextgroup=MySoftIndent4,MyMixedIndent4,MyHardIndentEven
syntax match MySoftIndent4 "____"he=s+1 contained nextgroup=MySoftIndent1,MyMixedIndent1,MyHardIndentOdd
syntax match MyHardIndentOdd "\t" contained nextgroup=MySoftIndent3,MyMixedIndent3,MyHardIndentEven
syntax match MyHardIndentEven "\t" contained nextgroup=MySoftIndent1,MyMixedIndent1,MyHardIndentOdd
syntax match MyMixedIndent1 "_\{1,3}\t" contained nextgroup=MySoftIndent3,MyMixedIndent3,MyHardIndentEven
syntax match MyMixedIndent2 "_\{1,3}\t" contained nextgroup=MySoftIndent3,MyMixedIndent3,MyHardIndentEven
syntax match MyMixedIndent3 "_\{1,3}\t" contained nextgroup=MySoftIndent1,MyMixedInd
@msmhrt
msmhrt / katakana_variants.txt
Created November 17, 2013 12:12
Katakana word list for GNOME 3.12 (development) (2013/11/17)
アイコンファイル(4)、アイコン・ファイル(2)
アクションキー(3)、アクション・キー(2)
アクセラレータ(49)、アクセラレーター(1)
アクセラレータキー(8)、アクセラレーターキー(1)
アセンブラー(1)、アセンブラ(1)
アゾーレス(1)、アゾレス(1)
アナーバー(1)、アナバ(1)
アピーア(1)、アピア(1)
アラーム(12)、アラム(1)
アルーバ(1)、アルヴァ(1)、アルバ(1)