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 std::path::Path; | |
use std::fs::ReadDir; | |
//#[derive(Debug)] | |
//#[allow(dead_code)] | |
struct Walk { | |
rds: Vec<ReadDir>, | |
} |
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 feature 'say'; | |
use Time::HiRes qw(sleep time stat); | |
{ | |
open(my $fh, '>', 'first.txt'); | |
close $fh; | |
} |
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
# this is planned to be a bit more generic than needed here | |
my $root = $*PROGRAM.absolute.IO.dirname; | |
if $root.IO.basename eq 'bin' { | |
$root = $root.IO.dirname; | |
} | |
my $files = Bailador::Route::StaticFile.new: directory => $root, path => /.*/; | |
get '/(.*)' => sub ($url) { | |
#return $root; | |
my $file = ($url eq '' ?? 'index' !! $url) ~ '.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
names = ["Foo", "Borg", "Earth"] | |
print(sorted(names)) | |
print(sorted(names,key=len)) | |
print(sorted(names, key=lambda x: x[1] )) | |
a = [ | |
["Joe", 23], | |
["Mary", 78], | |
["Steffan", 100], | |
] |
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
air:Perl6-Maven gabor$ ack ~~ | |
app.pl | |
70: if $file ~~ /\/$/ { | |
95: if $file ~~ /tutorial\/(.*)/ { | |
lib/Perl6/Maven/Page.pm6 | |
29: if $line ~~ m/^\=(\w+) \s+ (.*)/ { | |
84: if $row ~~ /^\<code (\s+ lang\=\".*\")? \>\s*$/ { | |
87: } elsif $row ~~ /\<\/code\>/ { | |
91: $row ~~ s:g/\</</; |
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 Data::Dumper qw(Dumper); | |
use HTTP::Tiny; | |
use JSON qw(to_json); | |
my $ua = HTTP::Tiny->new(); | |
my $query_json = to_json { | |
query => { | |
match_all => {}, |
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 Data::Dumper qw(Dumper); | |
use HTTP::Tiny; | |
use JSON qw(to_json); | |
my $ua = HTTP::Tiny->new(); | |
my $query_json = to_json { | |
query => { | |
match_all => {}, |
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
Can't stat modules/file-find/lib: No such file or directory | |
at tools/build/module-install.pl line 22. | |
Can't stat modules/shell-command/lib: No such file or directory | |
at tools/build/module-install.pl line 22. | |
Can't stat modules/perl6-psgi/lib: No such file or directory | |
at tools/build/module-install.pl line 22. | |
===SORRY!=== | |
Could not find Shell::Command in any of: /Users/gabor/work/rakudo-star-2013.10/install/lib/parrot/5.9.0/languages/perl6/lib, /Users/gabor/work/rakudo-star-2013.10/install/lib/parrot/5.9.0/languages/perl6/site/lib, /Users/gabor/work/rakudo-star-2013.10/install/lib/parrot/5.9.0/languages/perl6/vendor/lib, /Users/gabor/work/rakudo-star-2013.10/install/lib/parrot/5.9.0/languages/perl6/lib, /Users/gabor/.perl6/2013.10/lib | |
===SORRY!=== |
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 Test::More tests => 6; | |
use strict; | |
use warnings; | |
# the order is important | |
use Temp; | |
use Dancer2::Test apps => ['Temp']; | |
use YAML qw(LoadFile); | |
route_exists [GET => '/'], 'a route handler is defined for /'; |
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
GitPrep, the open source GitHub clone | |
When you want to run a GitHub-like system in-house, GitPrep written by Yuki Kimoto | |
can a good choice. | |
It is Open Source, [its source code](https://github.com/yuki-kimoto/gitprep) is on GitHub | |
and it is licensed under the Artistic license. | |
The [project home page](http://perlcodesample.sakura.ne.jp/gitprep-site/) includes a | |
screenshot, but you can also visit a project hosted on a |
NewerOlder