Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
PERL518=`/usr/bin/perl -e 'print $] =~ m/^5.018/;'`
if [ "${PERL518}" = "1" ];
then
exit 0
else
exit 64
fi
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use v5.10;
use Getopt::Long qw(:config posix_default no_ignore_case);
use List::Util qw(min);
# usage:
@amatubu
amatubu / db1.pl
Created December 16, 2014 06:10
サルベジオン社で宇宙船のデータを救え
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use bigint;
use LWP::Simple;
my $search_key = 208050656559285601386927895421059705239114932023754; # 探す key
@amatubu
amatubu / 01_ssl_peer_cert_test.pl
Last active August 29, 2015 14:09
IO::Socket::SSL と Net::SSLeay による証明書検証の謎
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use IO::Socket;
use IO::Socket::SSL;
use Mozilla::CA;
@amatubu
amatubu / modify.sh
Last active October 30, 2015 15:49
新刊コミック情報というiOSアプリのデータから不要なタグを削除する
#!/bin/sh
rm -f ComicsData.sqlite.bak
cp ComicsData.sqlite ComicsData.sqlite.bak
sqlite3 ComicsData.sqlite < modify.sql
@amatubu
amatubu / DICTI.pm
Created April 13, 2013 07:33
Triany 問題の辞書プログラム
package Triany::DICTI;
use strict;
use warnings;
use utf8;
use Triany::TLLI;
use Math::Random::MT qw/rand/;
@amatubu
amatubu / curry5.pl
Created March 15, 2013 12:09
Create spice matrix again
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
# スパイスのグループ
my @spices_strings = (
# グループ C
"Nercitoma Maceor Limeminnor Loveaneic Pamacetah Labcara Lovema Nillaneric Beba Rosery Spicechootal Qulabry Limemin Achiomaseic Mata Corma Ginitah Citograor Matatal Bebalemoma Licotaor Stachoooc Rumin Citoat Cardoquist Rinacardory Monmyraist Glaru Sumaricetah Myrarice Rosemaceoc Tamaoc Riceso Mahseoc",
@amatubu
amatubu / curry4.pl
Created March 15, 2013 12:06
Calculate scores of plates
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
# 片方の皿に入れるスパイスの候補
my @spices_strings = (
"Tamaoc",
# グループ A
@amatubu
amatubu / curry3.pl
Created March 15, 2013 11:56
Find spices which is compatible with Minnlabic
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
my %spices;
my %blends;
# ブレンドリストを開く
@amatubu
amatubu / curry2.pl
Created March 15, 2013 11:49
Create spice matrix
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
my %spices;
my %blends;
# ブレンドリストを開く