Skip to content

Instantly share code, notes, and snippets.

Ben Johnson cbj4074

View GitHub Profile
cbj4074 / gist:9d21fe93a0c14dc7740f0333eed8cd7c
Created Dec 4, 2018
Vagrant failure when using winnfsd plugin with Hyper-V provider
View gist:9d21fe93a0c14dc7740f0333eed8cd7c
DEBUG provider: IP:
INFO machine: Calling action: read_state on provider Hyper-V (4be547eb-8998-489b-95f3-8f1f4f82f423)
INFO interface: Machine: action ["read_state", "start", {:target=>:"homestead-7"}]
INFO runner: Preparing hooks for middleware sequence...
INFO runner: 2 hooks defined.
INFO runner: Running action: machine_action_read_state #<Vagrant::Action::Builder:0x0000000004a22020>
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x0000000004a023b0>
INFO warden: Calling IN action: #<VagrantPlugins::HyperV::Action::ReadState:0x0000000004a02838>
INFO subprocess: Starting process: ["C:\\windows\\System32\\WindowsPowerShell\\v1.0\\/powershell.EXE", "-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "$env:PSModulePath=$env:PSModulePath+';C:\\HashiCorp\\Vagrant\\embedded\\gems\\2.2.1\\gems\\vagrant-2.2.1\\plugins\\providers\\hyperv\\scripts\\utils'; &('C:\\HashiCorp\\Vagrant\\embedded\\gems\\2.2.1\\gems\\vagrant-2.2.1\\plugins\\providers\
cbj4074 / vagrant-homestead-hyperv-failure.txt
Created Nov 12, 2018
Output of vagrant destroy && vagrant up
View vagrant-homestead-hyperv-failure.txt
>vagrant destroy && vagrant up
==> homestead-7: VM not created. Moving on...
Bringing machine 'homestead-7' up with 'hyperv' provider...
==> homestead-7: Verifying Hyper-V is enabled...
==> homestead-7: Verifying Hyper-V is accessible...
==> homestead-7: Importing a Hyper-V instance
homestead-7: Creating and registering the VM...
An error occurred while executing a PowerShell script. This error
is shown below. Please read the error message and see if this is
a configuration error with your system. If it is not, then please
cbj4074 / vagrant-trigger-debug.txt
Created Aug 7, 2018
Debug output for issue "Using inline script in trigger causes Ruby syntax violation"
View vagrant-trigger-debug.txt
INFO global: Vagrant version: 2.1.2
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version:
INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\2.1.2\\gems\\vagrant-2.1.2\\bin\\vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\HashiCorp\\Vagrant\\embedded"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
INFO global: Plugins:
cbj4074 / ldd-and-objdump-oci8-ubuntu18.txt
Last active Jun 4, 2018
ldd and objdump -p output for and dependencies
View ldd-and-objdump-oci8-ubuntu18.txt
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
cbj4074 / strace-output.txt
Last active Jun 1, 2018
strace output from php7.2-fpm startup capturing failure for to be loaded due to missing
View strace-output.txt
17:00:39 openat(AT_FDCWD, "/usr/lib/php/20170718/", O_RDONLY|O_CLOEXEC) = 3
17:00:39 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\265\0\0\0\0\0\0@\0\0\0\0\0\0\0hK\n\0\0\0\0\0\0\0\0\0@\0008\0\7\0@\0$\0#\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Hs\2\0\0\0\0\0Hs\2\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\360v\2\0\0\0\0\0\360v\"\0\0\0\0\0\360v\"\0\0\0\0\0\270A\0\0\0\0\0\0\260B\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0\0\255\2\0\0\0\0\0\0\255\"\0\0\0\0\0\0\255\"\0\0\0\0\0\360\1\0\0\0\0\0\0\360\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\310\1\0\0\0\0\0\0\310\1\0\0\0\0\0\0\310\1\0\0\0\0\0\0$\0\0\0\0\0\0\0$\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0P\345td\4\0\0\0@F\2\0\0\0\0\0@F\2\0\0\0\0\0@F\2\0\0\0\0\0\324\5\0\0\0\0\0\0\324\5\0\0\0\0\0\0\4\0\0\0\0\0\0\0Q\345td\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0R\345td\4\0\0\0\360v\2\0\0\0\0\0\360v\"\0\0\0\0\0\360v\"\0\0\0\0\0\0209\0\0\0\0\0\0\0209\0\0\0\0\0\0\1\0\0\0\0\0\0\0\4
cbj4074 / configure-and-make-output-oci8-ubuntu1804.txt
Created May 18, 2018
Configure and Make output for Oracle OCI8 extension on Ubuntu 18.04 LTS
View configure-and-make-output-oci8-ubuntu1804.txt
root@homestead:/usr/local/src/oci8-2.1.8# phpize7.2
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718
autoconf: warning: both `' and `' are present.
autoconf: warning: proceeding with `'.
autoheader: '' and '' both present.
autoheader: proceeding with ''
root@homestead:/usr/local/src/oci8-2.1.8# ./configure --with-php-config=/usr/bin/php-config7.2 --with-oci8=instantclient,/opt/oracle/instantclient_12_2
cbj4074 /
Created May 17, 2018
Shell script to install Oracle OCI8 extension for PHP on Ubuntu
echo 'Installing Oracle Instant Client...'
export DEBIAN_FRONTEND=noninteractive
apt-get -yq install libaio1 unzip php-dev
# See:
cbj4074 / gist:fcc5cee405b0d176b88aac633cf4069b
Created May 15, 2018
Homestead box v6.0.0 provisioning failure output
View gist:fcc5cee405b0d176b88aac633cf4069b
> vagrant destroy
homestead-7: Are you sure you want to destroy the 'homestead-7' VM? [y/N] y
==> homestead-7: Destroying VM and associated drives...
> vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
cbj4074 /
Last active Dec 13, 2017
Creating a Certificate Authority for Self-Signing TLS Certificates with OpenSSL

Creating the CA (Certificate Authority)

There is quite a bit of preparation and configuration required to create a CA. Fortunately, once the configuration is correct, the remainder of the process is relatively simple.

Create necessary directories and files

Absent these directories, openssl will emit errors during certain steps throughout the overall process.

$ cd ~
cbj4074 / php7-ssh2-segfault-test.php
Created Nov 1, 2016
Demonstrates segfault that occurs with PHP 7.0.12 and PECL ssh2 extension, version 1.0
View php7-ssh2-segfault-test.php
class ssh2
private $host = 'host';
private $user = 'user';
private $port = '22';
private $password = 'password';
private $con = null;
You can’t perform that action at this time.