Skip to content

Instantly share code, notes, and snippets.

@kerasai
kerasai / basic_auth.md
Created March 10, 2025 22:07
Lando - Add Basic Auth

In .lando.yml:

proxy:
  appserver:
    - hostname: mysite.lndo.site
      middlewares:
        - name: CanBeAnything
          key: 'basicauth.users'
 value: 'lando:$$apr1$$5HI8Qwxp$$2/jNlE4mlQA0JPWblBSfy1'
@kerasai
kerasai / README.md
Created February 27, 2025 13:54
Install NodeJS using NVM

README

Download, set executable, then run using desired NodeJS version and NVM version as arguments.

chmod +x install-nodejs-nvm.sh
install-nodejs-nvm.sh 22 0.40.1

To add to a .lando.yml file:

@kerasai
kerasai / !Robo-Setup.md
Last active February 19, 2025 19:35
Robo setup

Robo setup

Robo task runner setup steps, for use in Lando environment.

Require dependencies

lando composer require --dev drupal/coder \
  kerasai/robo-drupal \
 kerasai/robo-phpcs \
@kerasai
kerasai / Tests.md
Last active January 29, 2025 15:46
DrupalCI Tests

Set up tests

Kernel tests

Requries core dev tools:

composer require drupal/core-dev
@kerasai
kerasai / curl.sh
Created October 28, 2024 10:53
CURL with clean file name
#!/bin/bash
# Check if a URL was provided
if [ -z "$1" ]; then
echo "Usage: $0 <URL>"
exit 1
fi
# Assign the first argument to a variable
URL="$1"

Drupal Updates

Process

Get clean install

git checkout -b feauture/[ticket number]--updates origin/develop
composer install
drush deploy
@kerasai
kerasai / !Robo-Setup.md
Last active November 3, 2023 16:59
Robo Setup

Robo Setup

Basic installation

Install dependencies:

lando composer require --dev consolidation/robo \
  drupal/coder \
 kerasai/robo-drupal:^1@rc \
@kerasai
kerasai / !Drupal-Project-Setup.md
Last active February 19, 2025 19:30
Drupal Project Setup

Drupal Project Setup

Drupal poject setup steps, for use in Lando environment.

Lando setup

  1. lando init
  2. Copy, adjust pertinent sections from provided .lando.yml
  3. lando start
@kerasai
kerasai / GitHub Actions Debugging
Last active July 29, 2022 15:04
Steps for debugging Apache and PHP configuration.
# View Apache setup.
- name: Apache setup
run: |
echo '--- /etc/apache2 ---'
sudo ls /etc/apache2
echo '--- /etc/apache2/conf-available ---'
sudo ls /etc/apache2/conf-available
echo '--- /etc/apache2/conf-enabled ---'
sudo ls /etc/apache2/conf-enabled
echo '--- /etc/apache2/mods-available ---'
#!/bin/bash
if [ -z "$1" ]; then
exit
fi
lando terminus drush $1 -- updatedb -y --no-cache-clear && \
lando terminus drush $1 -- cache:rebuild && \
lando terminus drush $1 -- config:import -y && \
lando terminus drush $1 -- cache:rebuild