View days_ago.pl
#!/usr/bin/perl
use strict;
use warnings;
sub days_ago {
# 1引数か2引数かを厳密に見る
my ($time, $n);
if ( @_ == 1 ) {
$time = shift;
View wp-cli-install.sh
#!/bin/bash
# e.g.
# ssh server "curl -L git.io/v7xmi | bash"
# This script is stored as
# git.io/v7xmi
# and
# https://gist.github.com/xtetsuji/e620792db74640a81906920b9254ec81
set -eu
View libniz-series.pl
#!/usr/bin/perl
use strict;
use warnings;
use Math::Trig qw(pi);
use constant MAX_NUMBER => 100_000;
use constant MAX_NUMBER_LENGTH => length MAX_NUMBER;
View chrome-wand
#!/usr/bin/env perl
use strict;
use warnings;
use Scalar::Util qw(openhandle);
use IPC::Open2 qw(open2);
use Getopt::Long qw(:config posix_default no_ignore_case bundling auto_help);
use Pod::Usage qw(pod2usage);
View bs-code-detect.pl
#!/usr/bin/env perl
# bs-code-detect.pl [--daemon] [--replace [--pasteback]] [--silent]
use strict;
use warnings;
use Term::ANSIColor qw(colored);
use Getopt::Long qw(:config posix_default no_ignore_case bundling auto_help);
use Mac::Pasteboard ();
View mystacktrace-test.pl
#!/usr/bin/perl
use strict;
use warnings;
use Sys::Syslog;
#use Carp;
BEGIN {
( my $basename = $0 ) =~ s{.*/}{};
View 99seen.pl
#!/usr/bin/perl
use strict;
use warnings;
my %seen;
for my $i (1..9) {
for my $j (1..9) {
$seen{$i * $j}++;
View 99sum.pl
#!/usr/bin/perl
use strict;
use warnings;
my $sum = 0;
for my $i (1..9) {
for my $j (1..9) {
$sum += $i * $j;
View leapwatch.pl
#!/usr/bin/perl
use strict;
use warnings;
use Time::HiRes qw(usleep time);
while(1) {
printf "%s [%s]\n", time, scalar localtime;
# 0.1秒 = 10**5 microsecond
View qqns.pl
#!/usr/bin/perl
# xtetsuji 2016/10/26
# qqns.pl - qq.com の MX を qq.com の NS 群全部に問い合わせをして、その記録を取る
#
# 何も考えず雑に書いたのでかなり適当です
# qq.com の NS のうち複数が返答しない場合があるらしく、その調査観察を行うためのスクリプトです
use v5.10;
use strict;
use warnings;