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 | |
class LinkedNode { | |
protected LinkedNode $next; | |
protected $value; | |
protected string $key; | |
public function __construct(string $key, $value) { | |
$this->value = $value; | |
$this->key = $key; | |
} | |
public function key(): string { |
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
/* 1. Imports */ | |
import flash.display.LoaderInfo; | |
import flash.display.Loader; | |
import flash.net.URLRequest; | |
import flash.events.Event; | |
import flash.system.Security; | |
/* 2. Get the url from the flashvars */ | |
var params:Object = LoaderInfo(root.loaderInfo).parameters; /* Access to the root object is required */ |
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
/* 1. Imports */ | |
import flash.display.LoaderInfo; | |
import flash.display.Loader; | |
import flash.net.URLRequest; | |
import flash.events.Event; | |
import flash.system.Security; | |
/* 2. Get the url from the flashvars */ | |
var params:Object = LoaderInfo(root.loaderInfo).parameters; /* Access to the root object is required */ |
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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvEH2o4mKp7Jrbhgvo7JDSEhw+RUZHLJ59SSUTiRTu9DkrpvvZrQs4YXAStkw9zSsvhJp3kQ/86n16SMA/p12KC9Kr9PeGovXJQMkQjnvYNXmYWiMA9g3ubQ7YCMZWbzIS6aKXc8ujP4Au3RNTcBinPgZorLkMvKlm9EphjRZSLuyBZ+0TLNBA7DHmYGu3Rd69q2rosoWMabsKS/NC9U8JX64P/hXsc68wP4OhSMxQzqf4suGJtBLZHk4R6wr4j+TVwEbDdlD5fL6Vaty7Rf7+ZNeMeYSLhyC1CwyYFEgfmJ1KzBivKGGnnY1hNzHe5Kn39TLeOPJJMs1upLM/6rTUQ== [email protected] |
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 | |
/** | |
* PHP 5.5+ Required | |
* How to get a filtered subset from a collection by using generators. | |
* @author http://www.github.com/rmruano | |
*/ | |
/* 1. Classes definition ------------------------------------------------------------------------ */ |
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
if (typeof getGraphiteValue=="undefined") { | |
var getGraphiteValue, reloadGraphiteValues; | |
getGraphiteValue = function(target, jsonUrl) { | |
var $target; | |
if (target instanceof $) { | |
$target = target; | |
} else { | |
$target = $(target); | |
} | |
$.ajax({ |
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
1) CHAR SPLITS | |
hbase(main):011:0> create 'split_test_char',{NAME=>'D',VERSIONS=>'1',TTL=>'1'},{SPLITS => ['4','8','b']} | |
Name Region Server Start Key End Key Requests | |
split_test_char,,1393314827787.204ca55f6f71c548cd5926102d3cfc2b. host.com:60030 4 0 | |
split_test_char,4,1393314827787.36c384800191ae5aa8b73f24d88e1aba. host.com:60030 4 8 0 | |
split_test_char,8,1393314827787.8e00a315871dc155fc2788dd64573589. host.com:60030 8 b 0 | |
split_test_char,b,1393314827787.d84c59baca0e3cb7c6a76cc1edb1d778. host.com:60030 b 0 |
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 | |
namespace Model\User\UserItem; | |
/** | |
* Iterable group of UserItems | |
*/ | |
class Group implements \Iterator { | |
private $position = 0; |
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
$json = file_get_contents("php://input"); /* Get the RAW POST DATA */ | |
if ( ! ( isset($_SERVER['HTTP_MINI_SIGNATURE']) | |
&& $_SERVER['HTTP_MINI_SIGNATURE'] == md5("[YOUR_API_KEY]".$json) )) { | |
throw new Exception("Invalid signature"); | |
} | |
/* the request signature has been validated! */ |
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
/* 1. Decode all get parameters */ | |
foreach ($_GET as $key=>$value) | |
$_GET[$key] = urldecode($value); /* 1. May not be needed in your language */ | |
/* 2. Check signature */ | |
if ($_GET['mini_signature'] != signParameters("YOUR_API_KEY",$_GET)) { | |
die("The 'mp_*' parameters signature is invalid"); | |
} else { | |
echo "The 'mp_*' parameters signature is valid!"; | |
} | |
/* 3. Helper function definition, yeah, it will look so good inside a class :) */ |
NewerOlder