Skip to content

Instantly share code, notes, and snippets.

Steffen Schwigon renormalist

Block or report user

Report or block renormalist

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View deep-recursion.pl
#! /usr/bin/env perl
use 5.022;
use strict;
use warnings;
use Mojolicious::Lite;
use Time::HiRes 'usleep';
# global, used in event subs, is that ok?
@renormalist
renormalist / mojo-pg-insert-linear.pl
Created Jun 24, 2019
Mojo::Pg - linear insert speed
View mojo-pg-insert-linear.pl
#! /usr/bin/env perl
# Mojolicious 8.17
# PostgreSQL 9.5.14
use 5.022;
use Mojo::Pg;
use Benchmark ':all';
my $id;
View mojo-pg-insert-issue.pl
#! /usr/bin/env perl
# Mojolicious 8.17
# PostgreSQL 9.5.14
use 5.022;
use Mojo::Pg;
use UUID;
# as seen in https://metacpan.org/pod/Mojo::Pg
@renormalist
renormalist / create_table.sql
Created Jun 24, 2019
postgresql create table
View create_table.sql
CREATE TABLE tap_dom (
tap_dom_id BIGSERIAL PRIMARY KEY,
uuid UUID NOT NULL,
created TIMESTAMPTZ NOT NULL DEFAULT NOW(),
dom JSONB
);
View gist:f26df587188460bc5b7f4c4d9f82367a
for @els -> $t {
my $f = False;
given $t.WHAT {
when Perl6::String::Interpolation { print "INTERPOLATION"; $f=True}
when Perl6::Bareword { print "BAREWORD"; $f=True }
}
say " ({$t.content})" if $f;
}
View server.properties
#Properties Config file
#Thu May 26 19:50:15 CEST 2016
server-name=LANPARTY PE 1
server-port=19132
gamemode=0
max-players=50
spawn-protection=16
white-list=off
enable-query=on
enable-rcon=on
View pm-release.json
{
"version": "1.6",
"api_version": "2.0.0",
"build": 25,
"date": 1463785622,
"details_url": "https://github.com/PocketMine/PocketMine-MP",
"myversion" : "0.14.0",
"download_url": "https://dl.bintray.com/pocketmine/PocketMine/PocketMine-MP_1.6dev-23_6ba0abf5_API-2.0.0.phar"
}
View metacpan API and DPath
# Approaching the metacpan API with DPath:
# example from https://github.com/CPAN-API/cpan-api/wiki/API-docs extended:
curl -s -XPOST http://api.metacpan.org/v0/author/SCHWIGON?join=release -d '
{
"query": {
"bool": {
"should": [{
"term": {
@renormalist
renormalist / gist:2658305
Created May 11, 2012
I'm in your Gist. Well, not - I'm in mine.
View gist:2658305
#! /usr/bin/env perl
use Test::More;
plan tests => 2;
ok (1, "affe");
ok (1, "zomtec");
View gist:2658303
#! /usr/bin/env perl
use Test::More;
plan tests => 2;
ok (1, "affe");
ok (1, "zomtec");
You can’t perform that action at this time.