Skip to content

Instantly share code, notes, and snippets.

@aczietlow
aczietlow / profileMappingMapping.sh
Last active October 25, 2023 19:49
Bashing my head in
#! /bin/bash
# pipe input from column
#
# Usage
#
# ex. cat output.txt | column -t | ./profileMappingMapping.sh
#
# for funzies you can pipe out to column again
#
diff --git a/config_ignore_drush/composer.json b/config_ignore_drush/composer.json
new file mode 100644
index 0000000..70e4fcd
--- /dev/null
+++ b/config_ignore_drush/composer.json
@@ -0,0 +1,15 @@
+{
+ "name": "drupal/config_ignore_drush",
+ "type": "drupal-drush",
+ "description": "Command replacement for config:import and config:export that applies sync and active storage filters rather than just sync.",

Docksal

  • Biggest strength over lando
    • less abstraction
      • if you know docker compose and bash you can make it do anything, and it stays out of the way
    • Lando has their own language to learn for config

  • Native works on mac and windows, with a 20% performance hit
@aczietlow
aczietlow / DrupalConNashville2018.md
Last active April 11, 2018 21:38
Drupal Con Nashville 2018

Drupal Con Nashville 2018

Large take aways

  • Decoupled Drupal Days - NYC August
  • Top to bottom Drupal needs to work with marketers
    • Empower marketers to do their job without thinking about the tech
    • Allow them to evaluate Drupal options easily
    • Remove Drupal's technical capabilities from conversations with marketers, instead make it about partnership around solving their problems. CMOs don't give AF about decoupled, big pipe, or anything else
  • Book recommendation: Mythical Man Month
#!/usr/bin/env bash
## Run project's Behat tests.
##
## Usage: fin behat [--path=path] [arguments]
##
## path defaults to tests/behat
# Environment variables passed from fin:
#
SELECT
entity_id,
count(*) AS domain_count
FROM (SELECT DISTINCT
entity_id,
domain_c2345c960dca7259cf7ca40b6_domain_id
FROM field_data_domain_c2345c960dca7259cf7ca40b6
ORDER BY entity_id) SJ
GROUP BY entity_id
HAVING domain_count = 14;
SELECT concat( table_schema, '.', table_name ) table_name,
concat( round( data_length / ( 1024 *1024 ) , 2 ) , 'M' ) data_length,
concat( round( index_length / ( 1024 *1024 ) , 2 ) , 'M' ) index_length,
concat( round( round( data_length + index_length ) / ( 1024 *1024 ) , 2 ) , 'M' ) total_size
FROM information_schema.TABLES
ORDER BY LENGTH(total_size) DESC, total_size DESC
LIMIT 50;
@aczietlow
aczietlow / natural_sort.sql
Created September 12, 2017 14:59
Naturally sort numbers
SELECT DISTINCT commerce_product.product_id AS product_id, commerce_product.sku AS commerce_product_sku, commerce_product.changed AS commerce_product_changed, users_commerce_product.mail AS users_commerce_product_mail, users_commerce_product.uid AS users_commerce_product_uid, 'commerce_product' AS field_data_title_field_commerce_product_entity_type, 'commerce_product' AS field_data_field_special_commerce_product_entity_type
FROM
commerce_product commerce_product
ORDER BY LENGTH(commerce_product.sku), commerce_product.sku ASC;

Docksal

Docksal is included as an alternative to Vagrant for local development. Docksal configuration is included in the .docker directory.

Requirements