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 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": {
View gist:2658303
#! /usr/bin/env perl
use Test::More;
plan tests => 2;
ok (1, "affe");
ok (1, "zomtec");
@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");
@renormalist
renormalist / gist:2416828
Created Apr 18, 2012
Use dpath to filter metacpan query results
View gist:2416828
curl -s -XPOST http://api.metacpan.org/release/_search -d'{ "query": { "match_all": {} }, "size": 999, "fields": ["download_url"], "filter": { "term": { "distribution": "MooseX-NonMoose" } } }' | dpath -i json -o flat '//download_url'
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 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 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;
}
@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 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
You can’t perform that action at this time.