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
#!/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... | |
# |
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 | |
// 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 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 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 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 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
<?hh | |
async function stream_check(resource $stream, string $mode, int $usec): Awaitable<void> | |
{ | |
$r = $w = $e = null; | |
do { | |
if ($mode == "r") { | |
$r = Vector{$stream}; | |
} |
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 | |
echo "var_dump(...)\n"; | |
echo "\n"; | |
echo "PHP_INT_MAX : "; | |
var_dump(PHP_INT_MAX); | |
echo "PHP_INT_MAX + 1 : "; | |
var_dump(PHP_INT_MAX + 1); |
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 | |
class ValueObject | |
{ | |
protected $checked; | |
protected $value; | |
protected $exists; | |
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 | |
namespace Zikarsky\Util; | |
class Bcrypt | |
{ | |
const ALGO_ID = "2y"; | |
const ALGO_ID_PRE_5_3_7 = "2a"; | |
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
<html> | |
<head> | |
<title>VM</title> | |
<style type="text/css"> | |
body { | |
font-family: "Courier New"; | |
font-size: .8em; | |
} | |
NewerOlder