This file contains hidden or 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 | |
$mongo = new MongoClient(); | |
$db = $mongo->test; | |
$collection = $db->selectCollection('session'); | |
$sessionCount = $argv[1]; | |
$sampleCount = $argv[2]; | |
$samples = []; | |
// Setup collection |
This file contains hidden or 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
#!/bin/bash | |
DB="test" | |
COL="tz" | |
ZONES="London Berlin Istanbul" | |
DATE="2000-01-01" | |
echo "System timezone: $(date -R)" | |
echo "" |
This file contains hidden or 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
#!/bin/bash | |
DB="test" | |
COL="tz" | |
ZONES="London Berlin Istanbul" | |
DATE="2000-01-01" | |
echo "System timezone: $(date -R)" | |
echo "" |
This file contains hidden or 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 | |
// this is our generator, dns\* and socket\* are assumed | |
// to be async functions returning promises | |
function read_data_from($hostname, $port) { | |
$ip = yield dns\resolve($hostname); | |
$socket = yield socket\connect($ip, $port); | |
echo yield socket\read(1024); | |
}; |
This file contains hidden or 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
#!/bin/bash | |
# Check for availability of a OnePlus stock item (405 == OnePlus 3T 128GB EU) | |
# and notify over pushover.net | |
# | |
# Background: https://www.oneplusstock.net/ revealed that you do not get | |
# an instant notification as soon as it goes back on stock...so this might | |
# help... | |
# |
OlderNewer