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 5.014; | |
use strict; | |
use warnings; | |
use Carp; | |
use Encode; | |
use Furl; | |
use Web::Scraper; | |
use YAML::Any; |
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 5.014; | |
use warnings; | |
use opts; | |
use HTML::TreeBuilder; | |
use HTML::TreeBuilder::XPath; | |
use Pod::Usage; | |
opts my $help => +{ isa => 'Bool', default => 0 }, |
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 v6; | |
sub mapBetween(@list, &fn) { | |
sub infix:<op>($a, $b) { &fn($a, $b) }; | |
@list <<op<< @list[1..*]; | |
} | |
say mapBetween([1..5], &[+]); # 3 5 7 9 |
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 5.014; | |
use strict; | |
use warnings; | |
use opts; | |
use Encode; | |
use File::HomeDir; | |
use Path::Class; | |
use Storable qw/dclone/; |
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 Regexp::Optimizer; | |
=for comment | |
Output: |
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
Rate empty_assign array anon_array grep alias | |
empty_assign 7.68/s -- -2% -10% -17% -39% | |
array 7.84/s 2% -- -9% -15% -37% | |
anon_array 8.57/s 12% 9% -- -7% -31% | |
grep 9.21/s 20% 18% 8% -- -26% | |
alias 12.5/s 63% 60% 46% 36% -- |
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 main | |
import ( | |
"bufio" | |
"errors" | |
"fmt" | |
"io" | |
"log" | |
"math/rand" | |
"os" |
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 Curses; | |
use Getopt::Long; | |
use POSIX; | |
use Time::HiRes qw/usleep/; |
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
diff --git a/lib/AnyEvent/Groonga.pm b/lib/AnyEvent/Groonga.pm | |
index 6d57c95..d068b64 100644 | |
--- a/lib/AnyEvent/Groonga.pm | |
+++ b/lib/AnyEvent/Groonga.pm | |
@@ -127,7 +127,7 @@ sub _post_to_http_server { | |
my $json = shift; | |
my $result; | |
try { | |
- my $data = JSON->new->utf8(0)->decode($json); | |
+ my $data = JSON->new->utf8->decode($json); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<script> | |
var status = "LOADING"; | |
var connectedSock; | |
document.onreadystatechange = function() { | |
if (document.readyState != 'complete') { return; } |
OlderNewer