Skip to content

Instantly share code, notes, and snippets.

@trueroad
trueroad / get_encrypted_session.py
Last active July 11, 2022 14:40
Experiment get encrypted session CGI.
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Experiment get encrypted session CGI.
https://gist.github.com/trueroad/e08efb3a1096c6df7243f6b1deed9d57
Copyright (C) 2022 Masamichi Hosoda.
All rights reserved.
@trueroad
trueroad / op_selector.py
Last active July 3, 2022 12:00
OP selector CGI for mod_auth_openidc
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
OP selector CGI for mod_auth_openidc.
https://gist.github.com/trueroad/29974ea939e7b57a8539f0626cd8df6b
https://qiita.com/trueroad/items/3d8a7dae83c7af66518b
Copyright (C) 2022 Masamichi Hosoda.
All rights reserved.
@trueroad
trueroad / Sekaiju-7.5-add-dialog-extension-midi.patch
Last active May 19, 2022 15:06
世界樹 7.5 で拡張子 .midi のスタンダード MIDI ファイルを「開く」と「名前を付けて保存」ダイアログでも扱えるようにするパッチ
世界樹 7.5 で拡張子 .midi のスタンダード MIDI ファイルを
「開く」と「名前を付けて保存」ダイアログでも扱えるようにするパッチ
このパッチは一つの方法のご提案です。
このパッチを使うには下記 URL のパッチを先に当ててください。
https://gist.github.com/trueroad/2b963111a8662432f9ecf47ae705ed43
また、リソーススクリプト(*.rc のファイル)は
UTF-16 のようでしたが diff では扱いにくかったので
@trueroad
trueroad / Sekaiju-7.5-add-filename-extension-midi.patch
Last active May 19, 2022 10:35
世界樹 7.5 で拡張子 .midi のスタンダード MIDI ファイルを読み込めるようにするパッチ
--- SekaijuDoc.cpp.org
+++ SekaijuDoc.cpp
@@ -537,6 +537,7 @@
}
// スタンダードMIDIファイル(*.mid)の場合
else if (strExt.CompareNoCase (_T(".mid")) == 0 ||
+ strExt5.CompareNoCase (_T(".midi")) == 0 ||
strExt.CompareNoCase (_T(".vsq")) == 0) {
m_pMIDIData = MIDIData_LoadFromSMF (lpszPathName);
if (m_pMIDIData == NULL) {
@trueroad
trueroad / compare-images.py
Last active May 12, 2022 12:24
Compare images using ImageMagick
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Compare images using ImageMagick.
https://gist.github.com/trueroad/299484bf93d7e05bda728dc8039a685d
Copyright (C) 2022 Masamichi Hosoda.
All rights reserved.
@trueroad
trueroad / diff_levenshtein.py
Last active March 31, 2022 15:15
Levenshtein matching class partially compatible with difflib.SequenceMatcher.
#!/usr/bin/env python
"""
Levenshtein matching class partially compatible with difflib.SequenceMatcher.
https://gist.github.com/trueroad/341afa4ff6045fe05ae945a0697822c5
Copyright (C) 2022 Masamichi Hosoda.
All rights reserved.
@trueroad
trueroad / test-staccato-length-in-smf-by-articulate-ly.ly
Last active March 12, 2022 09:04
LilyPond の SMF (Standard MIDI File) 出力でスタッカートの長さを調整する(articulate.ly 使用版)
%
% LilyPond の SMF (Standard MIDI File) 出力でスタッカートの長さを調整する
% articulate.ly 使用版
%
% https://gist.github.com/trueroad/f5efd3100e2e2155dc759f983b4d2dc7
%
% Copyright (C) 2022 Masamichi Hosoda.
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
@trueroad
trueroad / test-staccato-length-in-smf.ly
Last active March 12, 2022 08:57
LilyPond の SMF (Standard MIDI File) 出力でスタッカートの長さを調整する(articulate.ly 不使用版)
%
% LilyPond の SMF (Standard MIDI File) 出力でスタッカートの長さを調整する
%
% https://gist.github.com/trueroad/ce6a73aa0d23ee0d5c6de33d81fc1f8e
%
% Copyright (C) 2022 Masamichi Hosoda.
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
@trueroad
trueroad / unknown_meta_rm.py
Last active July 23, 2022 12:29
Unknown meta message remover for mido input SMF.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Unknown meta message remover for mido input SMF.
https://gist.github.com/trueroad/44728aaed2ec5cab173900459fbe16e7
Copyright (C) 2022 Masamichi Hosoda.
All rights reserved.
@trueroad
trueroad / test-tomli.py
Last active February 8, 2022 13:30
Test tomli
#!/usr/bin/env python3
"""
Test tomli.
https://gist.github.com/trueroad/f92b4e53efeac8750408b83b302e3eb6
Copyright (C) 2022 Masamichi Hosoda.
All rights reserved.
Redistribution and use in source and binary forms, with or without