Skip to content

Instantly share code, notes, and snippets.

View cbj4074's full-sized avatar

Ben Johnson cbj4074

View GitHub Profile
@cbj4074
cbj4074 / README.md
Last active December 20, 2023 15:57
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
cbj4074 / oracle-instant-client.sh
Created May 17, 2018 16:19
Shell script to install Oracle OCI8 extension for PHP on Ubuntu
#!/bin/sh
echo 'Installing Oracle Instant Client...'
export DEBIAN_FRONTEND=noninteractive
apt-get -yq install libaio1 unzip php-dev
# See: http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
client_version='12_2'
@cbj4074
cbj4074 / docker-compose.yml
Created April 27, 2021 12:40
How to configure docker-compose.yml to enable phpMyAdmin in Laravel Sail
services:
phpmyadmin:
image: phpmyadmin
restart: always
ports:
- 8080:80
environment:
- PMA_HOST=mysql
networks:
- sail
@cbj4074
cbj4074 / docker-compose.yml
Created April 14, 2021 15:13
docker-compose.yml entry for adding phpMyAdmin to Laravel 8 Sail
services:
phpmyadmin:
networks:
- sail
@cbj4074
cbj4074 / index.php
Last active February 29, 2020 00:20
Changes required to use non-standard public directory in Laravel 5
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylorotwell@gmail.com>
*/
/*
@cbj4074
cbj4074 / vagrant-debug.txt
Created January 10, 2020 02:11
Detailed Vagrant logging output for "vagrant --debug box update" command on Windows 1909, segfaults
vagrant : INFO global: Vagrant version: 2.2.6
At line:1 char:1
+ vagrant --debug box update *> C:\Users\Anon\Desktop\vagrant.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( INFO global: Vagrant version: 2.2.6:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
INFO global: Ruby version: 2.4.9
INFO global: RubyGems version: 2.6.14.4
@cbj4074
cbj4074 / oracle-database-xe.sh
Last active October 3, 2019 20:49
Automated Installation and configuration for Oracle Database XE 18
#!/bin/sh
echo 'Installing Oracle Database XE...'
# See: https://www.oracle.com/database/technologies/appdev/xe/quickstart.html
# /vagrant_data is a directory that is mounted from the host filesystem and
# contains the installation binary, "oracle-database-xe-18c-1.0-1.x86_64.rpm".
cd /vagrant_data
@cbj4074
cbj4074 / gist:9d21fe93a0c14dc7740f0333eed8cd7c
Created December 4, 2018 17:10
Vagrant failure when using winnfsd plugin with Hyper-V provider
DEBUG provider: IP: 172.18.124.170
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
cbj4074 / vagrant-homestead-hyperv-failure.txt
Created November 12, 2018 16:51
Output of vagrant destroy && vagrant up
>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
cbj4074 / vagrant-trigger-debug.txt
Created August 7, 2018 21:14
Debug output for issue "Using inline script in trigger causes Ruby syntax violation"
INFO global: Vagrant version: 2.1.2
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version: 2.6.14.1
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_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
INFO global: Plugins: