Skip to content

Instantly share code, notes, and snippets.

View tobybellwood's full-sized avatar

Toby Bellwood tobybellwood

View GitHub Profile
@AaronFeledy
AaronFeledy / .lando.yml
Last active February 5, 2021 10:45
Example .lando.yml with Platform.sh and Drupal 8 / Gatsby Monorepo
name: myapp
# Start with the Drupal 8 recipe
recipe: drupal8
# Configure the D8 recipe to match up closer to a vanilla platform.sh stack
config:
# Lando defaults to Apache. Switch to nginx to match Platform.sh.
via: nginx
# Set the webroot to match .platform.app.yaml.
@croxton
croxton / SSL-certs-OSX.md
Last active March 3, 2024 18:58 — forked from leevigraham/Generate ssl certificates with Subject Alt Names on OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

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.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@fribibb
fribibb / govcms-site-sync.sh
Last active November 2, 2017 00:39
govCMS Site Sync
#!/bin/bash
# Expects x paramters (drush alias of remote site | netXXX number | docroot of local instance | DB name)
# e.g. bash ~/govcms-site-sync.sh govcms.sprintgovcms.govcms.acsitefactory.com 2111 ~/Desktop/govCMS/govcms.local govcms
clear
if [ "$#" != "4" ]; then
echo "Requires 4 Paramters: "
@jacmoe
jacmoe / composer-create-project-test.sh
Created December 4, 2015 11:56 — forked from beporter/composer-create-project-test.sh
Make the process of testing a `composer create-project` command easier by operating against your local working copy.
#!/usr/bin/env bash
# Allows you to test the create-project process using your local
# checked-out copy of the skeleton as the source. You MUST commit the
# changes you want to test to a git branch! You MUST name that branch
# as the first argument and the destination path to set up the fresh
# copy into as the second.
#
# Usage:
# - Place this script in your package's root directory and make it executable.
# - Set the PACKAGE_NAME variable below to match your composer.json's `name`.
@mfurlend
mfurlend / composer.json
Last active April 18, 2024 21:41
composer require git repository
{
"name": "my_vendor_name/my_package",
"description": "My Package Description",
"license": "GPL-3.0",
"autoload": {
"classmap": [ // search these directories for classes
"lib/"
]
},
"repositories": {
@willurd
willurd / web-servers.md
Last active June 13, 2024 14:37
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: