This file contains hidden or 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; | |
binmode STDOUT, ':utf8'; | |
binmode STDERR, ":utf8"; | |
use Encode; | |
use LWP::Simple 'get'; |
This file contains hidden or 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; | |
my $count = shift || 20; | |
my @random = qw/R R F F U U L D M/; | |
my $rate_2 = 0.3; | |
my $rate_prime = 0.3; | |
my @result; |
This file contains hidden or 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
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>SLACK</appname> | |
<equal>com.tinyspeck.slackmacgap</equal> | |
</appdef> | |
<item> | |
<name>For Slack CTRL+TAB=move unread channel</name> | |
<identifier>private.app_slack_move_channel_with_ctrl_tab</identifier> | |
<only>SLACK</only> |
This file contains hidden or 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
use strict; | |
use warnings; | |
use Net::Domain::ExpireDate 'expire_date'; | |
use Time::Seconds; | |
use Data::ICal; | |
use Data::ICal::Entry::Todo; | |
use Data::ICal::Entry::Event; |
This file contains hidden or 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 DateTime; | |
use Digest::SHA1 qw(sha1_hex); | |
use Encode; | |
use File::Path qw/make_path/; | |
use HTML::Parser; |
This file contains hidden or 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 | |
print "Hello, World!!"; |
This file contains hidden or 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
@media screen and (max-device-width: 480px) { | |
* { | |
font-size: 48px; | |
line-height: 64px; | |
word-break: break-all; | |
} | |
table#banner, div#simple-header, div.sidebar, div.caption { | |
display:none | |
} | |
img.hatena-star-comment-button, img.hatena-star-add-button, img.hatena-star-star { |
This file contains hidden or 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
CREATE TABLE entry ( | |
blog_id INT, | |
created datetime | |
); | |
DROP PROCEDURE IF EXISTS set_uninterrupted_count; | |
DELIMITER // | |
CREATE PROCEDURE set_uninterrupted_count(IN id INT, OUT uninterrupted_count INT) | |
BEGIN | |
DECLARE done INT DEFAULT 0; |
This file contains hidden or 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; | |
# TODO | |
# - drop key | |
@ARGV == 2 or die 'Usage: mysqldiff dbname1 dbname2'; | |
my @tables = map { |
This file contains hidden or 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
use IDNA::Punycode; | |
use Encode; | |
idn_prefix('xn--'); | |
decode_punycode('xn--cho'); #=> '䑵' | |
decode_punycode('xn--motemen'); #=> '嵡嵣嵫嵧嵨' | |
decode_punycode('xn--hitode'); #=> '岴岊岲' | |
decode_punycode('xn--hakobe932'); #=> IDNA::Punycode が落ちて abort |
NewerOlder