Skip to content

Instantly share code, notes, and snippets.

Juan Basso jrbasso

Block or report user

Report or block jrbasso

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jrbasso
jrbasso / serializer_perf_test.php
Created Feb 28, 2016
Testing performance with options suggested on zumba/json-serializer#14
View serializer_perf_test.php
<?php
class JsonSerializer {
const CLASS_IDENTIFIER_KEY = '@type';
const FLOAT_ADAPTER = 'JsonSerializerFloatAdapter';
/**
* Storage for object
*
* Used for recursion
*
View keybase.md

Keybase proof

I hereby claim:

  • I am jrbasso on github.
  • I am jrbasso (https://keybase.io/jrbasso) on keybase.
  • I have a public key whose fingerprint is FB6C 0029 F72B 33F3 69CF C90F B81C DD9B B318 78F8

To claim this, I am signing this object:

View segfault.php
<?php
namespace Cake;
class Router {
protected static $_collection;
protected static $_vars;
public static function test() {
static::$_collection = new \stdClass();
View ZumbaRoute.php
<?php
App::uses('CakeRoute', 'Routing/Route');
/**
* Just a wrap of CakeRoute to support var_export
*/
class ZumbaRoute extends CakeRoute {
public static function __set_state($fields) {
View json_change_perf.php
<?php
$data = array_fill(0, 1000, 1.0);
$iterations = 10000;
$m = microtime(true);
while ($iterations-- > 0) {
json_encode($data);
}
echo "Elapsed time: ", (microtime(true) - $m), "\n";
View trait.php
<?php
namespace Cake\Core {
trait Log {
public function log() {
echo 'hi';
}
}
}
View input.html
<!DOCTYPE html>
<html>
<body>
<form method="get">
<input type="text" name="search">
</form>
</body>
</html>
View features.md
View completation.sh
# Bash completation for application
_my_application()
{
local cur prev opts job
COMPREPLY=()
job="${COMP_WORDS[0]}"
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
View bash_completation.php
<?php
// In my job.php file
if ($argv[1] === '__check__') {
if (empty($argv[2])) {
echo implode(' ', \Zumba\Job\Job::availableJobs());
} else {
$class = getJobClass($argv[2]);
if (class_exists($class)) {
echo implode(' ', $class::availableMethods());
You can’t perform that action at this time.