Skip to content

Instantly share code, notes, and snippets.

View smother.pgn
[Event "Rated Bullet game"]
[Site "https://lichess.org/lMfUWjwH"]
[Date "2019.01.18"]
[Round "-"]
[White "akxonil"]
[Black "makokha"]
[Result "0-1"]
[UTCDate "2019.01.18"]
[UTCTime "00:52:58"]
[WhiteElo "1568"]
View ICal.pm6
grammar ical {
rule TOP {
<vcalendar>
}
rule vcalendar {
<section>
\n?
}
# section does not end with a NL
rule section {
View pxdoc
!/usr/bin/env perl6
# pxdoc
# requires: curl, lynx (or other browser), JSON::Fast
# See: https://www.reddit.com/r/perl6/comments/9h0xy6/pxdoc_quick_hack_for_command_line_docs/
use JSON::Fast;
#| Search for Perl 6 documentation and load it in a browser.
sub MAIN (
@bduggan
bduggan / pd.p6
Created Sep 17, 2018
quick p6 doc
View pd.p6
#!/usr/bin/env perl6
use JSON::Fast;
sub MAIN($term) {
my $got = %*ENV<HOME>.IO.child('.p6index.json') or do
shell 'curl https://docs.perl6.org/js/search.js?v=3 > ~/.p6index.json';
my $js = $got.slurp.subst( /^ .* 'var items ='/, '' )
.subst(/';'\s* 'var results =' .* $/, '' )
.subst('category:','"category":',:g)
View tailgrep-simple.p6
#!/usr/bin/env perl6
sub spinner() {
<\ - | - / ->[$++ % 6]
}
sub MAIN($expr, $filename) {
shell "tput 'civis'";
my $proc = Proc::Async.new:
<<tail -f $filename>>;
View tailgrep.p6
#!/usr/bin/env perl6
use JSON::Fast;
use Terminal::ANSIColor;
my @frames = < / - | - \ - >;
sub spinner {
@frames[$++ % +@frames];
}
sub download-spinners {
View profile-1531410055.781473.html
<!DOCTYPE html>
<html lang="en" ng-app="moarProfApp" ng-controller="NavigationController">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MoarVM Profiler Results</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<style>
View profile-1531409847.1478279.html
<!DOCTYPE html>
<html lang="en" ng-app="moarProfApp" ng-controller="NavigationController">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MoarVM Profiler Results</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<style>
View bug.p6
use nqp;
# see https://rt.perl.org/Public/Bug/Display.html?id=131530
# search for add_categorical in src/Perl6/Grammar.nqp
my $compiler = nqp::getcomp("perl6");
my $outer_ctx;
my $*MAIN_CTX;
sub reval($code) {
my $*CTXSAVE = class {
View Makefile
module := RDF-Turtle
version := $(shell jq -r .version META6.json)
test:
TEST_AUTHOR=1 prove -e'perl6 -Ilib' t/*
dist:
echo "Making $(version)"
git archive --prefix=$(module)-$(version)/ -o $(module)-$(version).tar.gz $(version)
You can’t perform that action at this time.