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 perl6 | |
# use Grammar::Tracer; | |
# use Grammar::Debugger; | |
grammar Offsides { | |
token TOP { | |
<tree>* | |
} |
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 perl6 | |
use Grammar::Tracer; | |
# use Grammar::Debugger; | |
grammar Offsides { | |
token TOP { | |
<tree>* | |
} |
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 perl6 | |
# Run with: perl6 --setting=RESTRICTED webrepl.p6 | |
use HTTP::Server::Tiny; | |
use URI::Encode; | |
use HTML::Entity; | |
use UUID; | |
sub parse-params($data) { |
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
------------- [List variables] --------------- | |
my vars: $_ $! @parent_vars $*DISPATCHER @my_vars RETURN $¢ $x $/ | |
caller vars: $y $_ $! $*DISPATCHER RETURN $¢ $x $/ | |
------------- [Eval Variable] --------------- | |
Local $x=5 | |
EVAL $x=5 |
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
awwaiid@misao:~/tmp/modtest$ cat -n MyModule.pm6 | |
1 module MyModule { | |
2 sub hello { | |
3 say "Hello!"; | |
4 } | |
5 } | |
6 | |
awwaiid@misao:~/tmp/modtest$ cat -n demo.p6 | |
1 #!/usr/bin/env perl6 | |
2 |
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/ruby | |
# Add this to your .vimrc; then highlight lines and do ",ga" | |
# vmap ,ga :<C-U>!git blame -v -L <C-R>=line("'<")<CR>,<C-R>=line("'>")<CR> -e % \| jirablame <CR> | |
require 'date' | |
commit = {} | |
ticket = {} |
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
class Matplotlib { | |
use Inline::Python; | |
has $!py; | |
submethod BUILD() { | |
$!py = Inline::Python.new(); | |
$!py.run('import matplotlib.pyplot') | |
} |
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
Email [email protected] with any questions! | |
ACT (server for our conference website) is having some issues (the YAPC::NA site is down as well), which I've let them know about. In case it doesn't come up, here is some basic info: | |
Silver Spring Civic Building, registration @9am, first talk @10am | |
1 Veterans Pl Silver Spring, MD 20910 | |
https://www.google.com/maps/place/Silver+Spring+Civic+Center/@38.997376,-77.02455,15z/data=!4m2!3m1!1s0x0:0x85f73077e6b965fd | |
Saturday Opening | |
9:00 Registration |
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 perl6 | |
use v6; | |
use File::Find; | |
# This is the mapping we use to play a file | |
my @play_commands = | |
/\.ogg$/ => 'ogg123', | |
/\.mp3$/ => 'mpg123', | |
/\.m4a$/ => 'mplayer', |
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
my $in_break = False; | |
signal(Signal::SIGINT).tap: { | |
exit if $in_break; | |
$in_break = True; | |
say "Going to next song..."; | |
sleep 5; # Give them a chance to interrupt again | |
$in_break = False; | |
} |