Skip to content

Instantly share code, notes, and snippets.

View apuckey's full-sized avatar

Antony Puckey apuckey

View GitHub Profile
$ /usr/bin/syncthing --version
syncthing v0.13.0-beta.4+18-g21e116a "Copper Cockroach" (go1.6 linux-amd64) root@HHVM-Ubuntu-Trusty 2016-05-09 18:25:39 UTC
SIGQUIT: quit
PC=0x4a28a3 m=2
goroutine 0 [idle]:
runtime.futex(0x11b6190, 0x0, 0x7f49846e5db8, 0x0, 0x0, 0x4a26cc, 0x3c, 0x0, 0x450fdb, 0x11b6190, ...)
/usr/lib/go/src/runtime/sys_linux_amd64.s:303 +0x23
runtime.futexsleep(0x11b6190, 0x0, 0xdf8475800)
SIGQUIT: quit
PC=0x4a28a3 m=2
goroutine 0 [idle]:
runtime.futex(0x11b6190, 0x0, 0x7f5e45902db8, 0x0, 0x0, 0x4a26cc, 0x3c, 0x0, 0x450fdb, 0x11b6190, ...)
/usr/lib/go/src/runtime/sys_linux_amd64.s:303 +0x23
runtime.futexsleep(0x11b6190, 0x0, 0xdf8475800)
/usr/lib/go/src/runtime/os1_linux.go:57 +0xf0
runtime.notetsleep_internal(0x11b6190, 0xdf8475800, 0xc820000900)
/usr/lib/go/src/runtime/lock_futex.go:174 +0x12b
diff --git a/hphp/runtime/base/http-stream-wrapper.cpp b/hphp/runtime/base/http-stream-wrapper.cpp
index 2b90626..385f42e 100644
--- a/hphp/runtime/base/http-stream-wrapper.cpp
+++ b/hphp/runtime/base/http-stream-wrapper.cpp
@@ -20,6 +20,7 @@
#include "hphp/runtime/base/runtime-option.h"
#include "hphp/runtime/base/thread-info.h"
#include "hphp/runtime/ext/stream/ext_stream.h"
+#include "hphp/runtime/ext/url/ext_url.h"
#include "hphp/runtime/base/ini-setting.h"
#!/bin/bash
#
# openssl req -new -newkey rsa:4096 -nodes -out test_com.csr -keyout test_com.key -subj "/C=HK/ST=QLD/L=Cleveland/O=Test Central Inc.organization/CN=test.com"
#
DOMAIN=$1
KEYLENGTH=$2
COUNTRY=$3
STATE=$4
CITY=$5
<?php
class MyErrorHandler {
public function __construct() {
set_error_handler( "MyErrorHandler::logError" );
set_exception_handler( "MyErrorHandler::logException" );
}
public static function logError( $num, $str, $file, $line, $context = null ) {
MyErrorHandler::logException( new ErrorException( $str, 0, $num, $file, $line ) );
# 0 HPHP::ThreadLocalNoCheck<HPHP::BigintData>::getCheck() const at /usr/bin/hhvm:0
# 1 strlen at /lib/libc.so.6:0
# 2 strdup at /lib/libc.so.6:0
# 3 Curl_ftpsendf at /usr/hiphop-php/lib/libcurl.so.4:0
# 4 Curl_dupset at /usr/hiphop-php/lib/libcurl.so.4:0
# 5 curl_easy_duphandle at /usr/hiphop-php/lib/libcurl.so.4:0
# 6 HPHP::f_curl_copy_handle(HPHP::Resource const&) at /usr/bin/hhvm:0
# 7 HPHP::JIT::X64::BackEnd::enterTCHelper(unsigned char*, HPHP::JIT::TReqInfo&) at /usr/bin/hhvm:0
# 8 HPHP::JIT::MCGenerator::enterTC(unsigned char*, void*) at /usr/bin/hhvm:0
# 9 HPHP::ExecutionContext::enterVM(HPHP::ActRec*, HPHP::ExecutionContext::StackArgsState, HPHP::Resumable*, HPHP::ObjectData*) at /usr/bin/hhvm:0
@apuckey
apuckey / gist:3e10d3657179eb31839c
Created June 21, 2014 01:47
small speed comparison
<?hh
$time_start = microtime(true);
class TestClass {
public $test;
public function __construct(int $d) {
$this->test = $d;
}
public function getTest() : int {
package com.rawideas.rijarvis.transports.rabbitmq
import akka.actor.Actor
import akka.persistence.ConfirmablePersistent
import com.rabbitmq.client.Channel
import com.rabbitmq.client.Connection
import java.io.IOException
import net.joshdevins.rabbitmq.client.ha.HaConnectionFactory
import org.ini4j.Profile.Section
import org.slf4j.Logger
package com.rawideas.rijarvis.transports.rabbitmq
import akka.actor.Actor
import akka.persistence.ConfirmablePersistent
import com.rabbitmq.client.Channel
import com.rabbitmq.client.Connection
import java.io.IOException
import net.joshdevins.rabbitmq.client.ha.HaConnectionFactory
import org.ini4j.Profile.Section
import org.slf4j.Logger
diff --git a/hphp/runtime/server/fastcgi/fastcgi-transport.cpp b/hphp/runtime/server/fastcgi/fastcgi-transport.cpp
index 6c0415a..8d8082b 100644
--- a/hphp/runtime/server/fastcgi/fastcgi-transport.cpp
+++ b/hphp/runtime/server/fastcgi/fastcgi-transport.cpp
@@ -343,7 +343,7 @@ void FastCGITransport::onBody(std::unique_ptr<folly::IOBuf> chain) {
size_t length = chain->computeChainDataLength();
std::string s = cursor.readFixedString(length);
m_monitor.lock();
- m_bodyQueue.append(std::move(chain));
+ m_bodyQueue.append(s);