Skip to content

Instantly share code, notes, and snippets.

View henscu's full-sized avatar

Henry Scullion henscu

  • Speakeazy
  • United Kingdom
  • X @henscu
View GitHub Profile
<?php
/**
* Deploy for Bedrock with Sage9 on Homestead.
* Loosely based on https://github.com/zorca/wp-deploy/blob/master/deploy.php.
*/
namespace Deployer;
require 'recipe/common.php';
@koop
koop / ensure-cert-macos.sh
Created November 28, 2017 20:27
Ensures a certificate is in the macOS system keychain.
#!/bin/bash
# Usage
# $ ./install-cert-macos.sh "/path/to/cert"
CERT_PATH="$1"
# First, grab the SHA-1 from the provided SSL cert.
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g")
# Next, grab the SHA-1s of any standard.dev certs in the keychain.
# Don't return an error code if nothing is found.
@leevigraham
leevigraham / Generate ssl certificates with Subject Alt Names on OSX.md
Last active June 11, 2024 09:48
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

We're going to generate a key per project which includes multiple fully qualified domains. This key can be checked into the project repo as it's intended for local development but never used on production servers.

Save ssl.conf to your my_project directory.

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

@folbert
folbert / bedrock-setup-guide.md
Last active October 16, 2023 11:08
How to get up and running with Bedrock and Bedrock Capistrano at Oderland

Getting up and running with Bedrock

If you get totally stuck, here are some resources that may help you: Roots Discourse. Actually, you may want to head over and read this through really quick. It's nowhere near as long as this and may be good to have in the back of your mind when reading the rest of this document. Capistrano Website with manual Screencast on deploying WordPress with Capistrano.

Bedrock?

Bedrock is created by the good awesome people behind Sage and is described as a "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure." Read more at https://roots.io/bedrock.

@lmeyer
lmeyer / gist:f506a67462bf7614877a205db431bd55
Created October 13, 2016 16:21
Make WP Super Cache works with Bedrock
define( 'WP_CACHE', true );
define( 'WPCACHEHOME', $webroot_dir . '/app/plugins/wp-super-cache/');
# deploy.rb from https://github.com/roots/bedrock-capistrano modified by Björn Folbert, https://gist.github.com/folbert/
# Folbert-comment: from Capistrano doc:
# Here we'd set the name of the application, must be in a format that's safe for
# filenames on your target operating system.
set :application, 'APPLICATIONNAME'
# Folbert-comment: use the SSH url for the repo from GitHub
set :repo_url, 'git@github.com:USER/REPO.git'
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active September 23, 2023 09:38
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@swalkinshaw
swalkinshaw / site.yml
Last active June 15, 2018 15:37
Multiple sites on one box with bedrock-ansible
# this is group_vars/development
---
www_root: /srv/www
# Define your WordPress sites here
wordpress_sites:
- site_name: site1.dev
site_hosts:
- site1.dev
@seenmyfate
seenmyfate / Capfile
Created April 23, 2014 07:55
Capistrano v3 custom Submodule Strategy example
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/scm'
require 'capistrano/git'
class Capistrano::Git < Capistrano::SCM
module SubmoduleStrategy
include DefaultStrategy
def release