Skip to content

Instantly share code, notes, and snippets.

View jeremyquinton's full-sized avatar

Jeremy Quinton jeremyquinton

View GitHub Profile
@jeremyquinton
jeremyquinton / getfile.js
Last active September 22, 2022 12:39
get bulk replenishment file
const puppeteer = require('puppeteer');
const fs = require('fs');
const os = require('os');
run();
function run () {
(async () => {
let path = '';
@jeremyquinton
jeremyquinton / .php
Last active February 28, 2019 14:53
<?php
class CaptchService {
private $client;
private $logger;
public function __construct(\GuzzleHttp\Client $client,\Log $logger)
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: A newer version of the box 'ubuntu/trusty64' is available! You currently
==> default: have version '20170619.0.0'. The latest is version '20171101.0.0'. Run
==> default: `vagrant box update` to update.
==> default: Setting the name of the VM: whale_default_1510231555971_43123
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
- name: Add ppa Repository
sudo: yes
apt_repository:
repo=ppa:ondrej/mysql-5.7
- name: Update apt
sudo: yes
apt: update_cache=yes
- name: mysql | Install MySQL Packages
<?php
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
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
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 [email protected]:ministryofjustice/opg-core-back-end.git
Fetching upstream changes from [email protected]:ministryofjustice/opg-core-back-end.git
> git --version
> git fetch --tags --progress [email protected]: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
<?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"));
@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">>}
@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>]