Skip to content

Instantly share code, notes, and snippets.

View rorymcdaniel's full-sized avatar

Rory McDaniel rorymcdaniel

View GitHub Profile
#!/bin/bash
# Include any branches for which you wish to disable this script
if [ -z “$BRANCHES_TO_SKIP” ]; then
BRANCHES_TO_SKIP=(staging main)
fi
# Get the current branch name and check if it is excluded
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_EXCLUDED=$(printf “%s\n” “${BRANCHES_TO_SKIP[@]}” | grep -c “^$BRANCH_NAME$“)
# Trim it down to get the parts we’re interested in
TRIMMED=$(echo $BRANCH_NAME | sed -e ‘s:^\([^-]*-[^-]*\)-.*:\1:’ -e \
@rorymcdaniel
rorymcdaniel / launch.json
Created February 26, 2022 19:41
Lando VSCode Xdebug Settings
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "xDebug listen",
"type": "php",
"request": "launch",