This file contains hidden or 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 warnings; | |
use strict; | |
use FindBin; | |
use File::Slurp; | |
use JSON; | |
use Time::HiRes; |
This file contains hidden or 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.16.0; | |
use warnings; | |
use strict; | |
use Parallel::ForkManager; | |
my @sites = qw/ www.google.com | |
4.2.2.2 |
This file contains hidden or 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
58 my $exec = ['plackup', '-s', 'Starman', @options, $app]; | |
59 daemonize( | |
60 run => sub{ | |
61 start_server( | |
62 port => $port, | |
63 pid_file => $pid_file, | |
64 status_file => $status_file, | |
65 exec => $exec, | |
66 ); | |
67 }, |
This file contains hidden or 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
/** | |
* This function fetches a url and gets some of the instrumentation data. | |
* | |
* @param url the Url to fetch and instrument | |
* @return an object which contains the status code, latency, and contentLength. | |
*/ | |
function fetchUrl(url) { | |
try { | |
var start = new Date().getTime(); | |
var resp = UrlFetchApp.fetch(url); |
This file contains hidden or 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 main | |
import ( | |
"io" | |
"bufio" | |
"os" | |
"flag" | |
"log" | |
) |
This file contains hidden or 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 warnings; | |
use strict; | |
use Data::Dumper; | |
use constant MY_CONSTANT => 13; | |
my %foo = (MY_CONSTANT => 'dingle'); |
This file contains hidden or 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 warnings; | |
use strict; | |
use Data::Dumper; | |
use Readonly; | |
Readonly my $MY_CONSTANT => 13; |
This file contains hidden or 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 warnings; | |
use strict; | |
use Dumbbench; | |
use Readonly; | |
use Const::Fast; | |
use Data::Dumper; | |
$Data::Dumper::Deparse = 1; |
This file contains hidden or 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
$VAR1 = { | |
'readonly' => sub { | |
use warnings; | |
use strict 'refs'; | |
my $i = 0; | |
if (defined $test_hash{$READONLY_KEY}) { | |
if ($test_hash{$READONLY_KEY} eq $READONLY_VALUE) { | |
$i++; | |
} | |
} |
This file contains hidden or 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
require 'pp' | |
CONSTANT="value"; | |
foo = { }; | |
foo[CONSTANT] = CONSTANT; | |
pp foo; |