Skip to content

Instantly share code, notes, and snippets.

View akarelas's full-sized avatar

Alexander Karelas akarelas

View GitHub Profile
@akarelas
akarelas / sub.pl
Created February 13, 2018 04:13
Shouldn't this run?
#!/usr/bin/env perl
use v5.26;
use warnings;
use lib 'local/lib/perl5';
use experimentals;
sub show (\@alex) {
say foreach @alex;
@akarelas
akarelas / bug
Created February 10, 2018 14:48
.
@akarelas
akarelas / lxc_info.txt
Created January 2, 2018 04:50
lxc info output, for my server, for the lxd bug
- container_stop_priority
- container_syscall_filtering
- auth_pki
- container_last_used_at
- etag
- patch
- usb_devices
- https_allowed_credentials
- image_compression_algorithm
- directory_manipulation
@akarelas
akarelas / tictactoe.pl
Last active November 18, 2017 08:34
Tic-Tac-Toe in Perl - Play against the computer and never win
#!/usr/bin/env perl
use v5.20;
use warnings;
use lib 'local/lib/perl5';
use List::Util qw/ max all /;
use List::MoreUtils 'indexes';
use experimental 'signatures';
@akarelas
akarelas / c10k.pl
Created October 31, 2013 16:14 — forked from kraih/c10k.pl
#
# Open 10k concurrent WebSocket connections with the client and server running
# in the same process and perform 10k WebSocket message roundtrips
#
# Tested on OS X 10.8.3 (MacBook Air) with Perl 5.16.3 and EV 4.15 (kqueue)
#
# 632.3MB memory usage, 0% CPU usage once roundtrips are finished after 36s
# (with all 20k sockets still open)
#
# Get the latest version of Mojolicious from http://github.com/kraih/mojo