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 ruby | |
REPOS_DIR = File.expand_path('~/repos') | |
owner_and_repo, * = *ARGV | |
clone_dir = File.join(REPOS_DIR, '@' + owner_and_repo) | |
if FileTest.directory?(clone_dir) | |
abort "#{owner_and_repo} is already cloned" | |
end |
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/sh | |
set -ue | |
if [[ $# -le 0 ]]; then | |
cat <<ERROR 1>&2 | |
Usage: | |
$(basename $0) TAP_OWNER/TAP_REPO | |
ERROR | |
exit 1 | |
fi |
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
export SOCKSIFY=1 |
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 cartonup; | |
use Plack; |
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
using AntiString | |
puts !"和尚" # -> 尚和 |
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
package t::constraints; | |
use strict; | |
use warnings; | |
use FormValidator::Lite::Constraint; | |
use Test::More; | |
rule VALUES => sub { | |
diag explain +{ | |
'$_' => +{ |
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
use strict; | |
use warnings; | |
use Test::More; | |
sub detect_context { | |
my $is_wantarray; | |
return \$is_wantarray, sub { $is_wantarray = wantarray }; | |
} | |
subtest 'list context' => sub { |
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
function logicalConjunction (criteria) { | |
return criteria.reduce(function (f, g) { | |
return function () { return f.apply(this, arguments) && g.apply(this, arguments) }; | |
}); | |
} |
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
use strict; | |
use warnings; | |
use Test::More; | |
use HTML::TreeBuilder::Select; | |
my $HTML = <<EOF; | |
<header id="header"></header> | |
EOF | |
my $tree = HTML::TreeBuilder::Select->new; | |
$tree->parse_content($HTML); |
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 Data::Section::Simple qw( get_data_section ); | |
use HTML::TreeBuilder::Select; | |
use HTML::Selector::XPath qw( selector_to_xpath ); | |
use Test::More; | |
my $tree = HTML::TreeBuilder::Select->new(); |
OlderNewer