Skip to content

Instantly share code, notes, and snippets.

View ummdorian's full-sized avatar

Dorian Damon ummdorian

View GitHub Profile
{
"data": {
"redirectQuery": {
"entities": [
{
"redirectSource": {
"path": "testing-redirects-source",
"query": []
},
"redirectRedirect": {
// If we make pages themselves components that know their fields:
query {
route(path: "/news") {
path
... on EntityCanonicalUrl{
entity {
entityBundle
entityId
entityLabel
entityType
// If we make pages components:
{
"data": {
"route": {
"path": "/news",
"entity": {
"entityBundle": "page",
"entityId": "371",
"entityLabel": "News",
"entityType": "node",
@ummdorian
ummdorian / drush-all.sh
Created May 21, 2020 17:20
Run Drush on all Multisites Script
SITES="docroot/sites"
# Validate and hint if no argument provided.
if [ "${#}" -eq 0 ]; then
echo "- drush-all: missing argument(s)"
echo "EXAMPLE: drush-all cex -y"
else
PWD=${PWD}
cd "${SITES}"
@ummdorian
ummdorian / loadtest.sh
Created June 17, 2020 23:02
Concurrent Request Load Testing
#!/bin/bash
count=$1
echo "time | http_code | filesize | url";
seq 1 $count | xargs -n1 -P$count bash -c 'i=$0; rand=$(openssl rand -base64 12); curl -o /dev/null -w "%{time_total} | %{http_code} | %{size_download} | %{url_effective}\n" -s "http://example.com/?${rand}"'