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
## sum of file size of found files | |
## convert byte to gigabyte | |
## using eskimo operator | |
find -type f -name "*.war" -o -name "*.tar" | perl -lne '$sum += -s }{ print $sum/1024/1024/1024' |
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 utf8; | |
use strict; | |
use warnings; | |
use WebService::Slack::WebApi; | |
$ENV{HTTP_PROXY} = 'http://somewhere:8080'; |
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 | |
# | |
# chkconfig: 2345 06 00 | |
# description: this is to save the current routing table to a static route file | |
# called /etc/sysconfig/network-scripts/route-int0 | |
# | |
use utf8; | |
use strict; | |
use warnings; |
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
# | |
# Depends on: puppetlabs/stdlib | |
# | |
define buildsource( | |
$dir = $title, | |
$user = 'root', | |
$path = '/usr/bin:/bin', | |
$timeout = '0', | |
$options = '' | |
) { |
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 feature qw(say); | |
use utf8; | |
use strict; | |
use warnings; | |
package A::B::C { | |
use Moo; |
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
#### salt-repo/init.sls | |
saltstack: | |
pkgrepo.managed: | |
- name: saltstack | |
- humanname: SaltStack repo for RHEL/CentOS $releasever | |
- baseurl: https://repo.saltstack.com/yum/rhel$releasever | |
- enabled: 1 | |
- gpgcheck: 1 | |
- gpgkey: file:///etc/pki/rpm-gpg/SALTSTACK-GPG-KEY.pub |
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.014; | |
use utf8; | |
use warnings; | |
{ | |
package Sorter; | |
sub 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 | |
use 5.010; | |
use utf8; | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use URI::QueryParam; |
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.014; | |
use utf8; | |
use warnings; | |
# LWP::Protocol::https must be installed to request https | |
use LWP::UserAgent; | |
use URI::QueryParam; |
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 utf8; | |
use strict; | |
use warnings; | |
my %seen; | |
my $total; | |
while ( <> ) { | |
while (/([a-zA-Z])/g) { |