Skip to content

Instantly share code, notes, and snippets.

View ttdoda's full-sized avatar

IWAMOTO Kouichi ttdoda

  • Kanagawa, Japan
View GitHub Profile
sue@taiyo% wc test.dat
12780000 39280001 391120000 test.dat
sue@taiyo% repeat 10 time sed '/\(\)/d' test.dat
sed '/\(\)/d' test.dat 2.38s user 0.08s system 99% cpu 2.458 total
sed '/\(\)/d' test.dat 2.56s user 0.06s system 99% cpu 2.626 total
sed '/\(\)/d' test.dat 2.48s user 0.07s system 99% cpu 2.556 total
sed '/\(\)/d' test.dat 2.53s user 0.08s system 99% cpu 2.607 total
sed '/\(\)/d' test.dat 2.49s user 0.07s system 99% cpu 2.560 total
sed '/\(\)/d' test.dat 2.42s user 0.08s system 99% cpu 2.515 total
sed '/\(\)/d' test.dat 2.55s user 0.09s system 97% cpu 2.717 total
@ttdoda
ttdoda / .vimrc
Last active November 28, 2019 03:50
tmux使用時のvimでのBracketed Paste Mode有効化
if has('patch-8.0.0238')
if &term =~ "screen"
let &t_BE = "\e[?2004h"
let &t_BD = "\e[?2004l"
exec "set t_PS=\e[200~"
exec "set t_PE=\e[201~"
endif
else
if has('patch-8.0.0210')
set t_BE=
@ttdoda
ttdoda / KEYBOARD-micro.cnf
Last active June 19, 2019 05:07
Tera Termでmicroを使う為のキーボード設定
;
; Tera Term で micro https://github.com/zyedidia/micro を使う為に必要なキーボード設定
;
; Shortcut keysセクションの以下の設定を変更する
[Shortcut keys]
; Ctrl + up-arrow
LineUp=off
; Ctrl + down-arrow
LineDown=off
@ttdoda
ttdoda / basicauth.txt
Created May 8, 2019 03:38
踊る大捜査線 THE MOVIEでのTera Termの表示内容とデコード結果
bWFzaGl0YTp5dS1zdWtl mashita:yu-suke
a2FubmRhOmtpdGFtdXJh kannda:kitamura
c2hpbWFkdTpoYW1hZGE= shimadu:hamada
YWtpeWFtYTpzYWl0b3U= akiyama:saitou
bmFrYW5pc2hpOmtvYmF5YXNoaQ== nakanishi:kobayashi
bW9yaXNoaXRhOnRvdXlhbWE= morishita:touyama
b2dhdGE6a291bW90bw== ogata:koumoto
a2Vpa286eXVrYQ== keiko:yuka
eW91a286bmFnaW5l youko:nagine
dGFla286dGFla28= taeko:taeko
@ttdoda
ttdoda / multicast-example.ttl
Created April 10, 2019 16:40
sendmulticast を使用した複数端末の制御例
;
; multicast-example.ttl: sendmulticast を使用した複数端末の制御例
;
; COM2 で hoge を受信したら、sendmulticast を使って COM1 で fuga を送信する。
; COM1 はデータの送信のみ行える。
;
; License: CC0
; multicastname を "sender" に設定して、COM1 を開く
connect "/C=1 /mn=sender"
@ttdoda
ttdoda / .Xresources
Created February 26, 2019 10:29
xtermでマウス右ボタンでペーストする設定
*VT100*translations: #override \n\
~Ctrl ~Meta <Btn2Down>:start-extend() \n\
~Meta <Btn2Down>:select-extend() \n\
~Ctrl ~Meta <Btn2Up>:ignore() \n\
~Meta <Btn3Down>:ignore() \n\
~Ctrl ~Meta <Btn3Up>:insert-selection(SELECT, CUT_BUFFER0)
@ttdoda
ttdoda / locator-check.bash
Created January 25, 2019 08:53
DEC Locator mode対応確認
#!/usr/bin/env bash
#
# locator-check.bash: 端末が DEC Locator mode に対応しているか確認する
#
# 端末に ESC [ ? 55 n (ロケータ状態問い合わせ) を出力し、それへの応答で判断する
# ESC [ ? 50 n - 対応
# ESC [ ? 53 n - 非対応。ただしロケータ問い合わせ自体は理解出来ているので、
# 設定等で対応する可能性あり。
# 応答なし - 非対応
#
@ttdoda
ttdoda / eeeee_vt400.txt
Created December 18, 2018 06:21
eeeee for vt420 or later
[2*x[101;1;1;999;999$x[3;4;15;15;7$r[2;6;16;13;7$t[4;3;14;16;7$t[5;2;13;17;7$t[4;4;14;15;0$r[9;3;9;17;7$r[10;17;13;17;0$r[1;1;16;18;1;1;19;1$v[1;1;16;36;1;1;37;1$v[1;1;16;72;1;1;73;1$v[1;1;16;144;1;17;1;1$v[1;1;32;144;1;33;1;1$v
@ttdoda
ttdoda / eeeee_vt100.txt
Created December 18, 2018 06:18
eeeeeee for vt100
#8
@ttdoda
ttdoda / fall.rb
Last active November 15, 2018 11:33
端末が落ちます (下方向に)
#!/usr/bin/env ruby
#
# fall.rb -- 端末が落ちます (下方向に)
#
# 対応端末:
# dttermのウィンドウ制御シーケンスに一通り対応していれば動くはず……だけど意外と少ないんだ、これが
# 手元で動作するのを確認したのは xterm, Tera Term, mintty の三つ
#
# License: CC0