View ss-single-thread-loop.txt
def getServer(criteria): | |
startTime = loopEndTime = gettime() | |
maxTime = startTime + serverSelectionTimeoutMS/1000 | |
if topology.lastUpdateTime - startTime > heartbeatFrequencyMS/1000: | |
topology.stale = true | |
while true: |
View gist:d82fcfe8078fa113391a
# -*- mode: ruby -*- | |
# vi: set ft=ruby et sw=2 : | |
Vagrant.configure(2) do |config| | |
config.vm.provision "file", source: "/home/bjori/.gitconfig", destination: "~/.gitconfig" | |
config.vm.provision "file", source: "/home/bjori/.bashrc", destination: "~/.bashrc" | |
config.vm.provision "file", source: "/home/bjori/.profile", destination: "~/.profile" | |
config.vm.provision "file", source: "/home/bjori/.vimrc", destination: "~/.vimrc" | |
config.vm.provision "file", source: "/home/bjori/.vim", destination: "~/.vim" |
View gist:ef08a3c406d98c1bb618
use strict; | |
use warnings; | |
use Test::More 'no_plan'; | |
use MongoDB::Timestamp; # needed if db is being run as master | |
use MongoDB; | |
use lib "t/lib"; | |
use MongoDBTest qw/build_client get_test_db/; |
View spiders.bson
* build a spider | |
* build a megaspider | |
* build a registry of megaspider | |
$s = Spider->new({ | |
bson_type => BSON_INT32, | |
perl_type => [ typetype => 'name1' ], | |
from_perl => [ |
View version-pm-evolution.txt
Broad decisions about rationalizing version object behavior based on | |
discussions at the Lyon QAH. Participants: David Golden, Ricardo Signes, | |
Karen Etheridge, Leon Timmermans, Peter Rabbitson and Graham Knop | |
- version comparision should be done irrespective of the presence of | |
underscores in the string used to initialize the version object | |
- underscore should no longer be used as a tuple separator in vstrings or | |
vstring-like strings; vstrings are converted to tuples by splitting into | |
*characters* (not bytes) and converting to codepoints; any elements after |
View QAH2014 todo
* Collaborating with Ricardo in finishing PAUSE changes agreed to in the Lancaster Consensus | |
* Patching CPAN.pm to use CPAN::Common::Index for lower memory use and/or faster index response time | |
* Refactoring code from CPAN, CPANPLUS and cpanminus into CPAN::Common::* modules for less duplication and greater consistency across clients | |
* Prototyping ideas I have for improved code benchmarking tools | |
* Closing security holes in various toolchain modules | |
* Automating Metabase deployment with configuration management tools | |
* Implementing IPv6 support in HTTP::Tiny; also reviewing a pull request for persistent connection support | |
* Implementing coderef/arrayref/object in @INC support for Acme::require::case | |
* Improving perldoc for require | |
* Exploring BackPAN indexing and improved PAUSE indexes |
View circular-detect.pl
#!/usr/bin/env perl | |
use strict; | |
use Parse::CPAN::Packages; | |
use Module::CoreList; | |
use JSON::XS; | |
$| = 1; | |
my $packages_file = "$ENV{HOME}/minicpan/modules/02packages.details.txt.gz"; |
View gist:1872636
define :local_lib_for_user, :user => nil do | |
filename = "/etc/profile.d/perl-lib-#{params[:user]}.sh" | |
cpan_module 'local::lib' do | |
user params[:user] | |
end | |
script "perl-lib-#{params[:user]}" do | |
interpreter "bash" |