Skip to content

Instantly share code, notes, and snippets.

O<div class="container">^[jg>>GGo</div>^[
@Altreus
Altreus / gist:33f20665a3a4dd40d556a2cf595d447f
Last active May 10, 2018 16:01
wrap entire file in div
O<div class="container">^[j>GGo</div>^[
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'ragtag.vim'
Plugin 'tpope/vim-surround'
=head2 pod5
This is how you might describe a method called pod5
=cut
=begin pod
=head2 pod6
This is how you might describe a method called pod6
=end pod
role Frobber {
method frob ($x) { say $x }
}
role Frobnicator does Frobber {
has $.x;
multi method frob ($x) { self.Frobber::frob($x) }
multi method frob () { self.frob($.x) }
}
Buf:0x<1f 8b 08 00 00 00 00 00 00 03 15 ca 4d 0e c2 20 10 40 e1 ab 10 d6 2e 28 33 fc d4 33 b8 eb d2 b8 18 da 21 92 58 68 a0 c6 85 f1 ee c2 f6 7d ef fe 95 e5 93 b9 ca ab 88 f4 6a 7c 11 f2 e0 ba a7 d6 52 c9 ad d7 49 21 80 06 03 5d d2 5a 72 4f d2 79 4d c8 06 37 ed 43 b0 08 01 66 62 85 14 d7 e8 58 19 94 e3 dd ...>
> my @role-ids = 537710338498363393;
[537710338498363393]
> say 537710338498363393 ~~ @role-ids;
False
> say @role-ids ~~ 537710338498363393;
False
> say @role-ids ~~ "537710338498363393";
True
> say "537710338498363393" ~~ @role-ids;
False
===> Testing: Red:ver<0.0.3>:auth<Fernando Correa de Oliveira>:api<1>
t/00-meta.t ........................ ok
t/01-basic.t ....................... ok
t/02-tdd.t ......................... No subtests run
t/03-sqlite.t ...................... No subtests run
t/04-blog.t ........................ No subtests run
t/05-ticket.t ...................... No subtests run
t/06-better-map.t .................. No subtests run
t/07-optimizer.t ................... No subtests run
t/08-best-tree.t ................... No subtests run
@Altreus
Altreus / flexibase.md
Last active August 2, 2019 17:04
Flexibase RFC

Flexibase

Synopsis

Service-oriented architecture is a scheme by which a system is built out of separate, encapsulated components that communicate as services.

This mirrors the concept of microservices, except where microservices communicate between processes, and often between hosts, SOA services can be installed in-process.

method from-json (%json) {
my %constructor = %json<id name icon splash>:kv;
%constructor<is-owner> = %json<owner>;
%constructor<roles> = %(
%json<roles><>.map: { $_<id> => Role.from-json($_) }
);
dd %constructor;