Skip to content

Instantly share code, notes, and snippets.

View christopher-hopper's full-sized avatar
:octocat:
contributing

Christopher Hopper christopher-hopper

:octocat:
contributing
View GitHub Profile
@christopher-hopper
christopher-hopper / PHP-Interactive-CLI-Install-from-Source.md
Last active March 17, 2024 10:23
Install PHP from a source download to enable its interactive command-line shell interface on Linux.

PHP Interactive CLI Install

The following commands can be used to install PHP from source with an interactive command-line shell interface on Linux.

This interactive shell, (command: php -a) was the main reason I built from source to begin with. Now though I am able to play with the latest PHP versions as soon as they are available.

The commands below were written for and tested on the following system.

  • OS: Ubuntu 14.04.4 LTS (trusty)
@christopher-hopper
christopher-hopper / README.md
Last active March 6, 2024 22:41
Stop Zscaler Netskope or Cylance services on macOS

Disable macOS Cylance Zscaler or Netskope

The following scripts can be used to disable common security compliance software that blocks access to the Internet on corporate managed macOS computers. These scripts will not uninstall the software.

You may be asked to enter a password for command operations that require elevated privileges via sudo. If you do not have permission to run commands as a root user with sudo then these scripts will not work for you.

@christopher-hopper
christopher-hopper / README.md
Created November 8, 2019 00:20
SSH config file

SSH Config

This is an example ~/.ssh/config file showing a common set-up with the following features:

  1. SSH Agent key forwarding into local virtual machines
  2. SSH Agent key forwarding into remote Acquia servers
  3. SSH alias for a personal bitbucket.org account (uses a different SSH key)
  4. Keychain Access configuration for macOS
@christopher-hopper
christopher-hopper / phpenv-macos.sh
Last active November 1, 2023 00:18 — forked from eporama/phpenv-osx.sh
Install phpenv on macOS with homebrew php packages.
#!/usr/bin/env bash
# vim: ai ts=2 sw=2 et sts=2 ft=sh
# Install or re-install phpenv with
# multiple versions of PHP on macOS.
#
# Usage:
#
# curl -fsSL "https://git.io/JvG7i?cb=$RANDOM" | bash
#
@christopher-hopper
christopher-hopper / README.md
Created July 19, 2023 03:12
Stop Apple Music launching when bluetooth headset connects

Question

How do I stop Apple Music from launching whenever I connect a Bluetooth headset to my MacBook?

Background

I use a bluetooth headset for video calls using video conferencing software on macOS.

@christopher-hopper
christopher-hopper / phpenv-ubuntu-xenial.sh
Last active May 16, 2023 11:02
Install phpenv on Ubuntu 16.04 LTS (xenial)
#!/usr/bin/env bash
# vim: ai ts=2 sw=2 et sts=2 ft=sh
# Check OS.
if [[ ! "${OSTYPE}" =~ "^linux" ]] || [[ ! "$(lsb_release -c 2>/dev/null)" =~ "xenial" ]]; then
(>&2 echo "Error: This script is for Ubuntu 16.04 LTS (xenial) not '${OSTYPE}'.")
exit 1;
fi
sudo apt-get update
@christopher-hopper
christopher-hopper / fix-rabbitmq-after-disk-space-full.markdown
Created March 25, 2014 04:56
How to recover RabbitMQ after running out of disk space

If RabbitMQ wont start and show the following in the startup logs:

# cat  /var/log/rabbitmq/startup_log


BOOT FAILED
===========
# vagrant-hostmanager https://github.com/devopsgroup-io/vagrant-hostmanager
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp /home/*/.vagrant.d/tmp/hosts.local /etc/hosts
%admin ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE
# See https://github.com/cogitatio/vagrant-hostsupdater#readme
# vagrant plugin vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
@christopher-hopper
christopher-hopper / vm-resize-hard-disk.md
Last active April 5, 2022 10:30
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@christopher-hopper
christopher-hopper / README.md
Last active January 18, 2022 03:50
macOS Amazee.io Drupal example Docker Compose override

macOS Amazee.io Drupal example Docker Compose override

Override Docker Compose volumes in an Amazee.io Drupal example to use NFS mounts.

This can substantially improve the disk I/O performance when running disk heavy operations inside Docker containers. Specifically, we're looking to improve performance for operations like php composer install and composer update.