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/mongo informadiko | |
// ┏━┓┏━╸┏━╸┏━┓╻ ╻┏┓╻╺┳╸┏━┓ | |
// ┣━┫┃ ┃ ┃ ┃┃ ┃┃┗┫ ┃ ┗━┓ | |
// ╹ ╹┗━╸┗━╸┗━┛┗━┛╹ ╹ ╹ ┗━┛ | |
db.dropDatabase() // BE CAREFUL | |
//db.createCollection("system.profile", {capped:true, size:1024000000}) // 1024 Megs | |
db.setProfilingLevel(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
#include <stdio.h> | |
#include "other.h" | |
#include "tester.h" | |
namespace other { | |
void other_type::some_method() { | |
printf("here\n"); | |
} | |
} |
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 | |
function getReplicationInfo($m) { | |
$db = $m->local; | |
$result = array(); | |
$ol = $db->system->namespaces->findOne(array("name" => 'local.oplog.$main')); | |
if ($ol && array_key_exists('options', $ol)) { | |
$result['logSizeMB'] = $ol['options']['size'] / 1000 / 1000; |
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 | |
// inserts 1,000,000 docs in 14 seconds on a MacBook Pro running Ubuntu 9.04 | |
class Timer | |
{ | |
var $start; | |
var $pause_time; | |
/* start the timer */ |
NewerOlder