Provides Git hook enforcing commit message.
- first line length must be less than 50 characters.
- if applicable, second line may be empty.
- length of every lines may be less than 72 characters.
<?php | |
/** | |
* D7 autologin. | |
* Exploits SA-CORE-2014-005 to change your anonymous session into an uid 1 session. | |
* In order to work, first you need to have an anonymous session in the sessions table. | |
* One way to achieve this is to go to the update.php page. | |
* | |
* Usage: php d7-autologin.php http://example.com 127.0.0.1 | |
* |
#!/usr/bin/env bash | |
# Use this script to install or re-install multiple versions of PHP | |
# You should be able to re-run the script multiple times; it will update/reinstall what it needs. | |
# Check OS | |
if [ "${OSTYPE//[0-9.]/}" != "darwin" ]; then | |
echo "This script is intended for OSX users." | |
exit |
#!/bin/bash | |
# ============================================================================= | |
# Author: Chu-Siang Lai / chusiang (at) drx.tw | |
# Filename: teams-chat-post-for-workflows.sh | |
# Modified: 2024-07-22 11:44 (UTC+08:00) | |
# Description: Post a message to Microsoft Teams via "Post to a chat when a webhook request is received" workflows. | |
# Reference: | |
# | |
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025 | |
# - https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/ |
<?php | |
use Drupal\paragraphs\Entity\Paragraph; | |
$field_name = 'field_my_field'; | |
$query = \Drupal::entityQuery('node'); | |
$node_ids = $query | |
->condition('status', 1) | |
->exists($field_name) |