View gen-moref-op.pl
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 | |
package Vmware::Moref::Operations; | |
use Mojo::Base -base, -signatures, -async_await; | |
use Mojo::Collection 'c'; | |
use Mojo::DOM; | |
use Mojo::JSON 'j'; | |
use Mojo::Promise; | |
use Mojo::URL; | |
use Mojo::UserAgent; |
View async-dns.pl
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 5.026; | |
use Mojo::Base -strict, -signatures, -async_await; | |
use Mojo::Promise; | |
use Socket qw(:addrinfo IPPROTO_UDP SOCK_DGRAM AF_INET AF_INET6); | |
use Mojo::Collection 'c'; | |
use Net::DNS::Native; | |
sub _resolve_host ($host, $resolve, $reject) { |
View hwg.wsdl
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
<?xml version="1.0" encoding="utf-8"?> | |
<wsdl:definitions | |
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | |
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" | |
xmlns:pos="poseidonService.xsd" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" | |
targetNamespace="poseidonService.xsd" | |
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | |
xmlns="http://schemas.xmlsoap.org/wsdl/"> |
View dns.pl
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 Mojo::Base -strict; | |
use Mojo::IOLoop::Delay; | |
use Net::DNS::Native; | |
use Socket qw(:addrinfo IPPROTO_UDP SOCK_DGRAM); | |
my $dns = Net::DNS::Native->new(pool => 5, extra_thread => 1); | |
my $d = Mojo::IOLoop::Delay->new; |
View s3-backup.pl
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 | |
package S3::Backup; | |
use Mojo::Base -base; | |
use Carp qw(carp croak); | |
use POSIX qw(strftime ceil floor); | |
use Fcntl qw(O_WRONLY O_APPEND O_CREAT); | |
use Fcntl ':mode'; | |
#set utf8 output encoding explicitly | |
binmode( STDOUT, ":encoding(utf8)" ); |
View ojo-find-mtime.pl
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
perl -E 'use Mojo::File "path"; use Cwd "cwd"; my $cwd=cwd(); say path(qq{$cwd})->list_tree({dir => 0, max_depth => 3})->map( sub { my $mtime = path($_)->lstat->mtime; time() - $mtime < 86400 ? sprintf("%s %d %d", $_, path($_)->lstat->mtime, time() - $mtime ) : undef;})->compact->join("\n");' |
View write-nb.pl
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 Mojo::Base -strict; | |
use Mojo::IOLoop::Stream; | |
use Mojo::IOLoop::Delay; | |
use Mojo::ByteStream 'b'; | |
# Create stream | |
my $stream = Mojo::IOLoop::Stream->new(\*STDOUT)->timeout(0); | |
my $text | |
= b( |
View disk-stats-nb.pl
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 Mojo::Base -strict; | |
use Mojo::File 'path'; | |
use Mojo::Collection 'c'; | |
use Mojo::IOLoop; | |
use Mojo::JSON 'j'; | |
use Mojo::Util 'getopt'; | |
use Number::Bytes::Human; | |
BEGIN { |
View cpu-stats-nb.pl
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 Mojo::Base -strict; | |
use Mojo::File 'path'; | |
use Mojo::Collection 'c'; | |
use Mojo::IOLoop; | |
use Mojo::JSON 'j'; | |
BEGIN { | |
#only linux is supported ! | |
#!linux |
View cpu-stat.pl
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 Mojo::Base -strict; | |
use Mojo::File 'path'; | |
use Mojo::Collection 'c'; | |
use Mojo::IOLoop; | |
BEGIN { | |
#only linux is supported ! | |
#!linux | |
die( sprintf( "OS %s not supported !\n", $^O ) ) if $^O ne 'linux'; |