Skip to content

Instantly share code, notes, and snippets.

View horgh's full-sized avatar

William Storey horgh

View GitHub Profile
@horgh
horgh / test-ipc-run-child.pl
Created March 27, 2018 03:07
IPC::Run PR#99 test code
#!/usr/bin/env perl
use strict;
use warnings;
use IO::Handle ();
my $fh = IO::Handle->new_from_fd(3, '+<') or die "new_from_fd(): $!";
$fh->autoflush(1);
@horgh
horgh / net-amqp-rabbitmq.pl
Created July 3, 2017 18:42
Net::AMQP::RabbitMQ test script
use strict;
use warnings;
use Net::AMQP::RabbitMQ ();
my $channel = 1;
my $exchange_name = 'exchange_name3';
my $routing_key = 'routing_key3';
my $queue_name = 'test_queue3';
[ 260.790202] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 260.790744] sd 0:0:0:0: [sda] 15730688 512-byte logical blocks: (8.05 GB/7.50 GiB)
[ 260.790885] sd 0:0:0:0: [sda] Write Protect is off
[ 260.790886] sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
[ 260.791213] sd 0:0:0:0: [sda] No Caching mode page found
[ 260.791216] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 260.795212] sda: sda1
[ 260.796145] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 292.455478] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 385.417280] pcieport 0000:00:1c.0: AER: Corrected error received: id=00e0
use strict;
use warnings;
# Find all installed packages
my $out = `dpkg-query -l`;
# Lines like:
# ii zlib1g-dev:i386 1:1.2.8.dfsg- i386 compression library - development
my @lines = split /\n/, $out;