Skip to content

Instantly share code, notes, and snippets.

View kberov's full-sized avatar
🐢
I may be slow to respond.

Красимир Беров kberov

🐢
I may be slow to respond.
View GitHub Profile
@Grinnz
Grinnz / perl7faq.md
Last active November 28, 2023 03:19
Perl 7 FAQ

Perl 7 FAQ

last updated 2022-05-26

Is Perl 7 coming?

It is the current plan that this version number will be used for Perl at some point in the future.

When is Perl 7 coming?

@Ovid
Ovid / cor.md
Last active September 12, 2021 08:02
Cor—A minimal object system for the Perl core

NAME

Cor — A minimal OO proposal for the Perl core

VERSION

This is version 0.10 of this document.

AUTHOR

@edubart
edubart / nimbenchmark.md
Last active August 18, 2021 13:55
Nim/Node benchmarks

Environment:

  • Ubuntu 16.04 LTS
  • Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
  • Nim Compiler Version 0.14.3 (2016-06-17) [Linux: amd64]
  • node v5.10.1

Nim code:

import asynchttpserver, asyncdispatch
use Mojolicious::Lite;
use DBM::Deep;
use Mojo::JWT;
plugin 'Bcrypt';
plugin 'Minion' => {SQLite => 'minion.db'};
helper users => sub { state $db = DBM::Deep->new('users.db') };
@tuxfight3r
tuxfight3r / vim-shortcuts.md
Last active May 3, 2024 05:11
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@dex4er
dex4er / mojo-app.pl
Last active February 12, 2019 11:53
Mojolicious + PAR::Packer without --addfile
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
use Mojolicious::Lite;
# Explicit use as a helper for PAR
#!/bin/sh
die () {
msg="$1\n"
shift
printf "$msg" "$@" 1>&2
exit 1
}
use=`
@jberger
jberger / player.pl
Last active August 29, 2015 14:06
First cut at a streaming audio player using Mojolicious
#!/usr/bin/env perl
use Mojolicious::Lite;
use experimental qw'signatures postderef';
use Cwd;
app->attr( 'music_root' => sub { return $ENV{MUSIC_ROOT} || Cwd::cwd() } );
push app->static->paths->@*, app->music_root;
@jberger
jberger / websocket.pl
Last active August 29, 2015 14:05
Updated WebSocket DBI Example
#!/usr/bin/env perl
use Mojolicious::Lite;
use DBIx::Connector;
my $dbname = $ENV{MOJO_DBNAME} || 'database.db';
# add helper methods for interacting with database
helper connector => sub {
state $db = DBIx::Connector->new("dbi:SQLite:$dbname","","") or die "Could not connect";
use 5.20.0;
use feature qw(postderef signatures);
use Mojolicious::Lite;
use PadWalker 'peek_sub';
hook around_action => sub ($next, $c, $action, @) {
my @params = sort grep {s/^\$param_//} keys peek_sub($action)->%*;
return $c->$action($c->param(\@params));
};