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 bash | |
# Translate a POT file using BASH and the translate-shell utility | |
# homebrew users might install translate-shell by entering | |
# brew install translate-shell | |
# Linux user might try the default package manager (dnf/apt-get) | |
[[ ${BASH_VERSINFO[0]} -lt 4 ]] && | |
echo "BASH VERSION MUST BE >= 4" && | |
exit 1 |
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
#!/bin/bash | |
OK=0 | |
WARN=1 | |
CRIT=2 | |
UNKN=3 | |
W_DAYS=15 | |
C_DAYS=10 | |
D_PATH="/etc/pki/tls/certs" |
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 Filebeat::Package::Crawler; | |
use Mojo::Base -base, -signatures, -async_await; | |
use Mojo::Collection qw(c); | |
use Mojo::ByteStream qw(b); | |
use Mojo::Util qw(decode encode secure_compare dumper); | |
use Mojo::JSON qw(decode_json encode_json); | |
use Digest::SHA qw(sha512); |
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; |
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) { |
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/"> |
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; |
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)" ); |
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");' |
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( |
NewerOlder