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
/* | |
small helper program to print the error messages for | |
integer error codes. use as follows: | |
gcc -Wall -Wextra -pedantic dumperror.c | |
./dumperror <code> | |
where code is the error number you're interested in | |
*/ |
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 | |
$renderers = array( | |
new RendererConsole(), | |
new RendererCsvFile("./results.csv", ";"), | |
); | |
// chunk/bulk/batch size (number of documents to be loaded at once) | |
$chunkSize = 10000; | |
$datasetPath = "/performancetest/datasets/"; |
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 | |
// script to convert local git commit log history into JSON format | |
// usage: cd git-repository && php git-log-to-json.php > commits.json | |
// script might take a while to execute | |
$tags = [ ]; | |
$lines = shell_exec('git show-ref --tags'); | |
foreach (array_filter(explode("\n", $lines)) as $line) { | |
list($commit, $ref) = explode(" ", $line, 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
/* | |
write performance test | |
tests disk write performance with and without fdatasync | |
will write a configurable amount of 1MB data blocks to disk | |
and then optionally call fdatasync after each | |
usage: | |
compile with |
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
/* script to set up movie data into an ArangoDB database | |
run from the ArangoShell by executing this command: | |
require("internal").load("/path/to/this/file"); | |
*/ | |
(function() { | |
let print = require("internal").print; | |
let db = require("@arangodb").db; |
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
/* | |
* decode HTML entities in a string | |
* usage examples: | |
* htmlDecode('foo & bar') => 'foo & bar' | |
* htmlDecode('foo/bar') => 'foo/bar' | |
*/ | |
let htmlDecode = function(str) { | |
const map = { | |
'&' : '&', | |
'>' : '>', |
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
$ cat x.cpp; g++ -O3 x.cpp && ./a.out | head -n 10 | |
#include <iostream> | |
int main() | |
{ | |
for (int i = 0; i < 4; ++i) { | |
std::cout << i*1000000000 << std::endl; | |
} | |
} |