[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Source: Craft Cook Book
<?php | |
/** | |
* @file | |
* Contains webform_auto_paths.module. | |
* | |
* Set a Drupal's Webform paths automatically based on the title. This improves | |
* the default use of the machine name (32 chars max) which can result in | |
* cropped or enumerated form URLs if the title is too long. | |
* |
""" | |
Copy Files Based on Lists of Source and Target Locations | |
A script to move files from their respective source location (s) to the desired | |
target location (t). Where each s and t locations are stored as separate lists | |
of paths, each in a separate line, in text files, sources.txt and targets.txt respectively | |
""" | |
import os | |
import shutil | |
# let's make sure we log everything that happens here |
<?php | |
namespace yournamespace\yourplugin; | |
use Craft; | |
class MyClass | |
{ | |
/** | |
* Basic Logging implementation |
/** | |
* Toggle Summary Message. | |
* Changes the content of a details' summary to indicate whether clicking it | |
* will open or close it. Assumes the <summary> lies directly under the | |
* <details> tag and contains `data-message-open` and `data-message-close` | |
* attributes with the respective values for each case. | |
* | |
* @param {Event} event | |
*/ | |
function toggleSummaryMessage(event) { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Image Ratios Comparisons</title> | |
</head> | |
<body> | |
<div id ="app" class="container"></div> | |
</body> |
"Drupal IFFE": { | |
"prefix": "drif", | |
"body": [ | |
"/**", | |
"* @name ${1:ScriptName}", | |
"* @description ${2:Script description.}", | |
"* @param {string} input", | |
"* @returns {string} output", | |
"*/", | |
"(function ($, window, Drupal) {", |
/** | |
* Pacer | |
* Iterate over an array and process each item in a promise with a given delay. | |
* Ideal if you need to run items at a set or variable pace. As used in | |
* https://github.com/cballenar/propertygrubber to delay items due to timeouts | |
* possibly put in place to stop crawlers. | |
* | |
* @param {Array} list List of items to process | |
* @param {Number} delay Time in milliseconds to delay each item | |
* @returns {Array} New list of processed items |
# LEMP Provisioning Script | |
# - Script generated by Laravel Forge on 20200426 | |
# - Built for Ubuntu 18.04LTS, PHP7.2, MySQL5.7 | |
# Variables | |
#------------------------------------------------------------------------------- | |
my_hostname="" # mydomain | |
my_username="" # myuser | |
my_root_pw="" # **************** | |
my_sshkey="" # ssh-rsa AAAA... |
#!/usr/bin/env bash | |
# --------------------------------------- | |
# Virtual Machine Setup | |
# --------------------------------------- | |
# Adding multiverse sources. | |
cat > /etc/apt/sources.list.d/multiverse.list << EOF | |
deb http://archive.ubuntu.com/ubuntu trusty multiverse | |
deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse |
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Source: Craft Cook Book