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
@bvandreunen
bvandreunen / wp.config.php
Created July 29, 2012 23:39
wp.config.php
<?php include_once("${_SERVER['DOCUMENT_ROOT']}/wp-config.php"); ?>
@corny
corny / git.cap
Created November 14, 2013 01:31
Capistrano 3 with Git Submodules
# Save this file as lib/capistrano/tasks/git.cap
namespace :git do
desc 'Copy repo to releases'
task create_release: :'git:update' do
on roles(:all) do
with fetch(:git_environmental_variables) do
within repo_path do
execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path
end
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
# Custom tasks
require 'capistrano/composer'
require 'capistrano/npm'
@bigsweater
bigsweater / Capfile
Created March 2, 2014 14:11
Capfile for deploying Bedrock on MediaTemple's GridServer
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
# Load tasks from gems
require 'capistrano/composer'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
@sangeeths
sangeeths / github-to-bitbucket
Created March 10, 2014 15:24
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
@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
@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
@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.

# 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'