Skip to content

Instantly share code, notes, and snippets.

View sean-e-dietrich's full-sized avatar

Sean Dietrich sean-e-dietrich

View GitHub Profile
@sean-e-dietrich
sean-e-dietrich / webform_query.patch
Last active July 16, 2019 16:13
Patch for Webform Query Module
diff --git a/src/WebformQuery.php b/src/WebformQuery.php
index 8df00f7..5116d59 100644
--- a/src/WebformQuery.php
+++ b/src/WebformQuery.php
@@ -4,6 +4,11 @@ namespace Drupal\webform_query;
use Drupal\Core\Database\Connection;
+/**
+ * Class WebformQuery
@sean-e-dietrich
sean-e-dietrich / contrib
Created June 21, 2019 21:18
Contrib Command For Docksal
#!/bin/bash
NAME=$1
VERSION=${2:-8.8.x}
if [[ -z "${NAME}" ]]; then
NAME=$(uuidgen)
fi
if [[ -d $NAME ]]; then
@sean-e-dietrich
sean-e-dietrich / docksal-local.env
Created March 11, 2019 14:01
Docksal File Proxy for Drupal
# Should be placed in .docksal/docksal-local.env
# Change URL to location of files
APACHE_FILE_PROXY="http://www.example.com"
git log -- modules/book
commit 18a8dc497416a10d0e45efc0a41f199b8ef5fd0a (tag: pantheon_test_190)
Author: Virginia Franklyn <[email protected]>
Date: Thu Jul 21 14:48:00 2016 +0000
removed a ton of modules to bring up to test and content down from live to see if the modules uninstalled properly - vf
commit ab1797f30525c4ac585fbb243b75c8d4079ff224
Author: Jennifer Hodgdon <[email protected]>
#!/bin/bash
whoami
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
@sean-e-dietrich
sean-e-dietrich / bash.sh
Created June 28, 2018 17:19 — forked from a-r-m-i-n/bash.sh
How to install TYPO3 from commandline
cd /var/www/html
rm -Rf *
composer require typo3/cms:"^7.6" helhum/typo3-console:"^4.5" gridelementsteam/gridelements:"^7.1"
vendor/bin/typo3cms install:setup --force --database-user-name "root" --database-user-password "" --database-host-name "localhost" --database-name "typo3_76" --database-port "3306" --database-socket "" --admin-user-name "admin" --admin-password "password" --site-name "TYPO3 Project" --site-setup-type "site" --use-existing-database 0
vendor/bin/typo3cms cache:flush
php typo3/cli_dispatch.phpsh extbase extension:install gridelements
version: '3'
services:
trigger:
image: franela/dind
command: sh -c "curl -fsSL https://get.docksal.io | sh"
@sean-e-dietrich
sean-e-dietrich / Refresh
Created May 29, 2018 16:46
Docksal Command to Refresh Database From Drush SA
#!/usr/bin/env bash
#: exec_target = cli
## Initialize stack and site (full reset)
##
## Usage: fin refresh [environment id]
ENVIRONMENT=${1:-prod}
cd /var/www/${DOCROOT}
DBFILE="/tmp/site.${ENVIRONMENT}.sql"
if [ ! -f $DBFILE ] || [ ! -z $(find $DBFILE -mmin +60) ] ; then
if [ ! -f $DBFILE ]; then
@sean-e-dietrich
sean-e-dietrich / gulp
Created May 29, 2018 16:44
Docksal Gulp Wrapper Example
#!/usr/bin/env bash
#: exec_target = cli
## Run Gulp Commands on the theme
##
## Usage: fin gulp [arguments]
##
# Abort if anything fails
set -e
cd ${PROJECT_ROOT}/web/themes/custom/site_theme
gulp "$@"