Skip to content

Instantly share code, notes, and snippets.

View jeremyquinton's full-sized avatar

Jeremy Quinton jeremyquinton

View GitHub Profile
@jeremyquinton
jeremyquinton / gist:5884616
Last active December 19, 2015 02:39
Example which gives the correct out
$path = '/vagrant/library';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
include("/vagrant/library/Zend/Loader.php");
include("/vagrant/library/Zend/Db.php");
$db = Zend_Db::factory('Mysqli', array(
'host' => 'localhost',
'username' => 'root',
@jeremyquinton
jeremyquinton / replicatecacheissue
Last active December 19, 2015 02:49
Example to replicate issue 125
set_include_path(get_include_path() . PATH_SEPARATOR . '/vagrant/library');
include("/vagrant/library/Zend/Cache.php");
class Test
{
private function foobar($param1, $param2) {
return "foobar";
}
%%%
%% Generated by Chef
%%%
[
{rabbit, [
{tcp_listen_options, [binary, {packet,raw},
{reuseaddr,true},
{backlog,128},
{nodelay,true},
@jeremyquinton
jeremyquinton / gist:7598375
Created November 22, 2013 11:20
erl_crash_dump
=erl_crash_dump:0.1
Fri Nov 22 11:08:16 2013
Slogan: init terminating in do_boot ()
System version: Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:30] [kernel-poll:true]
Compiled: Fri Dec 16 03:22:15 2011
Taints:
Atoms: 22020
=memory
total: 30735800
processes: 9097152
@jeremyquinton
jeremyquinton / gist:7598429
Created November 22, 2013 11:24
crash report
=CRASH REPORT==== 22-Nov-2013::11:08:15 ===
crasher:
initial call: application_master:init/4
pid: <0.236.0>
registered_name: []
exception exit: {{invalid_shovel_configuration,esu_duplication,
{unrecognised_parameters,[declarations]}},
{rabbit_shovel,start,[normal,[]]}}
in function application_master:init/4
ancestors: [<0.235.0>]
@jeremyquinton
jeremyquinton / gist:7599314
Created November 22, 2013 12:46
rabbitmq config
[
{rabbit, [
{tcp_listen_options, [binary, {packet,raw},
{reuseaddr,true},
{backlog,128},
{nodelay,true},
{exit_on_close,false},
{keepalive,false}]},
{default_user, <<"guest">>},
{default_pass, <<"guest">>}
<?php
require "vendor/autoload.php";
use Zend\Mail as Mail;
use Zend\Mime as Mime;
$mimeMessage = new Mime\Message;
$img = new Mime\Part(fopen(__DIR__ . "/blank.png", "r"));
Building remotely on slave_node1 in workspace /mnt/jenkins/workspace/OPG_CORE_BACK_END_TESTS_CORRESPONDENCE
> git rev-parse --is-inside-work-tree
Fetching changes from the remote Git repository
> git config remote.origin.url git@github.com:ministryofjustice/opg-core-back-end.git
Fetching upstream changes from git@github.com:ministryofjustice/opg-core-back-end.git
> git --version
> git fetch --tags --progress git@github.com:ministryofjustice/opg-core-back-end.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse origin/master^{commit}
Checking out Revision a9ff8b4687d0f8689cdafeb36eed11b05fbff0b7 (origin/master)
> git config core.sparsecheckout
Trying to unexport an object that's already unexported
java.lang.IllegalStateException: Invalid object ID 18 iota=40
at hudson.remoting.ExportTable.diagnoseInvalidId(ExportTable.java:277)
at hudson.remoting.ExportTable.unexportByOid(ExportTable.java:300)
at hudson.remoting.Channel.unexport(Channel.java:600)
at hudson.remoting.UnexportCommand.execute(UnexportCommand.java:38)
at hudson.remoting.Channel$2.handle(Channel.java:475)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
Caused by: java.lang.Exception: Object was recently deallocated
#18 (ref.0) : hudson.CloseProofOutputStream
<?php
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();