Skip to content

Instantly share code, notes, and snippets.

Avatar

Hannes Magnusson bjori

View GitHub Profile
@bjori
bjori / _mo
Last active Sep 28, 2015
Use mongo-orchestration to launch relevant topology type to test against. Based on the mongo-c-driver .mci config file
View _mo
#compdef mo
#autoload
# mo zsh completion
_mo() {
local curcontext="$curcontext" state line
local dir="/home/bjori/Sources/mongo-c-driver/orchestration_configs"
typeset -A opt_args
@bjori
bjori / gist:d82fcfe8078fa113391a
Created May 19, 2015
~/.vagrant.d/Vagrantfile
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:9166ff28bf1e80ff884d
2015-03-31T10:13:50.250-0700 I REPL [conn4] replSetInitiate admin command received from client
2015-03-31T10:13:50.263-0700 E NETWORK [conn4] The server certificate does not match the host name 192.168.112.10
2015-03-31T10:13:50.263-0700 W NETWORK [conn4] could't check isSelf (192.168.112.10:3101) socket exception [CONNECT_ERROR] for
2015-03-31T10:13:50.271-0700 E NETWORK [conn4] The server certificate does not match the host name 192.168.112.10
2015-03-31T10:13:50.271-0700 W NETWORK [conn4] could't check isSelf (192.168.112.10:3102) socket exception [CONNECT_ERROR] for
2015-03-31T10:13:50.271-0700 I REPL [conn4] replSet replSetInitiate config object with 3 members parses ok
2015-03-31T10:13:50.282-0700 E NETWORK [ReplExecNetThread-0] The server certificate does not match the host name 192.168.112.10
2015-03-31T10:13:50.282-0700 W REPL [ReplicationExecutor] Failed to complete heartbeat request to 192.168.112.10:3101; Location9001 socket exception [CONNECT_ERROR] for
2015-03-31T10:13:50.282
@bjori
bjori / PHONGO-SERVERS.json
Last active Aug 29, 2015
Example mongod server description for running the pecl/mongodb tests. It can also be generated by "make vm test-bootstrap"
View PHONGO-SERVERS.json
{
"STANDALONE": "mongodb:\/\/192.168.112.10:2000",
"STANDALONE_SSL": "mongodb:\/\/192.168.112.10:2100",
"STANDALONE_AUTH": "mongodb:\/\/root:toor@192.168.112.10:2200\/?authSource=admin",
"STANDALONE_X509": "mongodb:\/\/C=US,ST=New York,L=New York City,O=MongoDB,OU=KernelUser,CN=client@192.168.112.10:2300\/?authSource=$external&authMechanism=MONGODB-X509",
"STANDALONE_PLAIN": "mongodb:\/\/root:toor@192.168.112.10:2400\/?authSource=admin",
"REPLICASET": "mongodb:\/\/192.168.112.10:3000,192.168.112.10:3001,192.168.112.10:3002\/?replicaSet=REPLICASET"
}
View gist:32a8bb95b79c1ac31e65
ID Name Options Flags Description
-------------------------------------- ------------------------ --------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@bjori
bjori / rcnotes
Created Nov 11, 2014
MongoDB 1.6.0RC1 release notes
View rcnotes
The 1.6.0 Release Candidate of the PHP driver for MongoDB has been released!
Right on the heals of the 1.5.8 maintenance release, this release brings full compatibility with the upcoming MongoDB 2.8.0 release.
Release Notes:
http://pecl.php.net/package-changelog.php?package=mongo&release=1.6.0RC1
Found an issue? Please report it:
https://github.com/mongodb/mongo-php-driver#bugs--feature-requests
View keybase.md

Keybase proof

I hereby claim:

  • I am bjori on github.
  • I am bjori (https://keybase.io/bjori) on keybase.
  • I have a public key whose fingerprint is 3630 EFAD 3539 834E A66F 38D9 CA1C DAD9 97A8 E347

To claim this, I am signing this object:

@bjori
bjori / Ordered by count
Created Feb 5, 2014
@lists.php.net subscriber count, as of February 15th, 2014
View Ordered by count
self-approved - 69198
php-announce - 9367
php3 - 2790
php-kb - 2572
php-general - 2218
internals - 1328
php-db - 1321
php4beta - 1006
php-windows - 669
php-es - 620
@bjori
bjori / gist:8165044
Created Dec 28, 2013
Cycle through header using keyboard shortcuts
View gist:8165044
diff --git a/js/common.js b/js/common.js
index 97abbbd..63726bb 100755
--- a/js/common.js
+++ b/js/common.js
@@ -96,11 +96,37 @@ Mousetrap.bind("g n", function() {
});
Mousetrap.bind("j", function() {
var fixedheader = 50;
+ /* Doc page */
var node = $(".layout-menu .current");
View Output
$ php -n -c php.ini it.php # PHP/5.3.27 ⮀ MongoDB/2.4.6
float(0.0030438899993896)
Took 0.0030439 to iterate 500 times over a cursor