Skip to content

Instantly share code, notes, and snippets.

View jberger's full-sized avatar

Joel Berger jberger

View GitHub Profile
@jberger
jberger / tpf_cat_statement.txt
Last active September 3, 2021 06:21
Proposed statement pausing the TPF CAT
When embarking on community moderation and when claiming the authority to mete out judgements, clear policy and procedure is
key to keep the moral authority to do so and to protect all of the parties involved.
Effective immediately, The Perl Foundation (TPF)'s Community Affairs Team (CAT) will not accept any incoming reports nor issue
any rulings until such time as:
a) a set of policies can be created to govern it
b) that policy is voted on and accepted by the TPF governing board
c) the policy, reporting procedure, and CAT board membership are clearly posted on the TPF's main website
Once this is done we hope to rebuild a sense of trust within the Perl Community and to act to keep it safe and welcoming.
export function Fetcher (options) {
if (options.base) this.base = options.base;
};
Fetcher.prototype.fetch = function(input, init) {
if (input instanceof Request) {
return window.fetch(input, init);
}
let url = this.base ? new URL(input, this.base) : new URL(input);
@jberger
jberger / method.pl
Created June 25, 2012 19:12
PDL::_data_printer
sub _data_printer {
my ($self, $props) = @_;
################################################
# Get Data, Build Structure #
# add new things as [ tag => data ] to @data #
################################################
my @data;
# type
use Mojo::Base -strict, -signatures;
use Mojo::UserAgent;
use Mojolicious;
my $mock = Mojolicious->new;
$mock->routes->any('/' => sub ($c) { $c->render(data => $c->req->body) });
my @content = (qw(this is a test));
use Mojo::Base -strict, -signatures;
use Mojo::UserAgent;
my @content = (qw(this is a test));
my $iterator = sub { shift @content };
# Build a normal transaction
my $ua = Mojo::UserAgent->new;
my $tx = $ua->build_tx(GET => 'http://example.com');
@jberger
jberger / base.js
Last active February 18, 2021 16:10
const Koa = require('koa');
const Router = require('@koa/router');
class Controller {
constructor(app, ctx) {
this.app = app;
this.ctx = ctx;
}
get req () { return this.ctx.request }
{
foo => 1,
plugins => [
{'HypnotoadRestarter' => {}},
]
}
cpanm (App::cpanminus) 1.7044 on perl 5.032000 built for darwin-2level
Work directory is /Users/joel/.cpanm/work/1613232918.271
You have make /usr/bin/make
You have /usr/local/bin/wget
You have /usr/bin/tar: bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6
You have /usr/bin/unzip
Entering /Users/joel/Programs/Sites/mojolicious.io
Checking if you have Syntax::Highlight::Engine::Kate 0 ... Yes (0.14)
Checking if you have Statocles 0.093 ... No
Searching Statocles (0.093) on cpanmetadb ...
#!/usr/bin/env perl
use strict;
use warnings;
use App::cpm::CLI;
use File::Spec;
use Carton::CPANfile;
use Carton::Snapshot;

SCN-App-Distify

A perl distribution builder for ServerCentral perl projects.

To build a module named SCN-Module-Foo ...

cd SCN-Module-Foo
distify SCN-Module-Foo