Skip to content

Instantly share code, notes, and snippets.

View autarch's full-sized avatar

Dave Rolsky autarch

View GitHub Profile
use strict;
use warnings;
use v5.16;
use Test::More;
my @ints = ( 1 .. 2**20 );
my @packed = map { pack 'N', $_ } @ints;
use strict;
use warnings;
use v5.16;
use Graph::Directed;
my $g = Graph::Directed->new();
$g->add_edge( A => 'B' );
$g->add_edge( B => 'D' );
while ( my $client = $socket->accept ) {
run_app($client);
}
sub run_app {
my $client = shift;
generate_response(...);
}
my $mtime = ( stat $exists1 )[9];
ok(
!$step1->is_up_to_date_since( $mtime ),
q{step 1 is older than a file that exists when the step hasn't been run yet}
);
-------------------
ok(
const Main = imports.ui.main;
let popup;
function init() {
popup = Main.wm._showWorkspaceSwitcher;
}
function enable() {
Main.wm._showWorkspaceSwitcher = function(a, b, c) {};
const windowManager = imports.ui.windowManager;
let popup;
function init() {
popup = windowManager.WindowManager.prototype['_showWorkspaceSwitcher'];
}
function enable() {
windowManager.WindowManager.prototype['_showWorkspaceSwitcher'] = function(a,b,c){return 42};
2014/05/15 15:58:38 INFO - jmeter.gui.action.Load: Loading file: /home/autarch/work/mm_website/load-tester/jmx/FromRecording.jmx
2014/05/15 15:58:38 INFO - jmeter.services.FileServer: Set new base='/home/autarch/work/mm_website/load-tester/jmx'
2014/05/15 15:58:38 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: kg.apc.jmeter.modifiers.RawRequestSourcePreProcessor : kg.apc.jmeter.modifiers.RawRequestSourcePreProcessor
---- Debugging information ----
message : kg.apc.jmeter.modifiers.RawRequestSourcePreProcessor
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : kg.apc.jmeter.modifiers.RawRequestSourcePreProcessor
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.converters.HashTreeConverter
use v5.14;
use strict;
use warnings;
use utf8;
use Encode qw( encode is_utf8 );
my $bytes = join q{}, map { chr($_) } 240, 159, 152, 184;
say $bytes;
use v5.14;
use strict;
use warnings;
use utf8;
use Encode qw( decode encode is_utf8 );
my $bytes = join q{}, map { chr($_) } 240, 159, 152, 184;
say $bytes;
@autarch
autarch / podtogo.pl
Last active August 29, 2015 14:05 — forked from tsibley/podtogo.pl
#!/usr/bin/env plackup
use strict;
use warnings;
use utf8;
use HTML::Restrict;
use Plack::Builder;
use Plack::App::Directory;
use lib::remote 'MetaCPAN::Pod::XHTML' =>