Skip to content

Instantly share code, notes, and snippets.

#!perl
#BEGIN { $ENV{IO_LAMBDA_DEBUG} = 'http=2' }
use strict;
use warnings;
package main;
use IO::Socket::INET;
use IO::Lambda v1.33 ':all';
use IO::Lambda::HTTP::Client qw(http_request);
use IO::Lambda::HTTP::Server;
@dk
dk / eboks_shares
Last active August 30, 2019 18:48
#!env perl
use strict;
use warnings;
use Net::Eboks;
use Getopt::Long;
my %opt = (
cpr => '',
activation => '',
pincode => '',
@dk
dk / cygwin-llvm.cpp
Last active August 9, 2017 15:49
cygwin gl error
/* Created by exoticorn ( http://talk.maemo.org/showthread.php?t=37356 )
* edited and commented by Andre Bergner [endboss]
*
* libraries needed: libx11-dev, libgles2-dev
*
* compile with: g++ cygwin-llvm.cpp -lX11 -lEGL -lGLESv2
*/
#include <iostream>
#include <cstdlib>
use strict;
use warnings;
use Prima::PS::Printer;
my $a = Prima::PS::File->create( file => 'a.ps');
$a->begin_doc;
$a->linePattern(lp::DashDotDot);
$a->lineWidth(6);
$a->color(cl::LightGreen);
$a->bar(0,0,455,455);
@dk
dk / 1
Created July 15, 2014 10:58
diff --git a/examples/analog_clock.pl b/examples/analog_clock.pl
index 9a9ef17..b40da48 100644
--- a/examples/analog_clock.pl
+++ b/examples/analog_clock.pl
@@ -85,23 +85,24 @@ my($width, $height);
my $w = Prima::MainWindow->new(
text => 'Analog clock',
size => [300,300],
+ buffered => 1,
onPaint => sub {
@dk
dk / parallel.pl
Created March 12, 2012 13:21
parallel http io::lambda
#!/usr/bin/perl
use strict;
use warnings;
use lib qw(./lib);
use HTTP::Request;
use IO::Lambda qw(:lambda);
use IO::Lambda::HTTP qw(http_request);
use Time::HiRes qw(time);
my @urls = (