Skip to content

Instantly share code, notes, and snippets.

Avatar

Zoffix Znet zoffixznet

View GitHub Profile
View perl.pl
if ($fg) {
$foreground = ($bb ? 'bright_' : '') . $fg;
# use Acme::Dump::And::Dumper;
# warn DnD [ $foreground ];
if ($foreground =~ /^rgb/) {
# %RGB_MAP
my ($r, $g, $b) = $foreground =~ /(\d)(\d)(\d)/;
$r = 255*$r/5; $r = 255 if $r > 255; $r = 0 if $r < 0;
$g = 255*$g/5; $g = 255 if $g > 255; $g = 0 if $g < 0;
$b = 255*$b/5; $b = 255 if $b > 255; $b = 0 if $b < 0;
View ansi2irc.pl
#!/usr/bin/env perl
package Color::RGB::Util;
our $DATE = '2019-08-20'; # DATE
our $VERSION = '0.599'; # VERSION
use 5.010001;
use strict;
use warnings;
View perl.pl
#!/usr/bin/env perl
#!/usr/bin/env perl
# vim: set ts=2 sts=2 sw=2 expandtab smarttab:
#
# This file is part of Parse-ANSIColor-Tiny
#
# This software is copyright (c) 2011 by Randy Stauner.
#
# This is free software; you can redistribute it and/or modify it under
@zoffixznet
zoffixznet / query
Created Jul 13, 2018 — forked from Whateverable/query
greppable6
View query
if[^{]+(?<!\!)=(?!=)[^{]+\{
View gist:eb5f33295282296d1627f9c149f991d2
<VirtualHost *:80>
ErrorLog ${APACHE_LOG_DIR}/error.<REDACTED>.ca.log
ServerName <REDACTED>.ca
ServerAlias www.<REDACTED>.ca
<Proxy *>
Require all granted
</Proxy>
ProxyRequests Off
@zoffixznet
zoffixznet / sh.sh
Last active Oct 5, 2017
Bump Rakudo's NQP/MoarVM versions
View sh.sh
alias bump-it='rm -fr nqp &&
git clone https://github.com/perl6/nqp/ &&
cd nqp &&
git clone https://github.com/MoarVM/MoarVM/ &&
cd MoarVM &&
git describe > ../tools/build/MOAR_REVISION &&
cd ../ &&
git commit -m '\''Bump MoarVM'\'' tools/build/MOAR_REVISION &&
git describe > ../tools/build/NQP_REVISION &&
cd ../ &&
View p6.p6
# Just some setup for the files we'll be reading:
'file1'.IO.spurt: "a\nb\nc";
'file2'.IO.spurt: "d\ne\n";
'file3'.IO.spurt: "f";
my $line;
# CatHandle accepts any mix of Cool:D, IO::Path, IO::Handle, IO::Pipe:
my $kitty = IO::CatHandle.new: 'file1', 'file2'.IO, 'file3'.IO.open,
:on-switch{ $line = 1 }; # define what to do on handle switch
View gist:8a7649e454d0f2b73a1a5420338c2fe7
t/spec/S02-types/baghash.rakudo.moar (Wstat: 256 Tests: 265 Failed: 1)
Failed test: 250
Non-zero exit status: 1
t/spec/S02-types/mixhash.rakudo.moar (Wstat: 256 Tests: 236 Failed: 1)
Failed test: 219
Non-zero exit status: 1
t/spec/S06-signature/types.t (Wstat: 512 Tests: 18 Failed: 2)
Failed tests: 11-12
Non-zero exit status: 2
t/spec/S32-exceptions/misc.rakudo.moar (Wstat: 1536 Tests: 427 Failed: 6)
@zoffixznet
zoffixznet / bash.sh
Last active Apr 19, 2017
Rakudo REPL OSX History File Fix
View bash.sh
alias perl6repl='perl6 -e '\''
use nqp;
sub MAIN (*%adverbs) {
REPL.^mixin(
role {
has IO::Path $!history-file;
method history-file (--> Str:D) {
return $!history-file.absolute if $!history-file.defined;
$!history-file = $*ENV<RAKUDO_HIST>
View IO-kills.md
You can’t perform that action at this time.