Skip to content

Instantly share code, notes, and snippets.

Avatar

Solomon Foster colomon

View GitHub Profile
View gist:0514cef59a74ce65ab2376e0a0a8faaa
/Users/colomon/tools/rakudo-moar-2022.04-01-macos-arm64-clang/bin/rakudo -MMONKEY-SEE-NO-EVAL -e exit((require ::(q|Distribution::Builder::MakeFromJSON|)).new(:meta(EVAL($*IN.slurp(:close)))).build(q|/Users/colomon/.zef/tmp/Inline%3A%3APerl5%3Aver%3C0.59%3E%3Aauth%3Ccpan%3ANINE%3E.tar.gz/Inline-Perl5-0.59|)??0!!1)
/Users/colomon/tools/rakudo-moar-2022.04-01-macos-arm64-clang/bin/rakudo -MMONKEY-SEE-NO-EVAL -e exit((require ::(q|Distribution::Builder::MakeFromJSON|)).new(:meta(EVAL($*IN.slurp(:close)))).build(q|/Users/colomon/.zef/tmp/Inline%3A%3APerl5%3Aver%3C0.59%3E%3Aauth%3Ccpan%3ANINE%3E.tar.gz/Inline-Perl5-0.59|)??0--verbose)
zsh: bad pattern: exit((require ::(q|Distribution::Builder::MakeFromJSON|)).new(:meta(EVAL(IN.slurp(:close)))).build(q|/Users/colomon/.zef/tmp/Inline%3A%3APerl5%3Aver%3C0.59%3E%3Aauth%3Ccpan%3ANINE%3E.tar.gz/Inline-Perl5-0.59|)??0--verbose)
View gist:1588c66596f21cfb7d827583ab135fdf
my %a = a => [1, 2, 3];
my %b = a => [4, 5, 6], b => [7, 8, 9];
%a.append(%b);
say %a;
%b<a>.push: 100;
%b<b>.push: 200;
say %a;
View example.ly
\version "2.19.83"
#(set-default-paper-size "letter")
\paper { print-all-headers = ##t }
\score {
{
\key a \major
\accidentalStyle modern-cautionary
\clef treble\time 6/8 \repeat volta 2 {
\partial 8*1 fis''8 \bar "|"
e''8 cis''8 e''8 a''8 gis''8 fis''8 \bar "|"
View example.raku
use v6;
multi sub MAIN(*@files) {
say "Standard version";
}
multi sub MAIN($file, :$split) {
say "Split version";
}
View gist:b7ff06855ec14b8804d6da7729b47753
Revision-number: 197
Prop-content-length: 141
Content-length: 141
K 10
svn:author
V 7
colomon
K 8
svn:date
View dollar-words.raku
sub value($word) {
[+] $word.lc.comb.map({ $_.ord - "a".ord + 1 });
}
my @words = "/usr/share/dict/words".IO.lines;
for @words.grep({ value($_) == 100 }) -> $dollar-word {
say $dollar-word;
}
View gist:6f478933457288d0650ec655433aec12
> apt update
Get:1 https://its-pointless.github.io/files termux InRelease [9176 B]
Hit:2 https://termux.net stable InRelease
(etc)
View make-bundle.pl6
use v6;
my $files-file = "files.list";
my $zip-name = "for-abc-" ~ Date.new(now) ~ ".zip";
my $zip = Proc::Async.new(:w, 'zip', $zip-name, '-@');
my $promise = $zip.start;
for $files-file.IO.lines() -> $line {
await $zip.say: $line;
View scrape.pl6
use v6;
use LibCurl::Easy;
for $*IN.comb(/ <?after 'href="'> (<-["]>+ ['mp3' | 'pdf']) /) -> $url {
if $url ~~ m{ ^ 'http://www.buddhistbassoonquartet.org/' (.*) } {
my $filename = $0.subst('%20', '_', :global).IO;
my $dirname = $filename.dirname.IO;
unless $dirname.e {
$dirname.mkdir;
}
View gist:8a94ea329d8ad3bf511c4860ab6e5f87
perl6 --ll-exception wunderlist.pl one-time-tasks
Could not find python at line 0 in:
/home/colomon/.perl6
/home/colomon/.rakudobrew/moar-master/install/share/perl6/site
/home/colomon/.rakudobrew/moar-master/install/share/perl6/vendor
/home/colomon/.rakudobrew/moar-master/install/share/perl6
CompUnit::Repository::AbsolutePath<55231728>
CompUnit::Repository::NQP<31655776>
CompUnit::Repository::Perl5<31655816>
at SETTING::src/core/Exception.pm:57 (/home/colomon/.rakudobrew/moar-master/install/share/perl6/runtime/CORE.setting.moarvm:throw)