Skip to content

Instantly share code, notes, and snippets.

@Tekki
Tekki / mojo-vue.pl
Last active April 26, 2021 16:24
Mojolicious - Vue.js Example
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;
get '/' => sub ($c) {
$c->render(template => 'index');
};
get '/api/:region' => sub ($c) {
my %regions = (
@Tekki
Tekki / speedtest.p6
Created November 18, 2018 10:34
Perl 6 Speedtest
#!/usr/bin/env perl6
class Point {
has $.x;
has $.y;
}
my $total = 0;
for ^100_000_000 {
my $p = Point.new(x => 2, y => 3);
$total = $total + $p.x + $p.y;
}
@Tekki
Tekki / speedtest.pl
Created November 18, 2018 10:40
Perl 5 Speedtest
#!/usr/bin/env perl
use v5.10;
package Point;
sub new {
my ($class, %args) = @_;
bless \%args, $class;
}
@Tekki
Tekki / cobol-copybooks.el
Last active September 21, 2024 07:09
COBOL copybooks in Emacs
;;; experiment with COBOL copybooks in Emacs
;; On a line with a COPY command, call `cobol/show-copybook' or
;; `cobol/hide-copybook'.
;;
;; To show or hide all copybooks in the buffer, use
;; `cobol/show-all-copybooks' and `cobol/hide-all-copybooks'.
;;
;; If the copybooks are located in a different folder, set variable
;; `cobol/copybook-directory'.