Skip to content

Instantly share code, notes, and snippets.

View greevex's full-sized avatar

Gregory Ostrovsky greevex

View GitHub Profile
[greevex@ironman ~]$ mpr search .
Update package list...
Receiving http://mpr.sdstream.ru/manifest-global.mpr.json.gz...OK!
| ============================== | ========== | ========================================================================================================================
| -NAME- | -VERSION- | -DESCRIPTION-
| ------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------
| bot_twitter_main | 1.0 | Twitter bot - receiving stream by keywords via Twitter Streaming API
| gearman_functions_stats | 1.0 | Statistic functions (works with statdb) for gearman worker
| mpr_cache_factory | 1.0 | Base ca
<?php
define('AMQP_NOPARAM', 0);
define('AMQP_DURABLE', 0);
define('AMQP_PASSIVE', 0);
define('AMQP_EXCLUSIVE', 0);
define('AMQP_AUTODELETE', 0);
define('AMQP_INTERNAL', 0);
define('AMQP_NOLOCAL', 0);
define('AMQP_AUTOACK', 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;
}
/*
*
*
* 1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
* 0 _ __ __ __ 1
* 1 /' \ __ /'__`\ /\ \__ /'__`\ 0
* 0 /\_, \ ___ /\_\/\_\ \ \ ___\ \ ,_\/\ \/\ \ _ ___ 1
* 1 \/_/\ \ /' _ `\ \/\ \/_/_\_<_ /'___\ \ \/\ \ \ \ \/\`'__\ 0
* 0 \ \ \/\ \/\ \ \ \ \/\ \ \ \/\ \__/\ \ \_\ \ \_\ \ \ \/ 1
* 1 \ \_\ \_\ \_\_\ \ \ \____/\ \____\\ \__\\ \____/\ \_\ 0
Package "sds.sdk.test.start"
Var Queue $queue
Block start {
$queue.append "http://yandex.ru"
Foreach $queue
- call this.process
}
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.test"
Var Integer $attempts
Block start {
$attempts = 5
If $attempts <= 0
- set break true
$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] =>
// 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;
@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();