This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# smtp-connect-bench.pl [HOSTNAME|IPADDR] | |
# SMTP 接続の速度を確認する | |
use strict; | |
use warnings; | |
use Net::SMTP; | |
use Time::HiRes qw(time sleep); # ミリ秒化 | |
use constant WAIT_SECONDS => 15; | |
use constant SMTP_TIMEOUT_SECONDS => 120; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; # このスクリプトは UTF-8 で書かれている、文字列リテラルはそういう文字として評価する | |
use Encode qw(encode decode); | |
binmode STDOUT, ':utf8'; | |
# https://www.post.japanpost.jp/zipcode/dl/kogaki-zip.html | |
my $file = 'KEN_ALL.CSV'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# \r を使って文字のパラパラまんが的なもの | |
use strict; | |
use warnings; | |
use Time::HiRes qw(sleep); | |
# 標準出力は \n を送らないとバッファリングして画面に表示してくれないことがあるので、バッファリングしないでねという指示 | |
$| = 1; # STDOUT のバッファリングをオフにしてほしい |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# 2018/06/21 xtetsuji | |
# Dropbox と iCloud で片方にしか無い、または両方にあるファイルを色分け | |
# このスクリプトでは WEB+DB PRESS と Software Design で調査する | |
# | |
# iCloud で、クラウド側にはファイルはあるけれど手元にデータを | |
# 同期していない場合、foo.txt の代わりに .foo.txt.icloud というファイルが | |
# 置かれることに注意 | |
use strict; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# 2018/06/16 | |
# とても素朴なURL外形監視 | |
use strict; | |
use warnings; | |
use Net::SMTP; | |
use HTTP::Tiny; | |
use Data::Dumper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Encode; | |
use HTTP::Tiny; | |
binmode STDOUT, ':utf8'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mailto = "YOUR_PHONE_ADDRESS"; | |
// 定期的に呼ばれる | |
function walkWritePrice () { | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = spreadsheet.getSheetByName("価格ウォッチ"); | |
if ( !sheet ) return; | |
var dateCell = _dateInsertionCell(sheet); | |
dateCell.setValue(today()); | |
var urlColumnNumber = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# xtetsuji 2018/04/10 | |
# Usage: | |
# move-to DIR FILE1 FILE2 ... | |
# | |
# mv FILE1 FILE2 ... DIR ; 移動元ファイル群と移動先の指定が逆なもの | |
# | |
# これは xargs で役立つ | |
# e.g.: | |
# 4並列、一度の移動プロセスで最大100ファイルを目的のディレクトリへ移動させる場合 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Memoize qw(memoize); | |
memoize("get_variation_hash"); | |
for my $n (9..1_000_000) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# phs - popup host ssh | |
# xtetsuji 2016/11/17 | |
if [ "$1" ] && [ "_$1" = _-h -o "_$1" = _--help ] ; then | |
exec perldoc $0 | |
fi | |
declare DEBUG | |
declare PHS_SCREEN_COMMAND PHS_TMUX_COMMAND PHS_OPEN_MODE PHS_SSH_COMMAND |