Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl
use strict;
use warnings;
use LWP::UserAgent;
use URI;
use HTTP::Request::Common;
my $ua = LWP::UserAgent->new;
my $uri = URI->new( "https://api.twitter.com/1/account/verify_credentials.json" );
package Net::GlobalIP;
use strict;
use warnings;
use STUN::Client;
use base qw/Exporter/;
our @EXPORT = qw/globalip/;
our $STUN_SERVER;
sub globalip {
use Test::More;
use strict;
use warnings;
use Test::TCP qw/empty_port wait_port/;
use Plack::Runner;
use Proc::Guard;
use AE;
use AnyEvent::HTTP;
use Tatsumaki::Application;
use Tatsumaki::Handler;
#!/usr/bin/env perl
use strict;
use warnings;
use Geo::Hash::XS;
use Geo::Distance::XS;
my $gh = Geo::Hash::XS->new;
my $gd = Geo::Distance->new;
for my $precision (1..10) {
#!/usr/bin/env perl
use strict;
use warnings;
use Benchmark qw/:all/;
use Math::Random::MT::Perl;
use Math::Random::MT;
cmpthese( 0, {
rand_mt => sub {
Math::Random::MT::rand(1);
#!/usr/bin/env perl
use strict;
use warnings;
use File::Find;
use Path::Class;
use Term::Prompt;
my $dir = $ARGV[0]
or die "removes \"file 1.mp3\" if \"file.mp3\" exists\nusage: $0 path/to/dir\n";
#!/bin/sh
exec setuidgid mash multilog t \
s16777215 n100 . \
s16777215 n100 -'*' +'*[error]*' ./errors
diff --git a/t/plugin_i18n.t b/t/plugin_i18n.t
index 1bbe98a..8bf8f2a 100644
--- a/t/plugin_i18n.t
+++ b/t/plugin_i18n.t
@@ -17,9 +17,10 @@ use Ark::Test 'TestApp';
$request->header( 'Accept-Language' => 'fr' );
- ok( my $response = request($request), 'Request' );
+ ok( my ($response, $c) = ctx_request($request), 'Request' );
#!/usr/bin/env perl
use strict;
use warnings;
use WWW::Mechanize::Firefox;
die "usage: $0 <url> <filename>"
unless scalar @ARGV == 2;
my ($url, $file) = @ARGV;
package org.libspark.flartoolkit.example {
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.PixelSnapping;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.media.Camera;