Skip to content

Instantly share code, notes, and snippets.

View zoffixznet's full-sized avatar
💭
😂

Zoffix Znet zoffixznet

💭
😂
View GitHub Profile
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;
#!/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;
#!/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 July 13, 2018 12:17 — forked from Whateverable/query
greppable6
if[^{]+(?<!\!)=(?!=)[^{]+\{
<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 October 5, 2017 19:40
Bump Rakudo's NQP/MoarVM versions
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 ../ &&
# 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
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 April 19, 2017 22:38
Rakudo REPL OSX History File Fix
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>
@zoffixznet
zoffixznet / IO-kills.md
Last active April 14, 2017 22:01
IO-kills.md