This file contains 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 lib 'lib'; | |
use POE qw(Component::EasyDBI); | |
use Data::Dumper; | |
POE::Session->create( |
This file contains 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 | |
# ABSTRACT: A simple message broker using Mojolicious WebSockets | |
# USAGE: ./pubsub.pl daemon | |
# | |
# This is my remix of Doug Bell's event broker. It publishes numbers | |
# on a topic, subscribes to that topic and appends the numbers to the | |
# document body. The original source can be found here: | |
# | |
# https://gist.github.com/preaction/2078d33d87b126621e45 | |
# |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 | |
# | |
# Generates pureftpd.config options in the conf/ directory for use | |
# with pure-ftpd-wrapper | |
# | |
use strict; | |
use warnings; | |
use Getopt::Long; |
This file contains 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 Capture::Tiny; | |
use File::Which; | |
use Getopt::Std; | |
use Path::Tiny; |
This file contains 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
set nocompatible | |
set backspace=2 | |
set autoindent noexpandtab softtabstop=-1 tabstop=4 shiftwidth=4 | |
set ruler | |
syntax on | |
colorscheme torte |
This file contains 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 Data::Dumper; | |
use Mojo::Log; | |
use Mojo::IOLoop; | |
use Mojo::IOLoop::Subprocess; |
This file contains 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
def sieve_sundaram(n : UInt64) | |
a = Hash(UInt64, Bool).new | |
s = Array(UInt64).new | |
m = (n/2.0).round | |
(1_u64..n).each do |i| | |
(i..n).each do |j| | |
p = i + j + 2_u64*i*j | |
if p <= n | |
a[p] = true | |
end |
This file contains 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 Benchmark; | |
use CBOR::XS (); | |
use Cpanel::JSON::XS (); | |
use Data::MessagePack; | |
use JSON::XS (); | |
use Sereal::Encoder; | |
use Sereal::Decoder; |
This file contains 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
import std.stdio; | |
import std.bigint; | |
import core.checkedint; | |
void main() { | |
writefln("%d", fib_iter(72)); | |
writefln("%d", fib_binet(72)); | |
} | |
auto fib_iter (int n) { |
NewerOlder