pear upgrade PEAR
pecl install xhprof-0.9.2
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 | |
require './core/vendor/autoload.php'; | |
use Symfony\Component\Yaml\Parser; | |
function quantile($values, $p) { | |
sort($values); | |
$H = (count($values) - 1) * $p + 1; | |
$h = floor($H); | |
$v = $values[$h - 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 | |
function changed_functions() { | |
return array( | |
'field_invoke_method', | |
'field_invoke_method_multiple', | |
'_field_invoke', | |
'_field_invoke_multiple', | |
'field_attach_preprocess', | |
'field_info_extra_fields', |
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
#!/usr/bin/env ruby | |
require 'bundler/setup' | |
require 'socket' | |
require 'eventmachine' | |
require 'tire' | |
require 'json' | |
require 'securerandom' | |
$stdout.sync = true |
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
local keys = redis.call('hkeys', KEYS[1]) | |
local ret = {} | |
for k,v in pairs(keys) do | |
if redis.call('hget', KEYS[1], v) == 'asdf' then | |
return v | |
end | |
end |
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
#!/usr/bin/env ruby | |
require 'serialport' | |
class Maestro | |
def initialize | |
@sp = SerialPort.new("/dev/ttyACM0") | |
end | |
def send(servo, position) |
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 Kernel { | |
function handle() {} | |
} | |
class DrupalApp { | |
function __construct() { | |
$this->kernel = new Kernel(); | |
} |
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
#!/usr/bin/env ruby | |
require 'em-proxy' | |
Proxy.start(:host => "0.0.0.0", :port => 9201, :debug => false) do |conn| | |
conn.server :srv, :host => "127.0.0.1", :port => 9200 | |
conn.on_data do |data| | |
puts data | |
data |
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 file is part of the Symfony package. | |
* | |
* (c) Fabien Potencier <[email protected]> | |
* | |
* This code is partially based on the Rack-Cache library by Ryan Tomayko, | |
* which is released under the MIT license. | |
* |
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 Drupal\Core; | |
use Symfony\Component\HttpKernel\HttpCache\HttpCache as SymfonyHttpCache; | |
class HttpCache extends SymfonyHttpCache { | |
protected function getOptions() { | |
return array( | |
'debug' => TRUE |