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
smoke-rebase () { | |
while true; do | |
(perl Makefile.PL && make realclean && perl Makefile.PL) &>/dev/null \ | |
&& make -j9 ptest \ | |
&& git rebase --continue \ | |
|| break | |
done | |
say All done | |
} |
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 v5.14; | |
use strict; | |
use warnings; | |
use CPAN::DistnameInfo; | |
use HTTP::Tiny; | |
use Parse::CPAN::Packages::Fast; | |
my $local_mirror = "/srv/cpan"; |
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
# override instead of 'around' to avoid overhead of calling | |
# the default BUILDARGS | |
sub BUILDARGS { | |
my $class = shift; | |
if ( @_ == 0 ) { | |
return { value => MongoDB::BSON::generate_oid() }; | |
} | |
if ( @_ == 1 ) { | |
if ( ref( $_[0] ) eq 'HASH' ) { | |
return $_[0]; |
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
def getServer(criteria): | |
startTime = loopEndTime = gettime() | |
maxTime = startTime + serverSelectionTimeoutMS/1000 | |
if topology.lastUpdateTime - startTime > heartbeatFrequencyMS/1000: | |
topology.stale = true | |
while true: |
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
use 5.008001; | |
use strict; | |
use warnings; | |
package Subtest; | |
# XXX must be used with no_plan or done_testing | |
use Test::More 0.88; | |
use base 'Exporter'; |
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
Multi-threaded | |
1. Record the server selection start time | |
2. If the topology wire version is invalid, raise an error | |
3. Find suitable servers by topology type and operation type | |
4. If there are any suitable servers, choose one at random from those | |
within the latency window and return it; otherwise, continue to step #5 |
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
commit 38d79a190b9f2adf34c2c84c4014f90912f368d9 | |
Author: David Golden <[email protected]> | |
Date: Wed May 20 19:47:03 2015 -0400 | |
encode integers as BSON Int32 if they fit | |
diff --git a/perl_mongo.c b/perl_mongo.c | |
index 54833fe..9cc619b 100644 | |
--- a/perl_mongo.c | |
+++ b/perl_mongo.c |
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 v5.10; | |
use strict; | |
use warnings; | |
use Capture::Tiny 'tee'; | |
use Path::Tiny; | |
die "Usage: $0 <outfile> <errfile> <command ...>\n" | |
unless @ARGV > 2; |
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
bson/bson-json.c | 1298 ----------------------------- | |
bson/bson-json.h | 73 -- | |
bson/bson.h | 1 - | |
inc/Module/Install/PRIVATE/Mongo.pm | 4 +- | |
perl_mongo.c | 1564 ++++++++++++++++------------------- | |
perl_mongo.h | 121 +-- | |
ppport.h | 704 ++++++++++------ | |
yajl/LICENSE | 13 - | |
yajl/yajl.c | 175 ---- | |
yajl/yajl_alloc.c | 49 -- |
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
cpanm (App::cpanminus) 1.7027 on perl 5.020002 built for darwin-thread-multi-2level | |
Work directory is /Users/david/.cpanm/work/1431036372.26152 | |
You have make /usr/bin/make | |
You have LWP 6.13 | |
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3 | |
You have /usr/bin/unzip | |
Searching Dist::Zilla::Plugin::Test::Version on cpanmetadb ... | |
--> Working on Dist::Zilla::Plugin::Test::Version | |
Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/Dist-Zilla-Plugin-Test-Version-1.00.tar.gz | |
-> OK |
NewerOlder