Skip to content

Instantly share code, notes, and snippets.

View JoelMarcey's full-sized avatar

Joel Marcey JoelMarcey

View GitHub Profile
Notice: Undefined index: data in /home/joelm/user-documentation/src/api-gen/FunctionMarkdownBuilder.php on line 22
Notice: Undefined index: data in /home/joelm/user-documentation/src/api-gen/FunctionMarkdownBuilder.php on line 81
Warning: array_map(): Argument #2 should be an array or collection
Notice: Undefined index: data in /home/joelm/user-documentation/src/api-gen/FunctionMarkdownBuilder.php on line 83
Notice: Undefined index: data in /home/joelm/user-documentation/src/api-gen/FunctionMarkdownBuilder.php on line 88
@JoelMarcey
JoelMarcey / gist:29601dc033af31390fc6
Created October 15, 2015 05:04
Static File Extensions HHVM
hphp_string_imap<std::string> staticFileDefault;
staticFileDefault["css"] = "text/css";
staticFileDefault["gif"] = "image/gif";
staticFileDefault["html"] = "text/html";
staticFileDefault["jpeg"] = "image/jpeg";
staticFileDefault["jpg"] = "image/jpeg";
staticFileDefault["mp3"] = "audio/mpeg";
staticFileDefault["png"] = "image/png";
staticFileDefault["tif"] = "image/tiff";
staticFileDefault["tiff"] = "image/tiff";
<?php
$foo = new StdClass;
$foo->bar = 3;
$foobar = function ($qux) { var_dump($this->bar + $qux); };
$foobar->call($foo, 4); // prints int(7)
<?php
var_dump(ini_get("xdebug.enable"));
var_dump(ini_get("xdebug.remote_enable"));
var_dump(ini_get("hhvm.xdebug.remote_enable"));
----
xdebug.enable=true
xdebug.remote_enable=true
joelm@joelm-trashcan:/tmp/hhvm-nginxQXfWFV $ tail -n 200 access.log
200 28300 0.486 "GET /?p=23 HTTP/1.1"
200 16838 0.558 "GET /?p=24 HTTP/1.1"
301 5 0.514 "GET /http://joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/?page_id=5 HTTP/1.1"
301 5 0.350 "GET /http://joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/?page_id=5 HTTP/1.1"
301 5 0.269 "GET /http://joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/http:/joelm-trashcan:8090/?page_id=5 HTTP/1.1"
301 5 0.442 "GET /http://joelm-trashcan:8090/http:/joelm-t
**************************
** 2015-05-11 20:05:04 PDT
** Collecting TC/PCRE data
***************************
** 2015-05-11 20:05:04 PDT
** There is no tearDownTest
{
"Combined": {
"Siege requests": 12603,
@JoelMarcey
JoelMarcey / gist:57a3bf16dfa8c6748599
Created April 30, 2015 06:21
Link errors after hhvm-third-party sha update because of folly::Singleton move from experimental
Linking CXX executable hhvm
/home/joelm/local/hhvm-push/third-party/mcrouter/mcrouter/ProxyRequestContext.cpp:155: error: undefined reference to 'folly::fibers::Baton::post()'
/home/joelm/local/hhvm-push/third-party/mcrouter/mcrouter/ProxyRequestContext.cpp:155: error: undefined reference to 'folly::fibers::Baton::post()'
/home/joelm/local/hhvm-push/third-party/folly/folly/experimental/fibers/FiberManager-inl.h:123: error: undefined reference to 'folly::fibers::FiberManager::currentFiberManager_'
/home/joelm/local/hhvm-push/third-party/folly/folly/experimental/fibers/FiberManager-inl.h:123: error: undefined reference to 'folly::fibers::FiberManager::currentFiberManager_'
/home/joelm/local/hhvm-push/third-party/folly/folly/experimental/fibers/FiberManager-inl.h:97: error: undefined reference to 'folly::fibers::Fiber::LocalData::reset()'
/home/joelm/local/hhvm-push/third-party/folly/folly/experimental/fibers/FiberManager-inl.h:103: error: undefined reference to 'folly::fibers::Fiber::~Fiber()'
/home/joelm/local
@JoelMarcey
JoelMarcey / gist:d09bb2fffdc954f25627
Created November 20, 2014 20:59
Hardware Profile
% hhvm -g --hdf Eval.ProfileHWEnable=true test.php
:
:
Breakpoint 7, HPHP::HardwareCounter::HardwareCounter (this=0x7fffee224dc0)
at hphp/runtime/base/hardware-counter.cpp:182
182 : m_countersSet(false) {
(gdb) p RuntimeOption::EvalProfileHWEnable
$2 = true
----
<!DOCTYPE html>
<html lang="en" class="">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
js/components/MessageSection.react.js:79:49,70: property name
Property cannot be accessed on possibly null or undefined value
js/components/MessageSection.react.js:39:12,17: ?Thread
js/components/MessageSection.react.js:88:23,90:3: function
Too few arguments (expected default/rest parameters in function)
[LIB] react.js:44:5,93: function type
js/stores/MessageStore.js:39:14,19: ?string
This type is incompatible with