Skip to content

Instantly share code, notes, and snippets.

@sonnykt
sonnykt / drupal-debug-solr.md
Created October 8, 2025 05:18
Drupal - Debug Search API Solr search
$index = \Drupal\search_api\Entity\Index::load('solr_index');
$query = $index->query();
$parse_mode = \Drupal::service('plugin.manager.search_api.parse_mode')->createInstance('direct');
$query->setParseMode($parse_mode);
$query->keys('keywords to search');
$results = $query->execute();
$items = $results->getResultItems();
@sonnykt
sonnykt / aws-ses-identity-audit.md
Last active December 29, 2025 08:46
AWS SES Identity audit

PHP Script

<?php

function aws(string $command) : array|false {
  $aws_command = 'aws --no-cli-pager --no-paginate --output json ' . $command;
  $output = [];
  $result_code = NULL;

  if (exec($aws_command, $output, $result_code)) {
@sonnykt
sonnykt / test-sendmail.md
Created February 3, 2026 23:45
Test Sendmail
$ cat /tmp/sendmail.txt
From: From-Name <email>
To: To-Name <email>
Subject: Test
Date: Mon, 03 Feb 2026 18:42:00 +0000

Test Content