Skip to content

Instantly share code, notes, and snippets.

Brock Wilcox awwaiid

Block or report user

Report or block awwaiid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View roman-mark-output.txt
ok 1 - Simple 1 works
ok 2 - Real simple 2 works
not ok 3 - We have prepended values!
# Failed test 'We have prepended values!'
# at roman-mark.pl line 35.
# got: 'IIII'
# expected: 'IV'
ok 4 - We have Vs
ok 5 - seventeen and stuff
not ok 6 - nineteen and stuff
View output.txt
awwaiid@misao:~/dcpm$ perl randori-2010301-roman.pl
shift on reference is experimental at randori-2010301-roman.pl line 25.
shift on reference is experimental at randori-2010301-roman.pl line 68.
ok 1 - Simple 1 works
ok 2 - Real simple 2 works
ok 3 - We have prepended values!
ok 4 - We have Vs
ok 5 - seventeen and stuff
ok 6 - nineteen and stuff
ok 7 - twenty and stuff
View colons.p6
# namespace
class A::B {
# "Smiley" type adverb Str:D
# Named param -- adverb with default True value
method say-hi(Array[Str:D] :$names) {
# precedence dropper
say $names.map: {"hi $_"};
}
}
View module_import.txt
awwaiid@misao:~/projects/perl6/lang/Inline-Ruby$ cat hiya.csv
id, name
1, andy
2, bella
3, chad
4, dua
awwaiid@misao:~/projects/perl6/lang/Inline-Ruby$ PERL6LIB=lib perl6
> use Inline::Ruby::Sweet
> ruby_require 'csv', ['CSV']
Requiring ruby module csv
View inline-ruby-sweet-session.txt
> use Inline::Ruby::Sweet;
> "require 'json'":rb
«true»:rb
> my $json = 'JSON.parse(File.read("/home/awwaiid/lag.json"))':rb ; 5
5
> $json.count
«36071»:rb
> $json[0]
«{"order_id"=>1173786, "marketplace_id"=>1, "order_placed"=>"2015-10-13T20:28:59-04:00", "order_created"=>"2015-10-13T20:28:59-04:00", "lag"=>0.382000207901001}»:rb
> $json[0]["marketpalce_id"]
View output.txt
$ ./universal-greetings.p6
Hello from the Perl Universe!!!
View numswap_toggle
#!/usr/bin/perl
use strict;
use IO::Handle;
STDOUT->autoflush();
STDERR->autoflush();
print "1\n";
my $is_swapped = `xmodmap -pke | grep 'keycode 10 = exclam'`;
@awwaiid
awwaiid / 01 hive.rb
Last active Dec 24, 2015
Everyone adds a line, one at a time!
View 01 hive.rb
#!/usr/bin/env ruby
if ARGV == ['who', 'is', 'this?']
puts "THIS IS SPARTA!!!"
end
puts (words = File.read('/usr/share/dict/words')).length
good_words = words.split.select {|w| w.size > 6}
puts good_words.sample(3).join(' ')
Thread.new{ STDERR.<< ", \n A PLAY IN 3 PARTS.\n\n============ PAGE " }
puts good_words.length
puts File.read(__FILE__).split.detect{|_| _ =~ /SPARTA/}
View -
01:17 < TEttinger> m: say "␤" for ^10
01:17 <+camelia> rakudo-moar 091ee7:
01:17 -!- Irssi:
01:17 -!- Irssi:
01:17 -!- Irssi:
01:17 -!- Irssi:
01:17 -!- Irssi:
01:17 -!- Irssi:
01:17 -!- Irssi:
01:17 -!- Irssi:
You can’t perform that action at this time.