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/perl | |
my $input = $ARGV[0]; | |
if ( !-e $input ) { | |
die "File not found"; | |
} | |
if ( -d $input) { | |
die "Path is a directory"; | |
} |
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
package API::WHMCS; | |
use strict; | |
use HTTP::Tiny; | |
use JSON::XS; | |
use Digest::MD5 ('md5_hex'); | |
our $VERSION = 0.001; |
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
sub api_request { | |
my ($auth, $command, $args ) = @_; | |
my $authstr; | |
my $port; | |
$args ||= {}; | |
my $server = $auth->{'server'}; | |
my $access_hash = $auth->{'hash'}; | |
my $user = $auth->{'user'}; |
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
<?php | |
error_reporting(E_ERROR | E_PARSE ); | |
require_once('test-more-php/Test-More.php'); | |
require_once('tests.php'); | |
plan(3); | |
pass('http'); |
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/perl | |
use HTTP::Tiny; | |
use JSON; | |
my $command ='random'; | |
#my $command = 'browse/last-week/sort-by-votes'; | |
my $url = "http://www.commandlinefu.com/commands/${command}/json/"; | |
#print Dumper $res; |
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 strict; | |
use warnings; | |
use lib 'lib'; | |
use IO::Socket::SSL; | |
use HTTP::Tiny; | |
use Data::Dumper; |
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
------- | |
HTTP::Tiny: master | |
OS Version: CentOS release 5.9 (Final) | |
OpenSSL: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 | |
IO::Socket::SSL: 1.86 | |
'reason' key from get https://google.com: Internal Exception | |
------- |
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 | |
# | |
# GitLab | |
# Maintainer: @elvanja, @troyanov, @eiyaya, @foyo23 | |
# App Version: 5.1.0 | |
# chkconfig: 2345 82 55 | |
# processname: puma | |
# processname: sidekiq | |
# description: Runs puma and sidekiq for nginx integration. |
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 strict; | |
use warnings; | |
use Smokeping; | |
# | |
# CONFIG VARS, CHANGE THESE TO YOUR SETUP. | |
# | |
my $config_file = '/etc/smokeping/config'; |
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
sub _load_targets { | |
my @targets; | |
Smokeping::load_cfg($config_file, 1); | |
# get each server's info. | |
foreach my $group ( keys %{ $Smokeping::cfg->{'Targets'} } ) { | |
unless ( ref $Smokeping::cfg->{'Targets'}->{$group} ) { | |
# Unless the entry in the smokeping hash is a reference to another datastructure | |
next; | |
} |
OlderNewer