Skip to content

Instantly share code, notes, and snippets.

View rjbs's full-sized avatar
🤝
here to help

Ricardo Signes rjbs

🤝
here to help
View GitHub Profile
2009-01 0 6 0 [ 913] ()
2009-02 5 3 0 [ 714] ()
2009-03 0 6 0 [ 812] ()
2009-04 1 0 0 [ 606] ()
2009-05 3 8 0 [ 809] ()
2009-06 4 0 0 [ 1126] ()
2009-07 10 4 0 [ 1367] ()
2009-08 14 6 0 [ 1183] ()
2009-09 9 0 0 [ 790] ()
2009-10 107 5 0 [ 1628] (jesse)
my $client = Fastmail::Client->....;
my $mbox_res = $client->request([
[ 'Mailbox/get', { accountId => ... } ],
]);
# Get all the mailbox objects:
my @boxes = $mbox_res->single_sentence('Mailbox/get')->arguments->{list}->@*;

Perl Rules of Governance

Preamble

We are forming a system of governance for development of the Perl programming language.

The scope of governance includes the language definition, its implementation, its test suite, its documentation, and the policies and procedures by which it is developed and maintained.

#!/usr/bin/env perl
use strict;
use 5.10.1;
use autodie;
use JSON::PP;
use Tie::IxHash;
open my $fh, '<', ($ARGV[0] || '.git/index');
-i=2 # standard indent
-ce # cuddly elses
-pt=2 # parentheses should be tight
-nsfs # no space before "for" loop semicolon
-nolq # don't outdent long quotes
-b # edit file in place, leave .bak file
-nola # don't outdent labels
-msc=1 # two spaces for post-line comments (not 4)
-bom # keep old breaks before method calls
use v5.20.0;
use Term::ReadKey ();
sub terminal_bg_info {
syswrite *STDOUT, "\e]11;?\007";
# Example response:
# ^[]11;rgb:00/00/00^G^[]11;rgb:00/00/00^G
#
use v5.20.0;
use warnings;
use IO::Async;
use IO::Async::Timer::Periodic;
use Tickit::Async;
use Tickit::Widget::Static;
use Tickit::Widget::GridBox;
use List::MoreUtils qw(natatime);
@rjbs
rjbs / gitconfig.ini
Created July 19, 2012 21:43
my git aliases
[alias]
ci = commit -a
cl = clean -dfx
cc = cherry-pick
ff = merge --ff-only
fx = commit -a --amend -C HEAD
ix = diff --cached
st = status -sb
fap = fetch --all --prune
hist = log --all --graph --color=always --pretty='[%C(cyan)%h%Creset]%C(bold cyan)%d%Creset %s'
@rjbs
rjbs / lc
Last active March 8, 2020 04:13
use v5.20.0;
package CliM8::LoopControl::Continue {
use Moo;
sub throw { die $_[0]; }
no Moo;
}
package CliM8::LoopControl::Pop {
use Moo;
#!perl
use 5.20.0;
use charnames ();
use Unicode::UCD 'prop_invlist';
use List::MoreUtils 'natatime';
my $iter = natatime 2, prop_invlist('Cased');
sub cn {