This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| foo => 1, | |
| plugins => [ | |
| {'HypnotoadRestarter' => {}}, | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use App::cpm::CLI; | |
| use File::Spec; | |
| use Carton::CPANfile; | |
| use Carton::Snapshot; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select '1..1'; | |
| select 'ok 1' where 1=1; | |
| -- run with: prove -e 'psql -At -f' test.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: demo | |
| labels: | |
| app: demo | |
| spec: | |
| replicas: 1 | |
| selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Dancer2; | |
| set views => '.'; | |
| any '/' => sub { | |
| template 'welcome'; | |
| }; | |
| any '/toyshop' => sub { | |
| template 'toyshop'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Mojolicious::Lite; | |
| use Mojo::JWT; | |
| use Mojo::URL; | |
| use Mojo::UserAgent; | |
| my $ua = Mojo::UserAgent->new; | |
| my $keycloak = $ua->get('https://keycloak.jberger.pl/auth/realms/master/.well-known/openid-configuration')->result->json; | |
| my $jwkset = $ua->get($keycloak->{jwks_uri})->result->json; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my $x = { | |
| a => 1, | |
| b => 2, | |
| }; | |
| $x->{ref}{a} = $x->{a}; | |
| $x; # this must be last |