Skip to content

Instantly share code, notes, and snippets.

View greevex's full-sized avatar

Gregory Ostrovsky greevex

View GitHub Profile
<?php
/**
* @author greevex
* @date : 8/10/16 7:48 PM
*/
class CLD2Detector
{
public function __construct()
class profiler
{
private static $instance;
private static $internalCounter = 0;
private $timing = [
'pending' => [],
'results' => [],
];
@greevex
greevex / hardcore.php
Last active August 29, 2015 14:27
Server RAM test
#!/usr/bin/env php
<?php
namespace hardcore;
abstract class appBase
{
private $input;
abstract protected function handle();
// BUTTON PINS
const int buttonPin_1 = 2;
const int buttonPin_2 = 3;
const int buttonPin_3 = 4;
const int buttonPin_4 = 5;
const int buttonPin_reset = 5;
// GAME OPTIONS
const int defaultValue = 16;
const int minValue = 5;
$a = ["151", "1500"];
foreach($a as $item) { echo "Value `{$item}` is " . gettype($item) . PHP_EOL; }
//output: Value `151` is string
//output: Value `1500` is string
sort($a, SORT_REGULAR);
var_dump($a);
//output: array(2) {
//output: [0] =>
//output: string(3) "151"
//output: [1] =>
Package "sds.test"
Var Integer $attempts
Block start {
$attempts = 5
If $attempts <= 0
- set break true
Package "sds.sdk.test.start"
Var Queue $queue
Var Integer $count
Block start {
$queue.append "http://yandex.ru"
Foreach $queue
- set item $item
Package "sds.sdk.test.start"
Var Queue $queue
Block start {
$queue.append "http://yandex.ru"
Foreach $queue
- call this.process
}
/*
*
*
* 1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
* 0 _ __ __ __ 1
* 1 /' \ __ /'__`\ /\ \__ /'__`\ 0
* 0 /\_, \ ___ /\_\/\_\ \ \ ___\ \ ,_\/\ \/\ \ _ ___ 1
* 1 \/_/\ \ /' _ `\ \/\ \/_/_\_<_ /'___\ \ \/\ \ \ \ \/\`'__\ 0
* 0 \ \ \/\ \/\ \ \ \ \/\ \ \ \/\ \__/\ \ \_\ \ \_\ \ \ \/ 1
* 1 \ \_\ \_\ \_\_\ \ \ \____/\ \____\\ \__\\ \____/\ \_\ 0
#!/usr/bin/perl -w
use strict;
use Socket;
use IO::Handle;
if($#ARGV+1 != 2){
print "$#ARGV $0 Remote_IP Remote_Port \n";
exit 1;
}